diff options
author | Jason Graham <jgraha8@gmail.com> | 2018-05-08 14:43:42 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-05-12 06:58:25 +0700 |
commit | d58415aa6d6e168970150505c96909c28e34c2ac (patch) | |
tree | 4f8b5be4f46c4e607f22b774d44becebe03159ee /network/ip2location-c | |
parent | 526b4e989a7e773282d301e6bea006fae5fbd51f (diff) |
network/ip2location-c: Updated for version 8.0.7.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'network/ip2location-c')
-rw-r--r-- | network/ip2location-c/README | 30 | ||||
-rw-r--r-- | network/ip2location-c/ip2location-c.SlackBuild | 33 | ||||
-rw-r--r-- | network/ip2location-c/ip2location-c.info | 8 | ||||
-rw-r--r-- | network/ip2location-c/slack-desc | 16 |
4 files changed, 49 insertions, 38 deletions
diff --git a/network/ip2location-c/README b/network/ip2location-c/README index f313f7bab905e..7c045d09a3329 100644 --- a/network/ip2location-c/README +++ b/network/ip2location-c/README @@ -1,11 +1,19 @@ -IP2Location is a C library that enables the user to find the country, region, -city, latitude, longitude, zip code, time zone, ISP, domain name, connection -type, area code, weather, mobile network by IP address or hostname originates -from. It contains a demo IP2Location IP-COUNTRY BIN database which consists of -real data for IP address range 0.0.0.0 to 99.255.255.255. This database -contains IP address blocks as key and countries as values. The paid version of -IP2Location database covers all IP address range. In general, it is more -complete, fast and accurate than using reverse DNS lookups. Developers can -download other sample databases to evaluate other features such as region, -city, latitude, longitude, zip code, ISP, domain name, connection, area code, -weather code and mobile network code using the same C library. +IP2Location C library enables the user to find the country, region, +city, coordinates, zip code, time zone, ISP, domain name, connection +type, area code, weather, MCC, MNC, mobile brand name, elevation and +usage type that any IP address or hostname originates from. It has +been optimized for speed and memory utilization. Developers can use +the API to query all IP2Location binary databases for IPv4 and +IPv6 address. + +It contains the IP-COUNTRY BIN databases (IPv4 and IPv6) which +consists of IP address blocks as keys and countries as +values. Developers can download other sample databases to evaluate +other features such as region, city, latitude, longitude, zip code, +ISP, domain name, connection, area code, weather code, mobile network, +elevation, and usage type code using the same C library. + +To install the included IP-COUNTRY BIN databases pass DB=yes to +the slackbuild as + + DB=yes ./ip2location-c.SlackBuild diff --git a/network/ip2location-c/ip2location-c.SlackBuild b/network/ip2location-c/ip2location-c.SlackBuild index b163f08e8fd7a..18e39d9891fd8 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 diff --git a/network/ip2location-c/ip2location-c.info b/network/ip2location-c/ip2location-c.info index 88c99378ad80c..132b2d1b7f2d1 100644 --- a/network/ip2location-c/ip2location-c.info +++ b/network/ip2location-c/ip2location-c.info @@ -1,8 +1,8 @@ PRGNAM="ip2location-c" -VERSION="7.0.0" -HOMEPAGE="http://www.ip2location.com/developers/c-7" -DOWNLOAD="http://www.ip2location.com/downloads/ip2location-c-7.0.0.tar.gz" -MD5SUM="b9aad9bd89159d633c57b6692c7f7c52" +VERSION="8.0.7" +HOMEPAGE="http://www.ip2location.com/developers/c" +DOWNLOAD="https://github.com/chrislim2888/IP2Location-C-Library/archive/8.0.7/IP2Location-C-Library-8.0.7.tar.gz" +MD5SUM="8c33ffe6d66baba942dffa8bf75ea45b" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/network/ip2location-c/slack-desc b/network/ip2location-c/slack-desc index 4a1ed0c800963..00302d16ce8f9 100644 --- a/network/ip2location-c/slack-desc +++ b/network/ip2location-c/slack-desc @@ -6,14 +6,14 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -ip2location-c: ip2location-c (Geo IP library) +ip2location-c: ip2location-c (Geolocate IP library) ip2location-c: -ip2location-c: IP2Location is a C library that enables the user to find the -ip2location-c: country, region, city, latitude, longitude, zip code, time zone, -ip2location-c: ISP, domain name, connection type, area code, weather, mobile -ip2location-c: network by IP address or hostname originates from. It contains -ip2location-c: a demo IP2Location IP-COUNTRY BIN database which consists of -ip2location-c: real data for IP address range 0.0.0.0 to 99.255.255.255. +ip2location-c: IP2Location C library enables the user to find the country, region, +ip2location-c: city, coordinates, zip code, time zone, ISP, domain name, connection +ip2location-c: type, area code, weather, MCC, MNC, mobile brand name, elevation and +ip2location-c: usage type that any IP address or hostname originates from. It has +ip2location-c: been optimized for speed and memory utilization. Developers can use +ip2location-c: the API to query all IP2Location binary databases for IPv4 and +ip2location-c: IPv6 address. ip2location-c: ip2location-c: Homepage: http://www.ip2location.com/c.aspx -ip2location-c: |