mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
network/GeoIP: Added to 12.0 repository
This commit is contained in:
parent
4c8f9c4f3f
commit
b5b96ee902
5 changed files with 121 additions and 0 deletions
69
network/GeoIP/GeoIP.SlackBuild
Normal file
69
network/GeoIP/GeoIP.SlackBuild
Normal file
|
@ -0,0 +1,69 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Slackware build script for GeoIP
|
||||
# Written by Yalla-One <yallaone@gmail.com>
|
||||
|
||||
PRGNAM=GeoIP
|
||||
VERSION=1.4.3
|
||||
ARCH=${ARCH:-i486}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
DOCUMENTATION="AUTHORS COPYING ChangeLog INSTALL README TODO"
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
chmod -R u+w,go+r-w,a-s .
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--localstatedir=/var
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
# Let's not clobber config files
|
||||
mv $PKG/etc/GeoIP.conf.default $PKG/etc/GeoIP.conf.default.new
|
||||
mv $PKG/etc/GeoIP.conf $PKG/etc/GeoIP.conf.new
|
||||
|
||||
( cd $PKG
|
||||
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
)
|
||||
|
||||
( cd $PKG/usr/man
|
||||
find . -type f -exec gzip -9 {} \;
|
||||
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
||||
)
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a $DOCUMENTATION $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
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
|
8
network/GeoIP/GeoIP.info
Normal file
8
network/GeoIP/GeoIP.info
Normal file
|
@ -0,0 +1,8 @@
|
|||
PRGNAM="GeoIP"
|
||||
VERSION="1.4.3"
|
||||
HOMEPAGE="http://www.maxmind.com/app/c"
|
||||
DOWNLOAD="http://www.maxmind.com/download/geoip/api/c/GeoIP-1.4.3.tar.gz"
|
||||
MD5SUM="d364ec127a1092749d589a79001f2d8c"
|
||||
MAINTAINER="Yalla-One"
|
||||
EMAIL="yallaone@gmail.com"
|
||||
APPROVED="rworkman"
|
9
network/GeoIP/README
Normal file
9
network/GeoIP/README
Normal file
|
@ -0,0 +1,9 @@
|
|||
GeoIP - GeoIP API and database
|
||||
|
||||
GeoIP is the proprietary technology that drives MaxMind's IP
|
||||
geolocation data and services. GeoIP provides businesses with a
|
||||
non-invasive way to determine geographical and other information
|
||||
about their Internet visitors in real-time.
|
||||
|
||||
To name a few applications, GeoIP can be used for delivering
|
||||
customized content, targeted ads, and web log statistics
|
16
network/GeoIP/doinst.sh
Normal file
16
network/GeoIP/doinst.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
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...
|
||||
}
|
||||
|
||||
config etc/GeoIP.conf.default.new
|
||||
config etc/GeoIP.conf.new
|
||||
|
19
network/GeoIP/slack-desc
Normal file
19
network/GeoIP/slack-desc
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
GeoIP: GeoIP (GeoIP API and database)
|
||||
GeoIP:
|
||||
GeoIP: GeoIP is the proprietary technology that drives MaxMind's IP
|
||||
GeoIP: geolocation data and services. GeoIP provides businesses with a
|
||||
GeoIP: non-invasive way to determine geographical and other information
|
||||
GeoIP: about their Internet visitors in real-time.
|
||||
GeoIP: To name a few applications, GeoIP can be used for delivering
|
||||
GeoIP: customized content, targeted ads and web log statistics
|
||||
GeoIP:
|
||||
GeoIP: Homepage: http://www.maxmind.com/download/geoip/api/c/
|
||||
GeoIP:
|
Loading…
Reference in a new issue