diff options
Diffstat (limited to 'network/ip2location-c/ip2location-c.SlackBuild')
-rw-r--r-- | network/ip2location-c/ip2location-c.SlackBuild | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/network/ip2location-c/ip2location-c.SlackBuild b/network/ip2location-c/ip2location-c.SlackBuild index ee05eacda6..93fe2af9a6 100644 --- a/network/ip2location-c/ip2location-c.SlackBuild +++ b/network/ip2location-c/ip2location-c.SlackBuild @@ -1,10 +1,10 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for ip2location-c # Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org # Copyright 2012, 2013 Chris Abela, Malta -# Copyright 2018 Jason Graham, MD <jgraha8@gmail.com> +# Copyright 2018, 2022 Jason Graham, USA <jgraham@compukix.net> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,11 +24,14 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=ip2location-c SRCNAM=IP2Location-C-Library -VERSION=${VERSION:-8.0.9} +VERSION=${VERSION:-8.6.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -38,7 +41,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +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} @@ -96,12 +103,17 @@ if [ "$DB" = "yes" ]; then ( cd data && perl ip-country.pl && make install DESTDIR=$PKG ) fi +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + 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 cp -a \ - COPYING Developers_Guide.txt NEWS README INSTALL ChangeLog AUTHORS LICENSE.TXT \ + AUTHORS COPYING ChangeLog Developers_Guide.txt LICENSE.TXT NEWS README README.md \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -109,4 +121,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 |