#Packager: Frédéric Galusik pkgname=dmd2 pkgver=2.056 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 $startdir/src/$pkgname/src/dmd make -j $numjobs -f posix.mak MODEL=$archstr install -Dm755 dmd $startdir/pkg/usr/bin/dmd install -Dm755 ../../linux/bin$archstr/dumpobj \ $startdir/pkg/usr/bin/dumpobj install -Dm755 ../../linux/bin$archstr/obj2asm \ $startdir/pkg/usr/bin/obj2asm install -Dm755 ../../linux/bin$archstr/rdmd \ $startdir/pkg/usr/bin/rdmd install -Dm755 ../../linux/bin$archstr/dman \ $startdir/pkg/usr/bin/dman mkdir -p $startdir/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" \ > $startdir/pkg/etc/dmd.conf # let make find dmd oldpath=$PATH export PATH=$PATH:`pwd` # druntime cd $startdir/src/$pkgname/src/druntime make -j $numjobs -f posix.mak MODEL=$archstr install -Dm644 lib/libdruntime.a \ $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libdruntime.a # phobos cd $startdir/src/$pkgname/src/phobos make -j $numjobs -f posix.mak MODEL=$archstr install -Dm644 generated/linux/release/$archstr/libphobos2.a \ $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libphobos2.a # standard d modules cd $startdir/src/$pkgname/src/phobos mkdir -p $startdir/pkg/usr/include/d cp -Rf std $startdir/pkg/usr/include/d cp -Rf etc $startdir/pkg/usr/include/d cp -f {crc32,index,unittest}.d $startdir/pkg/usr/include/d # druntime d modules cd $startdir/src/$pkgname/src/druntime mkdir -p $startdir/pkg/usr/include/d/druntime cp -Rf import $startdir/pkg/usr/include/d/druntime # man pages cd $startdir/src/$pkgname mkdir -p $startdir/pkg/usr/man/{man1,man5} cp -Rf man/man1/*.1 $startdir/pkg/usr/man/man1/ cp -Rf man/man1/*.5 $startdir/pkg/usr/man/man5/ # doc mkdir -p $startdir/pkg/usr/doc/$pkgname-$pkgver/ cp -Rf html/d/* $startdir/pkg/usr/doc/$pkgname-$pkgver/ # desktop integration install -Dm 644 $startdir/src/$pkgname.desktop \ $startdir/pkg/usr/share/applications/$pkgname.desktop install -Dm 644 $startdir/src/dlogo_48.png \ $startdir/pkg/usr/share/icons/hicolor/48x48/apps/dlogo_48.png # back export PATH=$oldpath }