1 # Maintainer: scrawl <scrawl@baseoftrash.de>
7 pkgdesc="0ad build from the wildfire games PPA at launchpad.net"
9 url="http://www.wildfiregames.com/0ad"
10 license=('GPL2' 'CCPL')
11 depends=('libpng12' 'binutils' 'boost' 'crypto++' 'devil' 'enet-old' 'fam' 'libogg' 'libvorbis' 'libxml2' 'mesa' 'nasm' 'openal' 'sdl' 'wxgtk' 'zip' 'zlib')
12 makedepends=('p7zip' 'deb2targz')
15 [ $CARCH == i686 ] && _arch="i386"
16 [ $CARCH == x86_64 ] && _arch="amd64"
17 source=( https://launchpad.net/~wfg/+archive/0ad/+files/0ad_0.0.0%2Br09530-1~10.10~wfg1_$_arch.deb https://launchpad.net/~wfg/+archive/0ad/+files/0ad-data_0.0.0%2Br09530-1~10.10~wfg1_all.deb http://trac.wildfiregames.com/attachment/ticket/492/0ad.packaging.tar.gz?format=raw 0ad.sh http://ubuntu.mirror.cambrium.nl/ubuntu//pool/universe/b/boost1.40/libboost-filesystem1.40.0_1.40.0-6ubuntu1_$_arch.deb http://ubuntu.mirror.cambrium.nl/ubuntu//pool/universe/b/boost1.40/libboost-system1.40.0_1.40.0-6ubuntu1_$_arch.deb)
18 md5sums=( 4fb82acd2e0b69b4e95f1a1b40ce05f1 a0ea4ebc703db3e516e9e9c7fef04a6d b6c74d2ee0fa4b54b7e617c25794ca3e 9677c33dddf6e20c16f042ae0621082c d685a2421f7e070df57c6b1624a25455 4c34d6a96877b6d79d4cb6d99d805826 )
19 [ $CARCH == i686 ] && md5sums=( fb703051e3386b58009ccc9408773284 a0ea4ebc703db3e516e9e9c7fef04a6d b6c74d2ee0fa4b54b7e617c25794ca3e 9677c33dddf6e20c16f042ae0621082c c516c0edfd025a0925baf2ae6b44790e eb948da264a58a7d6282cce37f9d67ff )
21 conflicts=('0ad' '0ad-svn')
24 # Unpack packaging data (.desktop file, icon...)
25 tar xvf 0ad.packaging.tar.gz\?format\=raw
27 # Unpack and install debs
28 7z e 0ad_0.0.0%2Br09530-1~10.10~wfg1_$_arch.deb -so |tar -x
29 7z e 0ad-data_0.0.0%2Br09530-1~10.10~wfg1_all.deb -so |tar -x
32 # Unpack and install libfix
33 deb2targz libboost-filesystem1.40.0_1.40.0-6ubuntu1_$_arch.deb
34 tar -xzf libboost-filesystem1.40.0_1.40.0-6ubuntu1_$_arch.tar.gz
35 deb2targz libboost-system1.40.0_1.40.0-6ubuntu1_$_arch.deb
36 tar -xzf libboost-system1.40.0_1.40.0-6ubuntu1_$_arch.tar.gz
37 mv usr/lib/ $pkgdir/usr/lib/games/0ad/libfix/
40 mkdir -p $pkgdir/usr/lib/games/0ad/system
41 cp 0ad.sh $pkgdir/usr/lib/games/0ad/system/pyrogenesis
43 cp 0ad.sh $pkgdir/usr/bin/0ad
44 chmod +x $pkgdir/usr/lib/games/0ad/system/pyrogenesis
46 # Fix LD errors caused by Ubuntu shipping different library versions
47 cd $pkgdir/usr/lib/games/0ad/libfix
48 ln -s /usr/lib/libjpeg.so ./libjpeg.so.62
49 ln -s /usr/lib/libtiff.so ./libtiff.so.4
50 ln -s /usr/lib/libboost_filesystem.so ./libboost_filesystem.so.1.42.0
51 ln -s /usr/lib/libboost_system.so ./libboost_system.so.1.42.0
52 ln -s /usr/lib/libenet.so ./libenet.so.0debian1
54 # Install .desktop file
55 cd $srcdir/0ad.packaging
56 install -D -m 0644 "0ad.desktop" "$pkgdir/usr/share/applications/0ad.desktop"
57 install -D -m 0644 "0ad.png" "$pkgdir/usr/share/pixmaps/0ad.png"