diff options
author | Zordrak <slackbuilds@tpa.me.uk> | 2010-05-12 23:32:26 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-12 23:32:26 +0200 |
commit | b3441ddaad5c4882eb40c4a770807ed59ed0ebdd (patch) | |
tree | c5bfe511bc683405db6013bd64be723f4cee4bc7 /network | |
parent | dbf69b7af097d6868491f123336d7fd0d1271de0 (diff) |
network/mod_geoip2: Added to 12.2 repository
Diffstat (limited to 'network')
-rw-r--r-- | network/mod_geoip2/README | 6 | ||||
-rw-r--r-- | network/mod_geoip2/README.SLACKWARE | 21 | ||||
-rw-r--r-- | network/mod_geoip2/mod_geoip2.SlackBuild | 59 | ||||
-rw-r--r-- | network/mod_geoip2/mod_geoip2.info | 8 | ||||
-rw-r--r-- | network/mod_geoip2/slack-desc | 17 |
5 files changed, 111 insertions, 0 deletions
diff --git a/network/mod_geoip2/README b/network/mod_geoip2/README new file mode 100644 index 000000000000..3fed4a8e8d60 --- /dev/null +++ b/network/mod_geoip2/README @@ -0,0 +1,6 @@ +mod_geoip2 is an Apache 2.x module for finding the country and city +that a web request originated from. It uses the GeoIP library and +database to perform the lookup. It is free software, licensed under +the Apache license. + +mod_geoip2 requires the GeoIP C Library API. diff --git a/network/mod_geoip2/README.SLACKWARE b/network/mod_geoip2/README.SLACKWARE new file mode 100644 index 000000000000..0ad7f462259d --- /dev/null +++ b/network/mod_geoip2/README.SLACKWARE @@ -0,0 +1,21 @@ +mod_geoip README.SLACKWARE + +To enable it, edit /etc/httpd/httpd.conf to include the following: + +LoadModule geoip_module lib/httpd/modules/mod_geoip.so + +<IfModule mod_geoip.c> + GeoIPEnable Off + GeoIPEnableUTF8 On + GeoIPOutput Env + GeoIPDBFile /usr/share/GeoIP/GeoIP.dat MemoryCache +</IfModule> + +# GeoIP information is available only inside /xxx +<Location /xxx> + GeoIPEnable On +</Location> + +mod_geoip2 can be further configured through the Apache configuration file, +see /usr/doc/mod_geoip2-$VERSION/README for configuration details. + diff --git a/network/mod_geoip2/mod_geoip2.SlackBuild b/network/mod_geoip2/mod_geoip2.SlackBuild new file mode 100644 index 000000000000..937a9c3fb992 --- /dev/null +++ b/network/mod_geoip2/mod_geoip2.SlackBuild @@ -0,0 +1,59 @@ +#!/bin/sh + +# Slackware build script for mod_geoip2 (an Apache2 module for GeoIP) +# Written by Zordrak (slackbuilds@tpa.me.uk) +# Template written by Menno E. Duursma + +PRGNAM=mod_geoip2 +VERSION=1.2.5 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e # exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM +tar xvf $CWD/${PRGNAM}_${VERSION}.tar.gz +cd ${PRGNAM}_${VERSION} +chown -R root:root . +chmod -R a-s,u+w,go+r-w . + +# Create target dir +mkdir -p $PKG/usr/lib/httpd/modules + +# Compile module as DSO (dynmically shared object) +CFLAGS="$SLACKFLAGS" apxs -L/usr/lib -I/usr/include -lGeoIP -c mod_geoip.c + +# copy into place +cp -v .libs/mod_geoip.so $PKG/usr/lib/httpd/modules + +find $PKG -type f | xargs 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 Changes INSTALL README README.php $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE +find $PKG/usr/doc -type f -exec chmod 0644 {} \; + +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.tgz diff --git a/network/mod_geoip2/mod_geoip2.info b/network/mod_geoip2/mod_geoip2.info new file mode 100644 index 000000000000..befa496af910 --- /dev/null +++ b/network/mod_geoip2/mod_geoip2.info @@ -0,0 +1,8 @@ +PRGNAM="mod_geoip2" +VERSION="1.2.5" +HOMEPAGE="http://www.maxmind.com/app/mod_geoip" +DOWNLOAD="http://geolite.maxmind.com/download/geoip/api/mod_geoip2/mod_geoip2_1.2.5.tar.gz" +MD5SUM="5d35c9a9cbf47c2cb636bed26cd5fa19" +MAINTAINER="Zordrak" +EMAIL="slackbuilds@tpa.me.uk" +APPROVED="rworkman" diff --git a/network/mod_geoip2/slack-desc b/network/mod_geoip2/slack-desc new file mode 100644 index 000000000000..40048f435d69 --- /dev/null +++ b/network/mod_geoip2/slack-desc @@ -0,0 +1,17 @@ +# 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------------------------------------------------------| +mod_geoip2: mod_geoip2 (an Apache GeoIP module) +mod_geoip2: +mod_geoip2: mod_geoip2 is an Apache module for the GeoIP C Library API +mod_geoip2: that allows high performance access to GeoIP from PHP. +mod_geoip2: +mod_geoip2: mod_geoip2 is maintained by Zordrak. +mod_geoip2: +mod_geoip2: +mod_geoip2: |