summaryrefslogtreecommitdiffstats
path: root/network/ip2location-c/ip2location-c.SlackBuild
diff options
context:
space:
mode:
author Jason Graham2018-05-08 15:43:42 +0200
committer Willy Sudiarto Raharjo2018-05-12 01:58:25 +0200
commitd58415aa6d6e168970150505c96909c28e34c2ac (patch)
tree4f8b5be4f46c4e607f22b774d44becebe03159ee /network/ip2location-c/ip2location-c.SlackBuild
parent526b4e989a7e773282d301e6bea006fae5fbd51f (diff)
downloadslackbuilds-d58415aa6d6e168970150505c96909c28e34c2ac.tar.gz
network/ip2location-c: Updated for version 8.0.7.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'network/ip2location-c/ip2location-c.SlackBuild')
-rw-r--r--network/ip2location-c/ip2location-c.SlackBuild33
1 files changed, 18 insertions, 15 deletions
diff --git a/network/ip2location-c/ip2location-c.SlackBuild b/network/ip2location-c/ip2location-c.SlackBuild
index b163f08e8f..18e39d9891 100644
--- a/network/ip2location-c/ip2location-c.SlackBuild
+++ b/network/ip2location-c/ip2location-c.SlackBuild
@@ -1,9 +1,10 @@
#!/bin/sh
+
# 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>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,8 +24,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=ip2location-c # Previously known as C-IP2Location
-VERSION=${VERSION:-7.0.0}
+PRGNAM=ip2location-c
+SRCNAM=IP2Location-C-Library
+VERSION=${VERSION:-8.0.7}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -41,8 +43,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="AUTHORS COPYING Developers_Guide.txt INSTALL LICENSE* NEWS README"
-
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -62,12 +62,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-# Upstream has replaced the original ip2location-c-7.0.0.tar.gz.
-# The new one has an extra directory level ip2location-c-7.0.0 level :(
-# (remove --strip-components=1 if/when upstream fixes it)
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz --strip-components=1
-cd $PRGNAM-$VERSION
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -75,6 +72,8 @@ 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 {} \;
+# The README is missing and is needed by autoconf
+cat README.md > README
autoreconf -vif
CFLAGS="$SLKCFLAGS" \
@@ -86,21 +85,25 @@ CXXFLAGS="$SLKCFLAGS" \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
- --disable-libtool-lock \
+ --datarootdir=/usr/share \
+ --build=$ARCH-slackware-linux \
--disable-static \
- --build=$ARCH-slackware-linux
+ --disable-libtool-lock
make
make install DESTDIR=$PKG
+if [ "$DB" = "yes" ]; then
+ ( cd data && perl ip-country.pl && make install DESTDIR=$PKG )
+fi
+
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- $DOCS \
+ AUTHORS COPYING ChangeLog Developers_Guide.txt INSTALL LICENSE.TXT NEWS README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
-chmod 0644 $PKG/usr/doc/$PRGNAM-$VERSION/*
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install