games/teeworlds: Script cleanup.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Dimitris Zlatanidis 2014-04-26 18:54:53 +07:00 committed by Erik Hanson
parent 9f219ce23a
commit 01adc3f445
4 changed files with 27 additions and 16 deletions

View file

@ -1,5 +1,3 @@
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
fi
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi

View file

@ -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
mkdir -p $PKG/usr/share/games/$PRGNAM-$VERSION
cp -rf * $PKG/usr/share/games/$PRGNAM-$VERSION
# 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
# 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

View file

@ -1,8 +1,8 @@
[Desktop Entry]
Name=teeworlds
Name[he]= teeworlds
Comment=Action
Exec=/usr/share/games/teeworlds-0.6.2/./teeworlds
Name=Teeworlds
Name[he]= Teeworlds
Comment=Multiplayer 2D shooter
Exec=teeworlds
Icon=teeworlds
Terminal=false
Type=Application

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB