diff options
Diffstat (limited to 'games/teeworlds/teeworlds.SlackBuild')
-rw-r--r-- | games/teeworlds/teeworlds.SlackBuild | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/games/teeworlds/teeworlds.SlackBuild b/games/teeworlds/teeworlds.SlackBuild index 3aede04f82..a5c2e18d26 100644 --- a/games/teeworlds/teeworlds.SlackBuild +++ b/games/teeworlds/teeworlds.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=teeworlds VERSION=${VERSION:-0.6.2} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -54,10 +54,13 @@ else LIBDIRSUFFIX="" fi +OS=$(uname | tr [:upper:] [:lower:]) + +# Automatically tarball selected by architecture if [ "$ARCH" = "x86_64" ]; then - SRCNAM=teeworlds-0.6.2-linux_x86_64 + SRCNAM=$PRGNAM-$VERSION-$OS\_$ARCH else - SRCNAM=teeworlds-0.6.2-linux_x86 + SRCNAM=$PRGNAM-$VERSION-$OS\_x86 fi set -e @@ -75,17 +78,27 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +mkdir -p $PKG/usr/share/games/$PRGNAM $PKG/usr/bin + +# copy data-game +cp -rf data storage.cfg $PRGNAM $PKG/usr/share/games/$PRGNAM + +# install launchers and server +install -D -m0755 $PRGNAM $PKG/usr/share/games/$PRGNAM/$PRGNAM +install -D -m0755 $PRGNAM\_srv $PKG/usr/share/games/$PRGNAM/$PRGNAM\_srv -mkdir -p $PKG/usr/share/games/$PRGNAM-$VERSION -cp -rf * $PKG/usr/share/games/$PRGNAM-$VERSION +# create soft links +( +cd $PKG/usr/bin +ln -sf /usr/share/games/$PRGNAM/$PRGNAM $PRGNAM +ln -sf /usr/share/games/$PRGNAM/$PRGNAM\_srv $PRGNAM\_srv +) mkdir -p $PKG/usr/share/applications install -D -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop mkdir -p $PKG/usr/share/pixmaps/ -install -D -m644 $CWD/teeworlds.png $PKG/usr/share/pixmaps/$PRGNAM.svg +install -D -m644 $CWD/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a *.txt $PKG/usr/doc/$PRGNAM-$VERSION |