6 pkgdesc="Cross-platform, 3D and historically-based real-time strategy game (openSUSE prebuilt)"
7 url="http://wildfiregames.com/0ad"
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')
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
27 mv -f usr/share/doc/{packages/0ad,0ad}
28 rm -rf usr/share/doc/packages
30 sed -i 's|/usr|LD_LIBRARY_PATH=/usr/lib64/0ad /usr|' usr/bin/0ad
33 if [ ! -f /usr/lib/libboost_system.so.1.46.1 ]; then
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
39 if [ ! -f /usr/lib/libjpeg.so.62 ]; then
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
46 mv -f "$srcdir/usr" "$pkgdir/"