#Packager: Frédéric Galusik pkgname=dmd2 pkgver=2.060 pkgrel=1fg #arch=noarch source=("http://ftp.digitalmars.com/dmd.$pkgver.zip" "dmd2.desktop" "dlogo_48.png") sourcetemplate=http://people.salixos.org/fredg/packages/$pkgname/$pkgver docs=("README.TXT license.txt") url=http://www.d-programming-language.org/index.html dotnew=(etc/dmd.conf) options=('nostrip') slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "dmd2 (The Digital Mars D compiler & Standard Library (D2 version))" "D is a multi-paradigm programming language that combines a principled" "approach with a focus on practicality. In D you get to harness the" "power and high performance of C and C++ and also the safety and" "programmer productivity of modern languages such as Ruby and Python." "Special attention is given to the needs of quality assurance," "documentation, portability, and reliability." ) build() { if [ $arch = 'i486' ] then archstr="32" fi if [ $arch = 'x86_64' ] then archstr="64" fi # dmd cd $SRC/$pkgname/src/dmd make -j $numjobs -f posix.mak MODEL=$archstr install -Dm 755 dmd $PKG/usr/bin/dmd install -Dm 755 ../../linux/bin$archstr/dumpobj \ $PKG/usr/bin/dumpobj install -Dm 755 ../../linux/bin$archstr/obj2asm \ $PKG/usr/bin/obj2asm install -Dm 755 ../../linux/bin$archstr/rdmd \ $PKG/usr/bin/rdmd install -Dm 755 ../../linux/bin$archstr/dman \ $PKG/usr/bin/dman install -Dm 755 ../../linux/bin$archstr/ddemangle \ $PKG/usr/bin/ddemangle mkdir -p $PKG/etc echo -e "[Environment]\nDFLAGS=-m$archstr -I/usr/include/d -I/usr/include/d/druntime/import -L-L/usr/lib${LIBDIRSUFFIX} -L-lrt" \ > $PKG/etc/dmd.conf # D samples mkdir -p $PKG/usr/share/d/samples/ cp -r $SRC/dmd2/samples/d/* $PKG/usr/share/d/samples/ # let make find dmd oldpath=$PATH export PATH=$PATH:`pwd` # druntime cd $SRC/$pkgname/src/druntime make -j $numjobs -f posix.mak MODEL=$archstr install -Dm 644 lib/libdruntime.a \ $PKG/usr/lib${LIBDIRSUFFIX}/libdruntime.a # phobos cd $SRC/$pkgname/src/phobos make -j $numjobs -f posix.mak MODEL=$archstr install -Dm644 generated/linux/release/$archstr/libphobos2.a \ $PKG/usr/lib${LIBDIRSUFFIX}/libphobos2.a # standard d modules cd $SRC/$pkgname/src/phobos mkdir -p $PKG/usr/include/d cp -Rf std $PKG/usr/include/d cp -Rf etc $PKG/usr/include/d cp -f {crc32,index,unittest}.d $PKG/usr/include/d # druntime d modules cd $SRC/$pkgname/src/druntime mkdir -p $PKG/usr/include/d/druntime cp -Rf import $PKG/usr/include/d/druntime # man pages cd $SRC/$pkgname mkdir -p $PKG/usr/man/{man1,man5} cp -Rf man/man1/*.1 $PKG/usr/man/man1/ cp -Rf man/man1/*.5 $PKG/usr/man/man5/ # doc mkdir -p $PKG/usr/doc/$pkgname-$pkgver/ cp -Rf html/d/* $PKG/usr/doc/$pkgname-$pkgver/ # desktop integration install -Dm 644 $SRC/$pkgname.desktop \ $PKG/usr/share/applications/$pkgname.desktop install -Dm 644 $SRC/dlogo_48.png \ $PKG/usr/share/icons/hicolor/48x48/apps/dlogo_48.png # back export PATH=$oldpath }