# # Games Packages for Chakra, part of chakra-project.org # # Maintainer: Adrián Chaves Fernández (Gallaecio) pkgname=sumwars pkgver=0.5.6 pkgrel=1 pkgdesc="Summoning Wars is a role-playing game, featuring both a single-player and a multiplayer mode for about 2 to 8 players." arch=('i686' 'x86_64') url="http://sumwars.org/" license=('GPL3') depends=('cegui>=0.7.0' 'freealut' 'libogg' 'libvorbis' 'lua>=5.1.0' 'ogre>=1.7.0' 'ois' 'openal' 'poco') categories=('games') source=("http://downloads.sourceforge.net/project/$pkgname/$pkgver/${pkgname}-${pkgver}-src.tar.bz2") md5sums=('89f53fe1023072785e039bdef312a04b') build() { cd $srcdir/${pkgname}-${pkgver} sed -e "s#TARGET_LINK_LIBRARIES(sumwars \${LINK_LIBS})#TARGET_LINK_LIBRARIES(sumwars \${LINK_LIBS} \"boost_system\")#" -i CMakeLists.txt mkdir -p build && cd build cmake \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ .. make } package() { cd $srcdir/${pkgname}-${pkgver} #make install is broken #make DESTDIR=$pkgdir install # Executable. install -Dm755 build/$pkgname $pkgdir/usr/share/$pkgname/$pkgname # Credits. install -Dm644 AUTHORS $pkgdir/usr/share/$pkgname/authors.txt # Savegames. install -dm775 $pkgdir/usr/share/$pkgname/save chown :games $pkgdir/usr/share/$pkgname/save # Desktop Integration. install -Dm644 share/icon/SumWarsIcon_128x128.png $pkgdir/usr/share/pixmaps/$pkgname.png install -Dm755 packaging/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop sed \ -e "s#/games/#/bin/#g" \ -e "s#icons/hicolor/128x128/$pkgname.png#/pixmaps/$pkgname.png#" \ -i $pkgdir/usr/share/applications/$pkgname.desktop cp -r share/* $pkgdir/usr/share/$pkgname for filename in CEGUI Ogre $pkgname; do touch $pkgdir/usr/share/$pkgname/$filename.log done chmod 777 $pkgdir/usr/share/$pkgname/*.log # Execution script. install -dm755 $pkgdir/usr/bin echo "#!/bin/bash" > $pkgdir/usr/bin/$pkgname echo "cd /usr/share/$pkgname" >> $pkgdir/usr/bin/$pkgname echo "./$pkgname" >> $pkgdir/usr/bin/$pkgname chmod 775 $pkgdir/usr/bin/$pkgname }