From a4987751971e832a28321a96ea39b4a4cfbaa49c Mon Sep 17 00:00:00 2001 From: Nate Bargmann Date: Mon, 6 Mar 2017 22:51:47 +0700 Subject: ham/hamlib: Updated for version 3.1 + new maintainer. Signed-off-by: Willy Sudiarto Raharjo --- ham/hamlib/hamlib.SlackBuild | 51 +++++++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 12 deletions(-) (limited to 'ham/hamlib/hamlib.SlackBuild') diff --git a/ham/hamlib/hamlib.SlackBuild b/ham/hamlib/hamlib.SlackBuild index ab51744e1b..f11d2e943d 100644 --- a/ham/hamlib/hamlib.SlackBuild +++ b/ham/hamlib/hamlib.SlackBuild @@ -1,8 +1,9 @@ #!/bin/sh -# SlackBuild script for hamlib. +# SlackBuild script for Hamlib # Copyright 2010 Howard Pepper +# Copyright 2017 Nate Bargmann # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,13 +24,13 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=hamlib -VERSION=1.2.15 +VERSION=${VERSION:-3.1} 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 @@ -43,8 +44,8 @@ OUTPUT=${OUTPUT:-/tmp} DOCFILES="AUTHORS COPYING COPYING.LIB ChangeLog INSTALL LICENSE NEWS PLAN README README.betatester README.developer THANKS 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" @@ -59,6 +60,9 @@ fi set -e +PYV=`python -c "import sys;t='{v[0]}.{v[1]}'.format(v=list(sys.version_info[:2]));sys.stdout.write(t)";` +TCLV=`echo 'puts $tcl_version;exit 0' | tclsh` + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -70,7 +74,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 {} \; CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -78,26 +82,49 @@ CXXFLAGS="$SLKCFLAGS" \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --mandir=/usr/man \ - --enable-shared + --docdir=/usr/doc/$PRGNAM-$VERSION/manual \ + --infodir=/usr/info \ + --disable-static \ + --disable-html-matrix \ + --with-perl-binding \ + --with-python-binding \ + --with-tcl-binding # Fix linking when --libdir=/usr/lib64 sed -i \ -e '/RANLIB/s:$(libdir)/\(.*LIBNAME)\):$(libdir)/`basename \1`:g' \ - src/Makefile || exit + src/Makefile 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 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -# No manpages are installed -rm -rf $PKG/usr/man +rm -f $PKG/usr/info/dir +gzip -9 $PKG/usr/info/*.info* + +find $PKG -name perllocal.pod \ + -o -name ".packlist" \ + -o -name "*.bs" \ + | xargs rm -f mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/ cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/scripts +mv $PKG/usr/lib${LIBDIRSUFFIX}/perl5/perltest.pl $PKG/usr/doc/$PRGNAM-$VERSION/scripts +rm -f $PKG/usr/lib${LIBDIRSUFFIX}/python${PYV}/site-packages/Hamlib.pyo +cp -a bindings/pytest.py $PKG/usr/doc/$PRGNAM-$VERSION/scripts +rm -f $PKG/usr/lib${LIBDIRSUFFIX}/tcl/Hamlib/hamlibtcl.la +mv $PKG/usr/lib${LIBDIRSUFFIX}/tcl $PKG/usr/lib${LIBDIRSUFFIX}/tcl${TCLV} +cp -a bindings/tcltest.tcl $PKG/usr/doc/$PRGNAM-$VERSION/scripts +chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/scripts/* + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -- cgit v1.2.3