updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / shadowgrounds-survivor / PKGBUILD
blob8f1b697f20821cbdb561f2cd32dbbd8161cf60f9
1 # Maintainer: jimmy-6 <jakub.jarozek {at} gmail.com>
3 # PKGEXT=.tar
4 pkgname=shadowgrounds-survivor
5 _gamepkg="survivorUpdate1.run"
6 pkgver=beta11_update1
7 pkgrel=1
8 pkgdesc="A 3D sci-fi alien shooter - sequel to Shadowgrounds (requires copy of the full game)"
9 url="http://shadowgroundsgame.com/survivor/"
10 license=('custom: "commercial"')
11 arch=('i686' 'x86_64')
12 makedepends=('unzip')
13 source=('shadowgrounds-survivor.sh' 'shadowgrounds-survivor-launcher.sh' 'shadowgrounds-survivor.desktop')
14 md5sums=('d2b791e247b8d96f24fa0053d0553673'
15          '79867f5da2abef43f180f13cd4f3b140'
16          '65ab5514944f8db18396c95cd84baeb3')
18 depends=('libglade' 'mesa')
19 _depends64=('lib32-libglade' 'lib32-mesa')
21 if [[ $CARCH == x86_64 ]]; then
22   depends=(${_depends64[@]})
25 build() {
26   cd ${srcdir}
27   
28   msg "You need a full copy of this game in order to install it"
29   msg "Searching for ${_gamepkg} in dir: $(readlink -f `pwd`/..)"
30   if [[ -f "../${_gamepkg}" ]]; then
31     msg "Found game package, installing..."
32     ln -fs "../${_gamepkg}" .
33     unzip ${_gamepkg} || true
34   else
35     error "Game package not found, please type absolute path to ${_gamepkg}:"
36     read pkgpath
37     if [[ -f "${pkgpath}/${_gamepkg}" ]]; then
38       msg "Found game package, installing..."
39       ln -fs "${pkgpath}/${_gamepkg}" .
40       unzip ${_gamepkg} || true
41     else
42       error "Unable to find game package."
43       return 1
44     fi
45   fi
48 package(){
50   # directories
51   mkdir -p ${pkgdir}/opt/Shadowgrounds-Survivor
52   cd ${srcdir}
53   cp -r Config data Profiles survival ${pkgdir}/opt/Shadowgrounds-Survivor/
54   #fix permissions
55   find ${pkgdir}/opt/Shadowgrounds-Survivor -type d -exec chmod 755 {} \;
56   find ${pkgdir}/opt/Shadowgrounds-Survivor -type f -exec chmod 644 {} \;
57   
58   cp -r lib32 ${pkgdir}/opt/Shadowgrounds-Survivor/
59   chmod -R 755 ${pkgdir}/opt/Shadowgrounds-Survivor/lib32
61   #other data files
62   install -Dm644 data{1,2,3,4,5}.fbz README survivor-launcher.glade \
63                  survivor-logo.png Survivor.xpm ${pkgdir}/opt/Shadowgrounds-Survivor/
64   
65   # startup scripts
66   install -Dm755 ${srcdir}/shadowgrounds-survivor.sh ${pkgdir}/usr/bin/shadowgrounds-survivor
67   install -Dm755 ${srcdir}/shadowgrounds-survivor-launcher.sh ${pkgdir}/usr/bin/shadowgrounds-survivor-launcher
69   # execs
70   install -Dm755 ${srcdir}/survivor-bin ${pkgdir}/opt/Shadowgrounds-Survivor/survivor-bin
71   install -Dm755 ${srcdir}/survivor-launcher ${pkgdir}/opt/Shadowgrounds-Survivor/survivor-launcher
73   # desktop entry
74   install -Dm644 ${srcdir}/shadowgrounds-survivor.desktop ${pkgdir}/usr/share/applications/shadowgrounds-survivor.desktop
75