summaryrefslogtreecommitdiff
path: root/games/zsnes/zsnes.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/zsnes/zsnes.SlackBuild')
-rw-r--r--games/zsnes/zsnes.SlackBuild38
1 files changed, 20 insertions, 18 deletions
diff --git a/games/zsnes/zsnes.SlackBuild b/games/zsnes/zsnes.SlackBuild
index 993e2f0f52..7eaa8b308f 100644
--- a/games/zsnes/zsnes.SlackBuild
+++ b/games/zsnes/zsnes.SlackBuild
@@ -22,13 +22,14 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=zsnes
-VERSION=1.51
-ZSNESSRC=151src
-ZSNESDIR=_1_51
+VERSION=1.51b
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+ZSNESSRC="$(echo $VERSION | tr -d .)src"
+ZSNESDIR="_$(echo $VERSION | tr . _)"
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -77,28 +78,29 @@ make
make install DESTDIR=$PKG
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
- )
-fi
+( cd $PKG/usr/man || exit 1
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+# Add a .desktop file and icon for good menu integration
+mkdir -p $PKG/usr/share/{applications,pixmaps}
+install -m 0644 $CWD/zsnes.desktop $PKG/usr/share/applications/zsnes.desktop
+install -m 0644 $CWD/zsnes.png $PKG/usr/share/pixmaps/zsnes.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-# Add a .desktop file and icon for good menu integration
-install -D -m 0644 $CWD/zsnes.desktop $PKG/usr/share/applications/zsnes.desktop
-install -D -m 0644 $CWD/zsnes.png $PKG/usr/share/pixmaps/zsnes.png
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}