updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / kiki / PKGBUILD
bloba820c0280891d530897f3a6b474cd6930ef2702a
1 # Contributor: gyo <gyo@archlinux.fr>
2 pkgname=kiki
3 pkgver=1.0.2
4 pkgrel=5
5 pkgdesc="A 3D-puzzle Sokoban-like game"
6 arch=('i686')
7 url="http://kiki.sourceforge.net/"
8 license=('custom:public-domain')
9 depends=('python2' 'freeglut' 'sdl_image' 'sdl_mixer')
10 makedepends=('swig')
11 source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver-src.tgz
12         $pkgname-$pkgver-gcc41.patch 
13         $pkgname-$pkgver-freeglut.patch
14         $pkgname-$pkgver-gcc42.patch
15         $pkgname-$pkgver-gcc44.patch)
16 md5sums=('eb4966eae85d3a073aab521bf1ba33e2'
17          '5552203a107efad60340d522ef36b5e9'
18          '380ce89a54ed8392dae758929be001cf'
19          '897fd6599eaeee432bd3c36fdc6f9fd8'
20          '3155b3f4f24d8988cdd63282d3a8958f')
22 build() {
23   cd $srcdir/kiki
25   for file in $srcdir/*.patch; do
26     patch -Np0 < $file || return 1
27   done
29   sed -i \
30     -e "s:kiki_home += \"/\";:kiki_home = \"/usr/share/$pkgname/\";:g" \
31     -e "/KConsole::printf(\"WARNING :: environment variable KIKI_HOME not set ...\");/d" \
32     -e "/KConsole::printf(\"           ... assuming resources in current directory\");/d" \
33     src/main/KikiController.cpp \
34     || return 1
36   _pyver=$(python2 -V 2>&1 | awk '{print $2}')
37   sed -i \
38     -e "/^PYTHON_VERSION/s/2.3/${_pyver}/" \
39     -e '/lib-dynload/d' \
40     -e '/^PYTHONLIBS/s:\\:-lpython$(PYTHON_VERSION):' \
41     linux/Makefile \
42     || return 1
44   cd SWIG
45   swig -c++ -python -globals kiki -o KikiPy_wrap.cpp KikiPy.i || return 1
46   cp -f kiki.py ../py
47   cd ..
49   make -C kodilib/linux/ || return 1
50   make -C linux/ || return 1
52   sharedest=$pkgdir/usr/share/$pkgname
53   install -D -m755 linux/kiki $pkgdir/usr/bin/kiki
54   install -d $sharedest/sound
55   install -m644 sound/* $sharedest/sound
56   install -d $sharedest/py/{lang,levels}
57   find py -type f | xargs -I xxx install -m644 xxx $sharedest/xxx