From dd83f38203f97e61d85a1b8168cdf38d0971d7bb Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 22 Sep 2014 17:58:52 +0200 Subject: [PATCH] Add recipe for libmaxminddb * This is used to query the GeoIP and GeoLite databases and get geolocation information from an IP. --- .../libmaxminddb/libmaxminddb-1.0.1.recipe | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 dev-libs/libmaxminddb/libmaxminddb-1.0.1.recipe diff --git a/dev-libs/libmaxminddb/libmaxminddb-1.0.1.recipe b/dev-libs/libmaxminddb/libmaxminddb-1.0.1.recipe new file mode 100644 index 000000000..a45bb00fc --- /dev/null +++ b/dev-libs/libmaxminddb/libmaxminddb-1.0.1.recipe @@ -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 +}