diff options
Diffstat (limited to 'ham/xlog/xlog.SlackBuild')
-rw-r--r-- | ham/xlog/xlog.SlackBuild | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/ham/xlog/xlog.SlackBuild b/ham/xlog/xlog.SlackBuild index d817a6d6b794..d45e7ee3db04 100644 --- a/ham/xlog/xlog.SlackBuild +++ b/ham/xlog/xlog.SlackBuild @@ -1,8 +1,9 @@ #!/bin/sh -# SlackBuild script for hamlib. +# SlackBuild script for xlog. # # Copyright 2010 Howard Pepper <h_pepper {at} bellsouth [dot] net> +# Copyright 2017 Nate Bargmann <n0nb@arrl.net> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,14 +23,14 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -PRGNAM=xlog -VERSION=2.0.5 +PRGNAM=${PRGNAM:-xlog} +VERSION=${VERSION:-2.0.14} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -40,10 +41,10 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -DOCFILES="AUTHORS COPYING ChangeLog INSTALL NEWS README" +DOCFILES="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO" -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" @@ -69,7 +70,7 @@ find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; # As upstreams INSTALL file mentions, packagers should not run # 'update-mime-database' neither 'update-desktop-database' and @@ -87,24 +88,26 @@ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ - --mandir=/usr/man - -# Fix linking when --libdir=/usr/lib64 -sed -i \ - -e '/RANLIB/s:$(libdir)/\(.*LIBNAME)\):$(libdir)/`basename \1`:g' \ - src/Makefile || exit + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION make make install DESTDIR=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +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 {} \; mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/ cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION +cp -a data/doc/THANKS $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +find $PKG/usr/doc/$PRGNAM-$VERSION/manual -type f -maxdepth 1 -exec rm -f {} \; + +sed -i $PKG/usr/share/applications/xlog.desktop \ + -e "/^Icon=/s/.png//" \ + -e "/^Categories=/s/Utility;Database\(;HamRadio;\)GTK/Network\1/" mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |