#!/bin/sh # Slackware build script for sms_sdl # Written by B. Watson (yalhcru@gmail.com) PRGNAM=sms_sdl VERSION=${VERSION:-0.9.4a_r7.1} ARCH=${ARCH:-i486} BUILD=${BUILD:-2} TAG=${TAG:-_SBo} CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} SRCVER=$(echo $VERSION | sed 's/_/-/') # If $MIME_TYPES is set to `yes' it will include MIME types for KDE and # automagically associate *.sms and *.gg files with sms_sdl. MIME_TYPES=${MIME_TYPES:-"yes"} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" elif [ "$ARCH" = "x86_64" ]; then cat < $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild # man page is specific to this SlackBuild. If you're packaging for # some other distribution, feel free to snag it. mkdir -p $PKG/usr/man/man1 gzip -9c $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz # Desktop integration stuff: Icon and .desktop file always present, # regardless of $MIME_TYPES mkdir -p $PKG/usr/share/{applications,pixmaps} cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop ( cd $CWD for i in *.png; do cat $i > $PKG/usr/share/pixmaps/$i done ) if [ "$MIME_TYPES" = "yes" ]; then mkdir -p $PKG/usr/share/mime/packages cat $CWD/$PRGNAM.xml > $PKG/usr/share/mime/packages/$PRGNAM.xml # To make KDE able to use the .desktop and MIME stuff properly, we need # to define each MIME type in /usr/share/mimelnk. This seems redundant to # me, but that's how it works... mkdir -p $PKG/usr/share/mimelnk/application ( cd $CWD for i in x-*.desktop; do cat $i > $PKG/usr/share/mimelnk/application/$i done ) fi mkdir -p $PKG/install cat $CWD/doinst.sh > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz