#!/bin/sh [ -z $PREPKG ] && exit 1 PACKAGE=darkplaces VERSION=20140513 FILES=$(cd $(dirname $0) ; pwd) mkdir -p \ $PREPKG/{install,usr/{doc/$PACKAGE-$VERSION,games,share/{applications,games/$PACKAGE/id1,pixmaps}}}/ # 2 stage extraction. c'mon guys, is it THAT hard to have separate sources? unzip -q $FILES/${PACKAGE}engine${VERSION}.zip \ ${PACKAGE}enginesource${VERSION}.zip || exit 1 unzip -q ${PACKAGE}enginesource${VERSION}.zip || exit 1 cd $PACKAGE/ # time to be clever. tweak flags to be slackware-like without losing # all the fancy stuff already in the makefile. woohoo, it works! sed -i \ 's/^OPTIM_RELEASE=-O3/OPTIM_RELEASE=-O2 -march=i686 -mtune=i686/g' \ makefile.inc make $MAKEJOBS DP_FS_BASEDIR=/usr/share/games/$PACKAGE/ release \ &> make.output || exit 1 cp -p \ COPYING ChangeLog darkplaces.txt todo \ $PREPKG/usr/doc/$PACKAGE-$VERSION/ cp -p \ darkplaces-dedicated darkplaces-glx darkplaces-sdl \ $PREPKG/usr/games/ cp -p \ darkplaces72x72.png \ $PREPKG/usr/share/pixmaps/darkplaces.png cp \ $FILES/$PACKAGE.desktop \ $PREPKG/usr/share/applications/ cp \ $FILES/slack-desc \ $PREPKG/install/