updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / aquaria-hib-hg / PKGBUILD
blob41edbf6d2ef9a6d77148851477dec2544806fe42
1 # Contributor: Artificial Intelligence <polarbeard@gmail.com>
2 # Maintainer: Marvn <mistrmarvn@gmail.com>
4 pkgname=aquaria-hib-hg
5 pkgver=198
6 pkgrel=1
7 pkgdesc="Humble Bundle Version. 2D Fantasy Action-Adventure, Open Source Version with Cmake buildsystem"
8 arch=('i686' 'x86_64')
9 url='http://www.bit-blot.com/'
10 license=('custom: "commercial"')
11 install=aquaria.install
12 depends=('openal' 'sdl' 'lua' 'freetype2' 'libvorbis')
13 makedepends=('unzip' 'cmake' 'mercurial')
14 source=('aquaria.desktop' 'aquaria.launcher')
15 md5sums=('a1758df53ebaad305f36e739d229f682' '4fbf2f0e7262996df178a9d0efcd1ea6')
17 _hgroot='http://hg.icculus.org/icculus'
18 _hgrepo='aquaria'
19 _gamepkg="aquaria-lnx-humble-bundle.mojo.run"
22 build() {
23         msg "You need a full copy of this game in order to install it"
24         msg "Searching for \"${_gamepkg}\"\
25         in dir: $(readlink -f ${startdir})"
26         pkgpath=${startdir}
28         if [[ ! ( -f "${startdir}/${_gamepkg}" ) ]]; then
29         error "Game package not found, please type absolute path to game setup package (/home/joe):"
30         read pkgpath
31         if [[ ! ( -f "${pkgpath}/${_gamepkg}" ) ]] ; then
32           error "Unable to find game package." && return 1
33         fi
34         fi
35         msg "Found game package, installing..."
37         ln -s "${pkgpath}/${_gamepkg}" "$srcdir"
38         
41         if [ -d $_hgrepo ] ; then
42                 cd $_hgrepo
43                 hg pull -u || return 1
44                 msg "The local files are updated."
45         else
46                 hg clone $_hgroot $_hgrepo || return 1
47         fi
48         
49         msg "Mercurial checkout done or server timeout"
50         msg "Starting make..."
51         
52         if [ -d $srcdir/$_hgrepo-build ] ; then
53         rm -rf "$srcdir/$_hgrepo-build"
54         fi
56         cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
57         cd "$srcdir/$_hgrepo-build"
59         cmake -DCMAKE_BUILD_TYPE=Release .
60         make
63 package() {
65     cd $srcdir
67 # Create Destination Directory
68     install -d -m 755 $pkgdir/opt/Aquaria
70 # Extracting the .run file
71     unzip "${srcdir}/${_gamepkg}" || true
73 # Removing Existing libs from Aquaria which can conflict with the system
74     rm -rf $srcdir/data/libSDL-1.2.so.0
75     rm -rf $srcdir/data/libgcc_s.so.1
76     rm -rf $srcdir/data/libopenal.so.1
77     rm -rf $srcdir/data/libstdc++.so.6
79 # Removing old binary
80     rm -rf $srcdir/aquaria
82 # Install the data
83     cp -r $srcdir/data/*  $pkgdir/opt/Aquaria
85 # Install binary
86     install -D -m 755 $srcdir/$_hgrepo-build/aquaria $pkgdir/opt/Aquaria
88 # Install game scripts
89     cp -r $srcdir/$_hgrepo-build/game_scripts/* $pkgdir/opt/Aquaria
91 # Install Icon
92     install -D -m 644 $srcdir/data/aquaria.png \
93         $pkgdir/usr/share/pixmaps/Aquaria.png
95 # Install Launcher
96     install -D -m 644 $srcdir/aquaria.desktop \
97         $pkgdir/usr/share/applications/aquaria.desktop
99  # Install Game Launcher
100     install -D -m 755 $srcdir/aquaria.launcher \
101         $pkgdir/usr/bin/aquaria    
102