# SliTaz package receipt.

PACKAGE="geoip"
VERSION="1.4.8"
CATEGORY="network"
SHORT_DESC="Non-DNS IP-to-country resolver C library & utils."
MAINTAINER="slaxemulator@gmail.com"
SOURCE="GeoIP"
TARBALL="$SOURCE-$VERSION.tar.gz"
WEB_SITE="http://www.maxmind.com/app/c"
WGET_URL="http://www.maxmind.com/download/geoip/api/c/$TARBALL"

DEPENDS="zlib"
BUILD_DEPENDS="zlib-dev"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	autoreconf -i
	./configure \
		--prefix=/usr \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man \
		--sysconfdir=/etc/geoip \
		$CONFIGURE_ARGS &&
	make && make DESTDIR=$DESTDIR install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/lib $fs/usr/share
	cp -a $install/usr/bin $fs/usr
	cp -a $install/etc $fs
	cp -a $install/usr/lib/*.so* $fs/usr/lib
	cp -a $install/usr/share/GeoIP $fs/usr/share
}