summaryrefslogtreecommitdiff
path: root/community/dmd/PKGBUILD
blob: 43ecb19f7ff44687c43f9c9453d9fdfcf24c058b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# $Id: PKGBUILD 61677 2012-01-06 12:49:05Z cbrannon $
# Maintainer: Chris Brannon <cmbrannon79@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Anders Bergh <anders1@gmail.com>
# Contributor: Alexander Fehr <pizzapunk gmail com>

pkgname=dmd
pkgver=1.072
pkgrel=1
pkgdesc="The Digital Mars D compiler."
arch=('i686' x86_64)
url="http://www.digitalmars.com/d/1.0/"
source=(http://ftp.digitalmars.com/$pkgname.$pkgver.zip)
install='dmd.install'
provides=('d-compiler')
license=('custom')
options=('!strip')
depends=(gcc-libs)
optdepends=('libphobos: D standard runtime library'
            'libtango: Alternative runtime library')

[[ $CARCH == "x86_64" ]] && makedepends=("${makedepends[@]}" 'gcc-multilib' 'lib32-glibc')

build() {
  # Copy the license.
  install -Dm644 "$srcdir/dmd/license.txt" "$pkgdir/usr/share/licenses/dmd/LICENSE" || return 1

  if [ $CARCH == x86_64 ]; then
    cd "$srcdir/dmd/linux/bin64"
  else
    cd "$srcdir/dmd/linux/bin32"
  fi
  install -dm755 "$pkgdir/usr/bin"
  install -m755 dmd rdmd dumpobj obj2asm "$pkgdir/usr/bin"

  for x in "$srcdir"/dmd/man/man1/*.1; do
    install -Dm644 "$x" "$pkgdir/usr/share/man/man1/$(basename "$x")" || return 1
  done

  for x in "$srcdir"/dmd/man/man1/*.5; do
    install -Dm644 "$x" "$pkgdir/usr/share/man/man5/$(basename "$x")" || return 1
  done
}
md5sums=('d5489b94f06c7ca2f4b5de62f7e6815a')