diff options
Diffstat (limited to 'games/ufoai/ufoai.SlackBuild')
-rw-r--r-- | games/ufoai/ufoai.SlackBuild | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/games/ufoai/ufoai.SlackBuild b/games/ufoai/ufoai.SlackBuild index 65daec0e2e0c2..395573bd04e1d 100644 --- a/games/ufoai/ufoai.SlackBuild +++ b/games/ufoai/ufoai.SlackBuild @@ -15,8 +15,17 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20140826 bkw: +# - took over maintenance +# - update for 2.5 +# - get rid of --enable-profiling, all it seems to do is leave a +# gmon.out file in the dir where the game was run +# - allow disabling sse with environment variable +# - allow building the radiant editor. I have no idea if it's working +# correctly, since I have no idea how to use it. + PRGNAM=ufoai -VERSION=${VERSION:-2.4} +VERSION=${VERSION:-2.5} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -48,12 +57,16 @@ else fi # If gtksourceview is available build the radiant editor -# This seems broken ATM, but we will be ready when it will start working if pkg-config --exists gtksourceview-2.0 ; then - radiant="" - # radiant="--enable-uforadiant" + radiant="--enable-uforadiant" +else + radiant="--disable-uforadiant" +fi + +if [ "${SSE:-yes}" = "no" ]; then + sseopt="--disable-sse" else - radiant="" + sseopt="--enable-sse" fi set -e @@ -80,8 +93,7 @@ CXXFLAGS="$SLKCFLAGS" \ --libdir=/usr/lib$LIBDIRSUFFIX \ --datadir=/usr/share/games/$PRGNAM \ --enable-release \ - --enable-sse \ - --enable-profiling \ + $sseopt \ --enable-memory \ --enable-ufo \ --enable-ufoded \ @@ -98,36 +110,34 @@ BINARIES= # Manual install: first the data... mkdir -p $PKG/usr/share/games/$PRGNAM $PKG/usr/bin cp -a base $PKG/usr/share/games/$PRGNAM/ + +# ...then the binaries if [ "$radiant" = "--enable-uforadiant" ]; then cp -a radiant $PKG/usr/share/games/$PRGNAM/ rm -f $PKG/usr/share/games/$PRGNAM/radiant/uforadiant BINARIES="radiant/uforadiant" fi -# ...then the binaries BINARIES="$BINARIES ufo ufoded ufo2map ufomodel memory ufoslicer" -install -m 0755 $BINARIES $PKG/usr/bin/ - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneded 2> /dev/null || true +install -s -m0755 $BINARIES $PKG/usr/bin/ # .desktop files, icons and man pages... mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps $PKG/usr/man/man6 install -m 0644 debian/*.desktop $PKG/usr/share/applications/ install -m 0644 debian/*.xpm $PKG/usr/share/pixmaps/ install -m 0644 debian/*.6 $PKG/usr/man/man6/ -find $PKG/usr/man -type f -exec gzip -9 {} \; +gzip $PKG/usr/man/man6/*.6 # Remove wrong execution path from .desktop files # and get rid of uforadiant stuff if we don't have uforadiant +# [ 20140826 bkw: actually /usr/games is where they should go, but +# I won't change this just to be changing it ] sed -i "s|/usr/games/||" $PKG/usr/share/applications/*.desktop [ "$radiant" = "" ] && rm $PKG/usr/share/applications/uforadiant.desktop \ $PKG/usr/man/man6/uforadiant.6.gz $PKG/usr/share/pixmaps/uforadiant.xpm mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - LICENSES README COPYING \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSES README COPYING $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |