updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / sokobano / PKGBUILD
blob097138ce9c9371633570bacb430c98abe8971f75
1 # Contributor: xnitropl <xnitropl at gmail dot com>
2 pkgname=sokobano
3 _pkgname=Sokobano
4 pkgver=1.0.3
5 pkgrel=1
6 pkgdesc="An entertaining Sokoban game featuring nice 3D graphics."
7 url="http://sokobano.sourceforge.net/"
8 arch=('i686'  'x86_64')
9 license=('GPL')
10 depends=('java-runtime')
11 makedepends=('unzip')
12 install=$pkgname.install
13 source=(http://heanet.dl.sourceforge.net/project/$pkgname/$pkgname/$pkgname%20$pkgver/$_pkgname.zip
14         $pkgname.sh
15         $pkgname.desktop)
16 noextract=($_pkgname.zip)
17 md5sums=('e95c6e7051ef17a3c25e703f9c53c8f2'
18          '12973db305ba9d69321546907e340ed0'
19          '34788db62fc44033d161f393eaf11159')
21 build() {
22   unzip -q -o $_pkgname.zip -d $srcdir
24   rm $srcdir/$_pkgname/{startMac.command,startWin{.bat,.exe}}
25   rm -r $srcdir/$_pkgname/{src,lib/lwjgl-2.0.1/native/{macosx,solaris,win32}}
27   if [ "$CARCH" = "i686" ]; then
28     rm $srcdir/$_pkgname/lib/lwjgl-2.0.1/native/linux/*64.so
29   else
30     rm $srcdir/$_pkgname/lib/lwjgl-2.0.1/native/linux/{libjinput-linux.so,liblwjgl.so,libopenal.so}
31   fi
33   mkdir -p $pkgdir/opt/$pkgname
34   cp -r $srcdir/$_pkgname/* $pkgdir/opt/$pkgname
35   chown -R root:games $pkgdir/opt/$pkgname/res/{config,player,levelSet/*/highScores.xml}
36   chmod -R 775 $pkgdir/opt/$pkgname/res/{config,player,levelSet/*/highScores.xml}
37   chmod 775 $pkgdir/opt/$pkgname/startLinux.sh
39   # Prevent overwriting 
40   # - configuration files
41   mv $pkgdir/opt/$pkgname/res/config $pkgdir/opt/$pkgname/res/config.new
42   mv $pkgdir/opt/$pkgname/res/player $pkgdir/opt/$pkgname/res/player.new
43   # - high scores
44   for _i in {0..6}; do
45       mv -T $pkgdir/opt/$pkgname/res/levelSet/$_i/highScores.xml $pkgdir/opt/$pkgname/res/levelSet/$_i/highScores.xml.new
46   done
48   install -D -m755 $startdir/$pkgname.sh $pkgdir/usr/bin/$pkgname
49   install -D -m644 $startdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
50   install -D -m644 $srcdir/$_pkgname/Readme.txt $pkgdir/usr/share/doc/$pkgname/Readme.txt
52 # vim:set ts=2 sw=2 et: