# vim: set syn=sh: # Packager: Phill Watkins pkgname=warsow pkgver=0.62 pkgrel=1pw #arch=noarch source=\ ( "http://www.zcdn.org/dl/warsow_${pkgver}_sdk.zip" "http://www.zcdn.org/dl/warsow_0.61_unified.zip" "http://www.zcdn.org/dl/warsow_${pkgver}_update.zip" ) sourcetemplate=http://people.salixos.org/pwatk/packages/current/slkbuild/$pkgname #docs=() url=http://www.warsow.net/ options=('noextract') slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "warsow (Fastpaced first-person shooter)" "Warsow is a completely free fastpaced first-person shooter (FPS) set" "in a futuristic cartoon-like world" ) build() { set -e mkdir warsow_${pkgver}_sdk unzip -o $startdir/src/warsow_${pkgver}_sdk.zip -d warsow_${pkgver}_sdk ( cd warsow_${pkgver}_sdk/source sed -e '/fs_basepath =/s|\.|/usr/share/warsow|' -i qcommon/files.c make -j $numjobs \ LOCALBASE=/usr \ DEBUG_BUILD=NO \ BUILD_CLIENT=YES \ BUILD_SERVER=YES \ BUILD_IRC=YES \ BUILD_SND_QF=YES \ BUILD_SND_OPENAL=YES \ BUILD_CGAME=YES \ BUILD_GAME=YES \ BUILD_UI=YES \ BUILD_ANGELWRAP=NO \ BUILD_TV_SERVER=YES \ BUILD_THIN_CLIENT=NO for bin in warsow wsw{,tv}_server; do install -Dm 0755 release/$bin.* $startdir/pkg/usr/games/$bin done install -d $startdir/pkg/usr/{lib${LIBDIRSUFFIX},share}/warsow install -m 0644 release/libs/*.so $startdir/pkg/usr/lib${LIBDIRSUFFIX}/warsow/ # link libs to base directory ( cd $startdir/pkg/usr/share/warsow ; ln -s ../../lib${LIBDIRSUFFIX}/warsow libs ) # convert icon for later convert unix/warsow128x128.xpm $startdir/src/warsow.png ) unzip -o $startdir/src/warsow_*_unified.zip -x '*.exe' '*.dll' '*.dylib' unzip -o $startdir/src/warsow_${pkgver}_update.zip -x '*.exe' '*.dll' '*.dylib' -d warsow_*_unified cd warsow_*_unified cp -a basewsw $startdir/pkg/usr/share/warsow/ # install missing angelwrap library install -m 0644 libs/angelwrap_$(echo $arch | sed 's/i.86/i386/').so \ $startdir/pkg/usr/lib${LIBDIRSUFFIX}/warsow/ install -d $startdir/pkg/usr/doc/$pkgname-$pkgver cp -a docs/* $startdir/pkg/usr/doc/$pkgname-$pkgver install -d $startdir/pkg/usr/share/applications cat <<- EOF > $startdir/pkg/usr/share/applications/warsow.desktop [Desktop Entry] Name=Warsow GenericName=First Person Shooter Comment=Fastpaced first-person shooter Exec=warsow Icon=warsow Type=Application StartupNotify=true Terminal=false Categories=Game EOF chmod 644 $startdir/pkg/usr/share/applications/* for icon in 16 22 24 32 48 ;do install -d $startdir/pkg/usr/share/icons/hicolor/${icon}x${icon}/apps convert -resize ${icon}x${icon} $startdir/src/warsow.png \ $startdir/pkg/usr/share/icons/hicolor/${icon}x${icon}/apps/warsow.png done set +e }