games/astromenace: Script cleanup.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Dimitris Zlatanidis 2014-04-22 17:01:02 +07:00 committed by Willy Sudiarto Raharjo
parent 541be06d0d
commit 44939e2bae
4 changed files with 22 additions and 23 deletions

View File

@ -22,10 +22,10 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=astromenace
SRCNAM=astromenace-src
PRGNAM=$(echo $SRCNAM | cut -c1-11)
VERSION=${VERSION:-1.3.2}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -71,23 +71,28 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p build
cmake ./
make
./AstroMenace --pack --rawdata=./RAW_VFS_DATA
cmake ./ # create Makefile
make # build game
./AstroMenace --pack --rawdata=./RAW_VFS_DATA # create game data
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-$VERSION
cp -rf * $PKG/usr/share/games/$PRGNAM-$VERSION
rm -rf $PKG/usr/share/games/$PRGNAM-$VERSION/CMakeFiles
rm -rf $PKG/usr/share/games/$PRGNAM-$VERSION/AstroMenaceSource
mkdir -p $PKG/usr/share/games/$PRGNAM $PKG/usr/bin
# copy game data
cp -rf RAW_VFS_DATA $PKG/usr/share/games/$PRGNAM
cp -a gamedata.vfs $PKG/usr/share/games/$PRGNAM
# install executables
install -D -m0755 AstroMenace $PKG/usr/share/games/$PRGNAM
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 astromenace_128.png $PKG/usr/share/pixmaps/$PRGNAM.svg
install -D -m644 $PRGNAM\_128.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,10 +1,10 @@
[Desktop Entry]
Name=AstroMenace
Name[he]= AstroMenace
Comment=Action
Exec=/usr/share/games/astromenace-1.3.2/AstroMenace
Comment=Space shooter
Exec=astromenace
Icon=astromenace
Terminal=false
Type=Application
Categories=Game;Action
Categories=Game;ArcadeGame;
GenericName=Game

View File

@ -0,0 +1,4 @@
#!/bin/sh
cd /usr/share/games/astromenace
./AstroMenace

View File

@ -1,13 +1,3 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi
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
fi