#Maintainer: Dimitris Tzemos pkgname=supertux2 pkgver=0.4.0 pkgrel=1dj source=("https://github.com/SuperTux/supertux/releases/download/v${pkgver}/supertux-${pkgver}.tar.bz2" "supertux.png") sourcetemplate=http://people.salixos.org/djemos/salix/$pkgname docs=("README" "INSTALL" "COPYING" "WHATSNEW.TXT") url="https://github.com/supertux/supertux" slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "SuperTux (classic 2D jump'n run sidescroller game)" "SuperTux is a classic 2D jump'n run sidescroller game in a style" "similar to the original SuperMario games." "" "Homepage: http://supertux.berlios.de/" ) build() { cd $startdir/src/supertux-$pkgver cmake -D CMAKE_INSTALL_PREFIX=/usr -DINSTALL_SUBDIR_BIN=bin \ -DINSTALL_SUBDIR_SHARE=share/games/$pkgname \ -DINSTALL_SUBDIR_DOC=doc/$pkgname-$pkgver \ -DCMAKE_BUILD_TYPE=Release . || return 1 make || return 1 make install DESTDIR=$startdir/pkg || return 1 # create icons if [ -e "$startdir/pkg/usr/share/icons/hicolor/48x48/apps" ]; then echo "perhaps icons already exists?" return 1 fi mkdir -p $startdir/pkg/usr/share/icons/hicolor/48x48/apps || return 1 cp $startdir/src/supertux.png $startdir/pkg/usr/share/icons/hicolor/48x48/apps || return 1 mkdir -p $startdir/pkg/usr/bin || return 1 mkdir -p $startdir/pkg/usr/share/applications || return 1 cp $startdir/src/supertux-$pkgver/supertux2.desktop $startdir/pkg/usr/share/applications/ || return 1 sed -i "s/Categories=.*/Categories=Game;KidsGame;/" $startdir/pkg/usr/share/applications/supertux2.desktop || return 1 sed -i "s/.png//" $startdir/pkg/usr/share/applications/supertux2.desktop || return 1 }