updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / sheeplifter / PKGBUILD
blobb1f406dd1f113a4fb6eb13dde79865023e703c7d
1 # Maintainer: Alexander Rødseth <rodseth@gmail.com>
2 # Contributor: Dany Martineau <dany.luc.martineau@gmail.com>
3 pkgname=sheeplifter
4 pkgver=2
5 pkgrel=2
6 pkgdesc="Control a wolf in a spaceship and abduct sheep in 3D"
7 url="http://code.google.com/p/sheeplifter/"
8 license=('BSD')
9 arch=('x86_64' 'i686')
10 depends=('java-runtime')
11 source=('http://sheeplifter.googlecode.com/files/Sheeplifter_GC_2.zip'
12         'sheeplifter.desktop'
13         'sheeplifter.png')
14 md5sums=('12fec5e9429aa65d5d11ed3321aecd36'
15          '3d07c5c621fecfae9693c8090341862f'
16          '448db2c63a36d093558fb74043ad44c6')
18 build() {
19   cd "$srcdir/$pkgname"
20   msg2 "Creating wrapperscript..."
21   echo "#!/bin/sh" > sheeplifter.sh
22   echo "cd '/usr/share/sheeplifter/' && sh run_game_linux.sh" >> sheeplifter.sh
25 package() {
26   cd "$srcdir/$pkgname"
27   mkdir -p "$pkgdir/usr/bin"
28   mkdir -p "$pkgdir/usr/share/"{pixmaps,applications,sheeplifter}
30   msg2 "Packaging game content..."
31   cp -R jme "$pkgdir/usr/share/sheeplifter"
32   cp -R jorbis "$pkgdir/usr/share/sheeplifter"
33   cp -R lwjgl "$pkgdir/usr/share/sheeplifter"
34   find $pkgdir/usr/share/sheeplifter -type f -exec chmod 644 {} \;
35   rm -rf "$pkgdir/usr/share/sheeplifter/lwjgl/native/macosx"
36   rm -rf "$pkgdir/usr/share/sheeplifter/lwjgl/native/win32"
37   if [ "$CARCH" = "x86_64" ]; then
38     find "$pkgdir/usr/share/sheeplifter/lwjgl/native/linux" -type f | grep -v 64 | xargs rm
39   else
40     find "$pkgdir/usr/share/sheeplifter/lwjgl/native/linux" -type f -name "*64.*" | xargs rm
41   fi
42   install -Dm644 readme.txt sheeplifter.jar $pkgdir/usr/share/sheeplifter
43   install -Dm755 run_game_linux.sh $pkgdir/usr/share/sheeplifter
45   msg2 "Packaging license..."
46   tail -24 readme.txt > license.txt
47   install -Dm644 license.txt $pkgdir/usr/share/licenses/$pkgname/COPYING
49   msg2 "Packaging wrapperscript..."
50   install -Dm755 sheeplifter.sh "$pkgdir/usr/bin/sheeplifter"
52   msg2 "Packaging menu entry and icon..."
53   install -Dm644 ../sheeplifter.desktop $pkgdir/usr/share/applications
54   install -Dm644 ../sheeplifter.png $pkgdir/usr/share/pixmaps
57 # vim:set ts=2 sw=2 et: