summaryrefslogtreecommitdiffstats
path: root/ham/direwolf/direwolf.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'ham/direwolf/direwolf.SlackBuild')
-rw-r--r--ham/direwolf/direwolf.SlackBuild37
1 files changed, 22 insertions, 15 deletions
diff --git a/ham/direwolf/direwolf.SlackBuild b/ham/direwolf/direwolf.SlackBuild
index 83226d1803..883b735fb0 100644
--- a/ham/direwolf/direwolf.SlackBuild
+++ b/ham/direwolf/direwolf.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackbuild for direwolf
# Written by JK Wood <joshuakwood@gmail.com>
@@ -20,10 +20,13 @@
# see fit. Or as I see fit. Or as I fit. Although
# that is unlikely, as I am rather tall.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=direwolf
-VERSION=${VERSION:-1.1}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-1.5}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -33,7 +36,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -58,7 +68,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-unzip $CWD/$PRGNAM-$VERSION-src.zip -d $TMP
+unzip $CWD/$PRGNAM-$VERSION.zip -d $TMP
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -68,7 +78,7 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix some silly Makefile choices
-todos < $CWD/Makefile.patch | patch -p0 --binary
+patch -p0 < $CWD/Makefile.patch
CFLAGS="$SLKCFLAGS -DUSE_ALSA -pthread -Iutm" \
LDFLAGS="-L/lib${LIBDIRSUFFIX} -L/usr/lib${LIBDIRSUFFIX}" \
@@ -78,20 +88,17 @@ INSTALL=install \
docdir=/usr/doc/$PRGNAM-$VERSION \
sysconfdir=/etc \
LINK_IN_HOME=no \
-make -f Makefile.linux install install-conf DESTDIR=$PKG
+make -f Makefile.linux install DESTDIR=$PKG/usr
-# direwolf comes with a lovely desktop
-# file that assumes LXDE. Use our own
-# here.
-install -m 644 $CWD/direwolf.desktop $PKG/usr/share/applications/
mkdir -p $PKG/usr/share/pixmaps
-cp -a $PKG/usr/share/direwolf/dw-icon.png $PKG/usr/share/pixmaps/
-
-mv $PKG/etc/direwolf.conf $PKG/etc/direwolf.conf.new
+cp -a $PKG/usr/share/direwolf/pixmaps/dw-icon.png $PKG/usr/share/pixmaps/
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
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc -name "Makefile" -exec rm {} \;
@@ -102,4 +109,4 @@ 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.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE