updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / 0ad-bin / PKGBUILD
blob8f90167933d1e6291a2431918705a1b173e34965
1 pkgname=0ad-bin
2 pkgver=alpha_8
3 _pkgver=r10803-3.3
4 _dataver=r10803-1.1
5 pkgrel=3
6 pkgdesc="Cross-platform, 3D and historically-based real-time strategy game (openSUSE prebuilt)"
7 url="http://wildfiregames.com/0ad"
8 arch=('i686' 'x86_64')
9 _arch='x86_64'
10 [ $CARCH = 'i686' ] && _arch='i586'
11 license=('GPL2' 'CCPL')
12 depends=('boost-libs' 'curl' 'enet' 'fam' 'libogg' 'libpng' 'libvorbis' 'libxml2' 'openal' 'python2' 'sdl' 'zlib')
13 makedepends=('boost' 'libarchive' 'wget' 'lynx')
14 conflicts=('0ad' '0ad-svn' '0ad-ppa-wfg')
15 provides=('0ad')
16 source=(http://download.opensuse.org/repositories/games/openSUSE_Tumbleweed/$_arch/0ad-$_pkgver.$_arch.rpm
17         http://download.opensuse.org/repositories/games/openSUSE_Tumbleweed/noarch/0ad-data-$_dataver.noarch.rpm)
18 md5sums=(`wget ${source[0]}.md5 -qO - | cut -d " " -f1`
19          `wget ${source[1]}.md5 -qO - | cut -d " " -f1`)
21 # Don't compress the package because of the long compression time
22 # Delete this line if you want to keep the installation package
23 # or if you have less than 500mb of free space in your TMP folder
24 PKGEXT='.pkg.tar'
26 package() {
27   mv -f usr/share/doc/{packages/0ad,0ad}
28   rm -rf usr/share/doc/packages
29   
30   sed -i 's|/usr|LD_LIBRARY_PATH=/usr/lib64/0ad /usr|' usr/bin/0ad
32   # Linking Boost libs
33   if [ ! -f /usr/lib/libboost_system.so.1.46.1 ]; then
34     cd usr/lib*/0ad
35     ln -fs `find /usr/lib -type f -name libboost_system.so.1.\* -print 2>/dev/null | head -n 1` libboost_system.so.1.46.1
36   fi
38   # libjpeg6
39   if [ ! -f /usr/lib/libjpeg.so.62 ]; then
40     cd "$srcdir"
41     wget `lynx -dump http://download.opensuse.org/distribution/openSUSE-stable/repo/oss/suse/$_arch/ | grep -o \
42     http.*libjpeg62-[0-9].*rpm | tail -1` -qO - | bsdtar -xf -
43     mv -f usr/lib*/libjpeg.so* usr/lib*/0ad
44   fi
46   mv -f "$srcdir/usr" "$pkgdir/"