diff options
Diffstat (limited to 'ham/cwstation')
-rw-r--r-- | ham/cwstation/cwstation.SlackBuild | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/ham/cwstation/cwstation.SlackBuild b/ham/cwstation/cwstation.SlackBuild index 4cac1b33af..7bf14995d7 100644 --- a/ham/cwstation/cwstation.SlackBuild +++ b/ham/cwstation/cwstation.SlackBuild @@ -1,29 +1,39 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for cwstation # Written by G. Schoenmakers <gschoen@iinet.net.au> +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=cwstation VERSION=${VERSION:-0.1} -BUILD=${BUILD:-1} +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" @@ -36,7 +46,7 @@ else LIBDIRSUFFIX="" fi -set -e +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -52,25 +62,11 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Replace links to /usr/share/automake-1.8 -rm COPYING -rm INSTALL -rm depcomp -rm install-sh -rm missing -AUTOMAKE=/usr/share/automake-1.15 -ln -s $AUTOMAKE/COPYING COPYING -ln -s $AUTOMAKE/INSTALL INSTALL -ln -s $AUTOMAKE/depcomp depcomp -ln -s $AUTOMAKE/install-sh install-sh -ln -s $AUTOMAKE/missing missing - -# The Makefile expects "mkinstalldirs" to be in the application source directory -# A simple link to /bin/mkdir suffices. -ln -s /bin/mkdir mkinstalldirs - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ +# shorter autogen +NOCONFIGURE=1 \ +./autogen.sh + +CFLAGS="$SLKCFLAGS -lm" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ @@ -78,9 +74,12 @@ CXXFLAGS="$SLKCFLAGS" \ --localstatedir=/var \ --build=$ARCH-slackware-linux -make LDFLAGS="-lm" +make make install DESTDIR=$PKG +# cleanup empty directory +rm -rf $PKG/usr/share + 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 @@ -92,4 +91,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc 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 |