summaryrefslogtreecommitdiff
path: root/games/stella/stella.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/stella/stella.SlackBuild')
-rw-r--r--games/stella/stella.SlackBuild49
1 files changed, 36 insertions, 13 deletions
diff --git a/games/stella/stella.SlackBuild b/games/stella/stella.SlackBuild
index 774180532b..e1743fd7de 100644
--- a/games/stella/stella.SlackBuild
+++ b/games/stella/stella.SlackBuild
@@ -4,8 +4,21 @@
# Written by Luis Henrique <lmello.009@gmail.com>
+# Modified by B. Watson <yalhcru@gmail.com>
+# 20140915 bkw:
+# - took over maintenance
+# - update for 4.1.1
+# - install .desktop and icons in /usr/share, not /usr/share/$PRGNAM
+# - update icon cache in doinst
+# - make install-strip
+# - add man page
+# - add MIME type for .a26
+# - StartupNotify=false in .desktop
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
PRGNAM=stella
-VERSION=${VERSION:-3.0}
+VERSION=${VERSION:-4.1.1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
@@ -57,26 +70,36 @@ CXXFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--docdir=/usr/doc/$PRGNAM-$VERSION \
- --datadir=/usr/share/$PRGNAM \
+ --datadir=/usr/share \
--disable-static \
--enable-shared
make
-make install DESTDIR=$PKG
+make install-strip DESTDIR=$PKG
+
+mkdir -p $PKG/usr/share/pixmaps
+ln -s \
+ ../icons/hicolor/128x128/apps/$PRGNAM.png \
+ $PKG/usr/share/pixmaps/$PRGNAM.png
+
+# man page borrowed from Debian
+mkdir -p $PKG/usr/man/man6
+sed "s,/usr/share/doc/stella/,/usr/doc/$PRGNAM-$VERSION/," $CWD/$PRGNAM.6 \
+ | gzip -9c > $PKG/usr/man/man6/$PRGNAM.6.gz
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# MIME type for .a26 extension. Not going to add stuff like .bin or .rom,
+# since they could be anything.
+mkdir -p $PKG/usr/share/mime/packages
+cat $CWD/$PRGNAM.xml > $PKG/usr/share/mime/packages/$PRGNAM.xml
-mkdir -p $PKG/usr/share/{applications,pixmaps}
-mv -f $PKG/usr/share/$PRGNAM/applications/stella.desktop $PKG/usr/share/applications
-( cd $PKG/usr/share/pixmaps ; ln -s ../$PRGNAM/icons/stella.png stella.png )
-rmdir $PKG/usr/share/$PRGNAM/applications
+# add MIME type to .desktop file, and remove startup notification,
+# which doesn't actually work (at least not in xfce)
+DESKTOP=$PKG/usr/share/applications/$PRGNAM.desktop
+sed -i '/^StartupNotify/s,true,false,' $DESKTOP
+echo 'MimeType=application/x-2600rom;' >> $DESKTOP
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- Announce.txt Changes.txt Copyright.txt README-GP2X.txt README-SDL.txt \
- README-WinCE.txt Readme.txt Todo.txt \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a *.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install