updated on Fri Jan 13 00:14:41 UTC 2012
[aur-mirror.git] / phobia3 / PKGBUILD
blob1fe6c3751835d8d3688562a2c4db0dbe10a145b9
1 # Contributor: Artificial Intelligence <polarbeard@gmail.com>
2 # Special thanks to donvla for improving the script.
4 pkgname=phobia3
5 pkgver=1.1
6 pkgrel=3
7 pkgdesc="Shoot through a tons of bug, blood and guts all over the place. PhobiaIII is a fast paced Third Person Shooter."
8 arch=('i686' 'x86_64')
9 url='http://www.redlynx.com/phobiaIII/index.html'
10 license=('custom: "freeware"')
11 if [ "$CARCH" = "x86_64" ]; then
12         depends=('lib32-libxext' 'lib32-libvorbis' 'lib32-sdl' 'lib32-sdl_mixer' 'lib32-libart-lgpl' 'lib32-libstdc++5' 'lib32-esound' 'lib32-smpeg')
13 else   
14         depends=('libxext' 'libvorbis' 'sdl' 'sdl_mixer' 'libart-lgpl' 'libstdc++5' 'esound' 'smpeg')
15 fi          
16 source=("http://www.redlynx.com/phobiaIII/download/phobia3-linux.tar.bz2"
17         "http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-2.95/libstdc++2.10-glibc2.2_2.95.4-24_i386.deb"
18         "Phobia3.png"
19         "phobia3.desktop"
20         "phobia3.launcher")
21 md5sums=('d184426f643e3b2af9851ae9d5a6351c'
22          'b2da87d562dc2078c8244e980a4722b4'
23          '8ec7d56dbb4f006b906e96725fe9e89c'
24          '27a9dce1e8787085a76261086389fc4c'
25          'e2ee119c281b506a8285d78d0605713d')
27 build() {
28     cd ${srcdir} 
30     # Symblink of libs into Phobia3
31     mkdir -p ${pkgdir}/opt/PhobiaIII/lib && cd ${pkgdir}/opt/PhobiaIII/lib || return 1
32     if [ "$CARCH" = "x86_64" ]; then
33             ln -s /opt/lib32/usr/lib/libart_lgpl_2.so ./libartsc.so.0 || return 1
34             ln -s /opt/lib32/usr/lib/libvorbisfile.so ./libvorbisfile.so.0 || return 1
36     else
37             ln -s /usr/lib/libart_lgpl_2.so ./libartsc.so.0 || return 1
38             ln -s /usr/lib/libvorbisfile.so ./libvorbisfile.so.0 || return 1
40     fi
42     cd ${srcdir} 
44     # Installing an old forgotten lib to Phobia3 lib folder. Only found .deb of this lib.
45     bsdtar -xvf libstdc++2.10-glibc2.2_2.95.4-24_i386.deb || return 1
46     bsdtar -xvf data.tar.gz || return 1
47     install -m 0644 ${srcdir}/usr/lib/libstdc++-3-libc6.2-2-2.10.0.so ${pkgdir}/opt/PhobiaIII/lib/libstdc++-libc6.2-2.so.3 || return 1
49     # Install the data
50     rm -rf ${srcdir}/phobia3/src
51     cp -r ${srcdir}/phobia3/* ${pkgdir}/opt/PhobiaIII || return 1
52     # set right perms
53     find ${pkgdir}/opt/PhobiaIII -type f -exec chmod 644 '{}' \;
54     find ${pkgdir}/opt/PhobiaIII -type d -exec chmod 755 '{}' \;
55     chmod 755 ${pkgdir}/opt/PhobiaIII/phobia3
57     # Install Icon
58     install -D -m 644 ${srcdir}/Phobia3.png \
59         ${pkgdir}/usr/share/pixmaps/Phobia3.png || return 1
61     # Install .desktop file
62     install -D -m 644 ${srcdir}/phobia3.desktop \
63         ${pkgdir}/usr/share/applications/phobia3.desktop || return 1
65     # Install Game Launcher
66     install -D -m 755 ${srcdir}/phobia3.launcher \
67         ${pkgdir}/usr/bin/phobia3 || return 1