mirror of
https://github.com/SlackBuildsOrg/slackbuilds
synced 2024-09-28 15:21:00 +02:00
network/ipv6calc: Updated for version 1.0.0.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
parent
d58415aa6d
commit
8414cf022f
5 changed files with 74 additions and 20 deletions
|
@ -5,9 +5,20 @@ into the same format shown in /proc/net/if_inet6.
|
|||
This utility was also used in the past to extend features on
|
||||
network-functions-ipv6 library, used by initscripts-ipv6.
|
||||
|
||||
To enable IP2Location support you will need to install the optional
|
||||
dependency ip2location-c first, and then pass:
|
||||
In addition to its internal databases, ipv6calc supports several
|
||||
external databases. The following build options may be used to include
|
||||
support for these:
|
||||
|
||||
IP2LOCATION=yes
|
||||
IP2LOCATION=yes Enable IP2Location support (requires ip2location-c)
|
||||
GEOIP=yes Enable GeoIP support (requires GeoIP)
|
||||
EXTERNAL=yes Enable external db support
|
||||
|
||||
to this Slackbuild.
|
||||
where each build option is passed to the slackbuild. Example of
|
||||
enabling the IP2Location and GeoIP external database:
|
||||
|
||||
IP2LOCATION=yes GEOIP=yes ./ipv6calc.SlackBuild
|
||||
|
||||
The ipv6calc Apache module can be built by passing MOD_IPV6CALC=yes to
|
||||
the slackbuild as:
|
||||
|
||||
MOD_IPV6CALC=yes ./ipv6calc.SlackBuild
|
||||
|
|
13
network/ipv6calc/doinst.sh
Normal file
13
network/ipv6calc/doinst.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
config() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
||||
# toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
# Copyright 2012, 2013 Chris Abela, Malta
|
||||
# Copyright 2014 Ryan P.C. McQuen, WA, ryanpcmcquen@member.fsf.org
|
||||
# Copyright 2018 Jason Graham, MD <jgraha8@gmail.com>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -24,7 +25,7 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=ipv6calc
|
||||
VERSION=${VERSION:-0.98.0}
|
||||
VERSION=${VERSION:-1.0.0}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
|
@ -70,20 +71,38 @@ 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 {} \;
|
||||
|
||||
if [ "$IP2LOCATION" = yes ]; then
|
||||
ENABLE_IP2LOCATION="${ENABLE_IP2LOCATION:-"--enable-ip2location"}"
|
||||
else
|
||||
# The default is to disable ip2location
|
||||
unset ENABLE_IP2LOCATION
|
||||
unset ENABLE_IP2LOCATION
|
||||
unset ENABLE_GEOIP
|
||||
unset ENABLE_EXTERNAL
|
||||
unset ENABLE_MOD_IPV6CALC
|
||||
|
||||
if [ "$IP2LOCATION" = "yes" ]; then
|
||||
ENABLE_IP2LOCATION="--enable-ip2location --with-ip2location-db=/usr/share/IP2Loc"
|
||||
fi
|
||||
|
||||
if [ "$GEOIP" = "yes" ]; then
|
||||
ENABLE_GEOIP="--enable-geoip --with-geoip-db=/usr/share/GeoIP"
|
||||
fi
|
||||
|
||||
if [ "$EXTERNAL" = "yes" ]; then
|
||||
ENABLE_EXTERNAL="--enable-external"
|
||||
fi
|
||||
|
||||
if [ "$MOD_IPV6CALC" = "yes" ]; then
|
||||
ENABLE_MOD_IPV6CALC="--enable-mod_ipv6calc"
|
||||
fi
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--mandir=/usr/man \
|
||||
$ENABLE_IP2LOCATION
|
||||
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
||||
--build=$ARCH-slackware-linux \
|
||||
$ENABLE_IP2LOCATION $ENABLE_GEOIP $ENABLE_EXTERNAL $ENABLE_MOD_IPV6CALC
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
@ -94,16 +113,27 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
|
|||
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
|
||||
|
||||
# If you need more docs/scripts, have a look at the source,
|
||||
# I take a minimalist approach here.
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a \
|
||||
COPYING CREDITS ChangeLog INSTALLING LICENSE README* TODO USAGE doc \
|
||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
CHANGES COPYING CREDITS ChangeLog LICENSE README TODO USAGE VERSION \
|
||||
doc/ipv6calc.html \
|
||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
|
||||
if [ "$MOD_IPV6CALC" = "yes" ]; then
|
||||
# Move the ipv6calc.conf to the proper location
|
||||
mkdir -p $PKG/etc/httpd
|
||||
mv $PKG/etc/{httpd.d,httpd/extra}
|
||||
mv $PKG/etc/httpd/extra/ipv6calc.conf $PKG/etc/httpd/extra/httpd-ipv6calc.conf.new
|
||||
echo "config etc/httpd/extra/httpd-ipv6calc.conf.new" >> $PKG/install/doinst.sh
|
||||
|
||||
# Update IP2Loc db directory
|
||||
sed -i 's/\/usr\/share\/IP2Location/\/usr\/share\/IP2Loc/g' $PKG/etc/httpd/extra/httpd-ipv6calc.conf.new
|
||||
fi
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="ipv6calc"
|
||||
VERSION="0.98.0"
|
||||
VERSION="1.0.0"
|
||||
HOMEPAGE="http://www.deepspace6.net/projects/ipv6calc.html"
|
||||
DOWNLOAD="ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/ipv6calc-0.98.0.tar.gz"
|
||||
MD5SUM="a245ec36d1536413ac49eac52579eea5"
|
||||
DOWNLOAD="ftp://ftp.deepspace6.net/pub/ds6/sources/ipv6calc/ipv6calc-1.0.0.tar.gz"
|
||||
MD5SUM="6eed2e5b8ca07330e044d809ade3b565"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
|
|
|
@ -11,9 +11,9 @@ ipv6calc:
|
|||
ipv6calc: ipv6calc is a small utility written in C to manipulate (not only) IPv6
|
||||
ipv6calc: addresses. It converts a given IPv6 address into compressed format, or
|
||||
ipv6calc: into the same format shown in /proc/net/if_inet6.
|
||||
ipv6calc:
|
||||
ipv6calc: This utility was also used in the past to extend features on
|
||||
ipv6calc: network-functions-ipv6 library, used by initscripts-ipv6.
|
||||
ipv6calc:
|
||||
ipv6calc: Homepage: http://www.deepspace6.net/projects/ipv6calc.html
|
||||
ipv6calc:
|
||||
ipv6calc:
|
||||
|
|
Loading…
Reference in a new issue