1 # Maintainer: Mihail Strashun <m.strashun@gmail.com> aka Volfram
5 pkgdesc="The Digital Mars D compiler (D2 version)"
7 url="http://www.digitalmars.com/d/2.0/"
8 source=(http://ftp.digitalmars.com/dmd.$pkgver.zip)
9 md5sums=('531c4b60eb002ea8abbe5c80b2eb677d')
10 provides=('d-compiler='$pkgver 'dmd2='$pkgver)
12 options=('!strip' 'docs')
13 conflicts=('dmd2-complete' 'dmd2-bin')
16 if [ $CARCH = 'x86_64' ]
21 if [ $CARCH = 'i686' ]
27 # Build and install dmd binary
28 cd $srcdir/dmd2/src/dmd
29 make -f posix.mak MODEL=$archstr
30 install -Dm755 ./dmd $pkgdir/usr/bin/dmd
33 export PATH=$PATH:`pwd`
35 # Copy additional tools
36 install -Dm755 $srcdir/dmd2/linux/bin$archstr/dumpobj $pkgdir/usr/bin/dumpobj
37 install -Dm755 $srcdir/dmd2/linux/bin$archstr/obj2asm $pkgdir/usr/bin/obj2asm
38 install -Dm755 $srcdir/dmd2/linux/bin$archstr/rdmd $pkgdir/usr/bin/rdmd
39 echo -e "[Environment]\nDFLAGS=-m$archstr -I/usr/include/d -I/usr/include/d/druntime/import -L-L/usr/lib -L-lrt" > $startdir/dmd.conf
40 install -Dm644 $startdir/dmd.conf $pkgdir/etc/dmd.conf
43 install -Dm644 $srcdir/dmd2/license.txt $pkgdir/usr/share/licenses/dmd/COPYING
46 for x in $srcdir/dmd2/man/man1/*.1; do
47 install -Dm644 $x "$pkgdir/usr/share/man/man1/$(basename $x)"
50 for x in $srcdir/dmd2/man/man1/*.5; do
51 install -Dm644 $x "$pkgdir/usr/share/man/man5/$(basename $x)"
55 mkdir -p $pkgdir/usr/share/doc/d/phobos
56 docs="$srcdir/dmd2/html/d"
57 for x in $(find $docs/*.html $docs/*.gif $docs/*.ico $docs/*.jpg $docs/*.css); do
58 install -Dm644 $x "$pkgdir/usr/share/doc/d/$(basename $x)"
61 for x in $(find $docs/phobos/*.html $docs/phobos/*.gif $docs/phobos/*.css); do
62 install -Dm644 $x "$pkgdir/usr/share/doc/d/phobos/$(basename $x)"