updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / libphobos2 / PKGBUILD
blobf6da31232af4ea11e9761e2bfad4c1b7d9b528d6
1 # Maintainer: Mihail Strashun <m.strashun@gmail.com> aka Volfram
2 pkgname=libphobos2
3 pkgver=2.057
4 pkgrel=1
5 pkgdesc="Runtime library & Standard language library for the D programming language"
6 arch=('i686' 'x86_64')
7 url="http://www.digitalmars.com/d/2.0/"
8 source=(http://ftp.digitalmars.com/dmd.$pkgver.zip)
9 license=('custom')
10 depends=('d-compiler>=2')
11 conflicts=('libtango')
12 provides=('libphobos2='$pkgver)
13 md5sums=('531c4b60eb002ea8abbe5c80b2eb677d')
15 if [ $CARCH = 'x86_64' ]
16 then
17         archstr="64"
20 if [ $CARCH = 'i686' ]
21 then 
22         archstr="32"
25 build() {
26   # Build and install druntime
27   cd $srcdir/dmd2/src/druntime 
28   make -f posix.mak MODEL=$archstr
29   install -Dm644 ./lib/libdruntime.a $pkgdir/usr/lib/libdruntime.a 
31   # Build and install standard library binary
32   cd $srcdir/dmd2/src/phobos 
33   make -f posix.mak MODEL=$archstr
34   install -Dm644 ./generated/linux/release/$archstr/libphobos2.a $pkgdir/usr/lib/libphobos2.a 
36    # Install standard library *.d modules
37    mkdir -p $pkgdir/usr/include/d
38    cd $srcdir/dmd2/src/phobos
39    cp -Rf std $pkgdir/usr/include/d
40    cp -Rf etc $pkgdir/usr/include/d
41    cp -f {crc32,index,unittest}.d $pkgdir/usr/include/d
43    # Install druntime *.d modules
44    mkdir -p $pkgdir/usr/include/d/druntime
45    cd $srcdir/dmd2/src/druntime/
46    cp -Rf import $pkgdir/usr/include/d/druntime
48    # Copy license
49    install -Dm644 $srcdir/dmd2/src/phobos/phoboslicense.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE