summaryrefslogtreecommitdiffstats
path: root/ham/twhamqth/twhamqth.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'ham/twhamqth/twhamqth.SlackBuild')
-rw-r--r--ham/twhamqth/twhamqth.SlackBuild32
1 files changed, 22 insertions, 10 deletions
diff --git a/ham/twhamqth/twhamqth.SlackBuild b/ham/twhamqth/twhamqth.SlackBuild
index f36b1a2dd1..152871a2e2 100644
--- a/ham/twhamqth/twhamqth.SlackBuild
+++ b/ham/twhamqth/twhamqth.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackbuild for twhamqth
# Written by JK Wood <joshuakwood@gmail.com>
@@ -20,26 +20,36 @@
# 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=twhamqth
-VERSION=${VERSION:-1.4}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-2.0}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
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}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -67,8 +77,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS -fcommon" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
@@ -86,6 +95,9 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
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
+# Don't overwrite the config file
+mv $PKG/etc/X11/app-defaults/TwHamQTH $PKG/etc/X11/app-defaults/TwHamQTH.new
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -97,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