Add recipe for libmaxminddb

* This is used to query the GeoIP and GeoLite databases and get
geolocation information from an IP.
This commit is contained in:
Adrien Destugues
2014-09-22 17:58:52 +02:00
parent f9729c623c
commit dd83f38203

View File

@@ -0,0 +1,66 @@
SUMMARY="Manage and use Maxmind's GeoIP databases"
DESCRIPTION="GeoIP is a database of IP addresses that allow mapping IPs to a
physical location. The GeoIP database is distributed in a specific format, and
this library is used to query the database."
HOMEPAGE="https://github.com/maxmind/libmaxminddb"
REVISION="1"
COPYRIGHT="2013-2014 Maxmind"
LICENSE="Apache v2"
ARCHITECTURES=""
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
SRC_URI="https://github.com/maxmind/libmaxminddb/releases/download/$portVersion/libmaxminddb-$portVersion.tar.gz"
CHECKSUM_SHA256="260d2d56376c156da7ddecddec55621f5f1c4c6351e1f78116b8846c42ae7bce"
PROVIDES="
libmaxminddb$secondaryArchSuffix = $portVersion
cmd:mmdblookup$secondaryArchSuffix
lib:libmaxminddb$secondaryArchSuffix = 0.0.7 compat = 0
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
PROVIDES_devel="
devel:libmaxminddb$secondaryArchSuffix = 0.0.7 compat = 0
"
REQUIRES_devel="
libmaxminddb$secondaryArchSuffix == $portVersion base
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
LDFLAGS=-lnetwork runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLib libmaxminddb
mkdir -p $developDir
mv $prefix/include $developDir/headers
packageEntries devel $developDir
}
TEST()
{
make check
}