updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / amnesia-tdd / PKGBUILD
blobf1dcb0411dcf46f8c1c9e661412d67b56617cd8c
1 # Mantainer: Gerardo Marset <gammer1994@gmail.com>
3 pkgname=amnesia-tdd
4 pkgver=1.2
5 pkgrel=1
6 pkgdesc="A game about immersion, discovery and living through a nightmare."
7 arch=('i686' 'x86_64')
8 url="http://www.amnesiagame.com/"
9 license=('custom')
10 depends=('libxft')
11 _sh=amnesia_tdd_$pkgver.sh
12 source=($_sh $pkgname.desktop)
13 md5sums=('5151ae5b89f6c8a8ddc10dfb19d8feb3'
14          '14c4f3a4d94cd5144f46f229026cece2')
16 build() {
17   # Extract installer.
18   if [ ! -d $srcdir/$pkgname-$pkgver ]; then
19     mkdir -p $srcdir/$pkgname-$pkgver
20   fi
21   msg "Extracting archive..."
22   sh $_sh --tar xf -C $srcdir/$pkgname-$pkgver 
23   cd $srcdir/$pkgname-$pkgver
25   case $CARCH in
26     i686) _arch=x86 ;;
27     x86_64) _arch=x86_64 ; _sfix=64 ;;
28   esac
29   ./bin/linux/$_arch/libc.so.6/lzma-decode ./subarch - 2>/dev/null | tar xvf - 2>&1
30   tar --lzma -xf instarchive_all
31   tar --lzma -xf instarchive_all_$_arch
33   # Create pkgdir folders.
34   mkdir -p $pkgdir/usr/bin
35   mkdir -p $pkgdir/usr/share/{applications,games/$pkgname,icons}
36   mkdir -p $pkgdir/usr/share/licenses/$pkgname
38   # Install files.
39   msg "Copying files..."
41   install -m644 config/license $pkgdir/usr/share/licenses/$pkgname/
43   cd $srcdir/$pkgname-$pkgver/Amnesia/
45   # Move all libraries.
46   mv libs$_sfix/all/* libs$_sfix/
47   rmdir libs$_sfix/all
49   # Copy the game folder.
50   cp -r * $pkgdir/usr/share/games/$pkgname
52   # Make executable links.
53   ln -s /usr/share/games/$pkgname/Amnesia.bin$_sfix $pkgdir/usr/bin/$pkgname
54   ln -s /usr/share/games/$pkgname/Launcher.bin$_sfix $pkgdir/usr/bin/$pkgname-launcher
56   # Install icons and .desktop files.
57   install -m644 Amnesia.png $pkgdir/usr/share/icons/$pkgname.png
58   install -m644 $startdir/$pkgname.desktop $pkgdir/usr/share/applications/