games/boswars: Script cleanup.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Dimitris Zlatanidis 2014-04-24 12:57:31 +07:00 committed by Erik Hanson
parent b1461059f0
commit 1cd2424f3c
4 changed files with 19 additions and 22 deletions

View File

@ -25,7 +25,7 @@
PRGNAM=boswars
VERSION=${VERSION:-2.7}
SRCVERSION=$(echo $VERSION-src)
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -73,27 +73,26 @@ find -L . \
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
./make.py
./make.py # build source code
mkdir -p $PKG/usr/share/games/$PRGNAM-$VERSION
cp -rf campaigns $PKG/usr/share/games/$PRGNAM-$VERSION
cp -rf engine $PKG/usr/share/games/$PRGNAM-$VERSION
cp -rf fbuild/release/* $PKG/usr/share/games/$PRGNAM-$VERSION
cp -rf graphics $PKG/usr/share/games/$PRGNAM-$VERSION
cp -rf intro $PKG/usr/share/games/$PRGNAM-$VERSION
cp -rf languages $PKG/usr/share/games/$PRGNAM-$VERSION
cp -rf maps $PKG/usr/share/games/$PRGNAM-$VERSION
cp -rf patches $PKG/usr/share/games/$PRGNAM-$VERSION
cp -rf scripts $PKG/usr/share/games/$PRGNAM-$VERSION
cp -rf sounds $PKG/usr/share/games/$PRGNAM-$VERSION
cp -rf tools $PKG/usr/share/games/$PRGNAM-$VERSION
cp -rf units $PKG/usr/share/games/$PRGNAM-$VERSION
SRCDIRS="campaigns engine fbuild/release/* graphics intro languages maps \
patches scripts sounds tools units"
mkdir -p $PKG/usr/share/games/$PRGNAM $PKG/usr/bin
# copy data game
for i in $SRCDIRS; do
cp -rf $i $PKG/usr/share/games/$PRGNAM
done
# install launcher
install -D -m0755 $CWD/$PRGNAM.sh $PKG/usr/bin/$PRGNAM
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 intro/logo_boswars.png $PKG/usr/share/pixmaps/$PRGNAM.svg
install -D -m644 intro/logo_boswars.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGELOG *.txt doc/* $PKG/usr/doc/$PRGNAM-$VERSION

View File

@ -2,7 +2,7 @@
Name=Bos Wars
Name[he]= Bos Wars
Comment=RTS
Exec=/usr/share/games/boswars-2.7/boswars -d /usr/share/games/boswars-2.7
Exec=boswars
Icon=boswars
Terminal=false
Type=Application

3
games/boswars/boswars.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
cd /usr/share/games/boswars
./boswars

View File

@ -1,8 +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