diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-networking/recipes-support/geoip | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-support/geoip')
7 files changed, 200 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/files/run-ptest b/meta-openembedded/meta-networking/recipes-support/geoip/files/run-ptest new file mode 100644 index 000000000..14e96191f --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/geoip/files/run-ptest @@ -0,0 +1,11 @@ +#!/bin/sh +pdir=`dirname $0` +cd ${pdir}/tests +for i in ./benchmark ./test-geoip-city ; do + ${i} 1>/dev/null 2>&1; + if [ $? == 0 ]; then + echo PASS: $i; + else + echo FAIL: $i; + fi; +done diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl/run-ptest b/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl/run-ptest new file mode 100644 index 000000000..5404c247b --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl/run-ptest @@ -0,0 +1,15 @@ +#!/bin/sh + +# The tests contain hard-coded relative paths and must be +# executed from $pdir. +# +pdir=`dirname $0` +cd ${pdir} +for i in t/*.t ; do + perl ${i} 1>/dev/null 2>&1; + if [ $? == 0 ]; then + echo PASS: $i; + else + echo FAIL: $i; + fi; +done diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.50.bb b/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.50.bb new file mode 100644 index 000000000..95147bdad --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/geoip/geoip-perl_1.50.bb @@ -0,0 +1,35 @@ +# +# Copyright (C) 2014, 2015 Wind River Systems, Inc. +# Released under the MIT license (see COPYING.MIT for the terms) +# +SUMMARY = "GeoIP perl API library to access location database" +DESCRIPTION = "perl library for country/city/organization to IP address or hostname mapping" +HOMEPAGE = "http://www.maxmind.com/app/ip-location" +SECTION = "libdevel" +LICENSE = "Artistic-1.0 | GPL-1.0+" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b7a36f55e8ba62aadd74e4f0886a405e" + +S = "${WORKDIR}/git" +SRCREV = "47f7d49bd15cfc2e5f8c0f5c4068dc8bb0e10e96" +SRC_URI = "git://github.com/maxmind/geoip-api-perl.git;protocol=https; \ + file://run-ptest \ +" + +DEPENDS += "geoip" + +inherit cpan ptest + +EXTRA_CPANFLAGS = "LIBS='-L${STAGING_LIBDIR}' INC='-I${STAGING_INCDIR}'" + + +# perl scripts and some special small data files +# +do_install_ptest () { + install -d -m 0755 ${D}${PTEST_PATH}/t/data + + install ${S}/t/*.t* ${D}${PTEST_PATH}/t + install ${S}/t/data/* ${D}${PTEST_PATH}/t/data +} + +FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/Geo/IP/.debug" + diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.11.bb b/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.11.bb new file mode 100644 index 000000000..3527d0cba --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/geoip/geoip_1.6.11.bb @@ -0,0 +1,90 @@ +SUMMARY = "C library for country/city/organization to IP address or hostname mapping" +DESCRIPTION = "GeoIP is a C library that enables the user to find the country that any IP \ +address or hostname originates from. It uses a file based database that is \ +accurate as of March 2003. This database simply contains IP blocks as keys, and \ +countries as values. This database should be more complete and accurate than \ +using reverse DNS lookups." + +HOMEPAGE = "http://dev.maxmind.com/geoip/" +SECTION = "libdevel" + +SRC_URI = "git://github.com/maxmind/geoip-api-c.git \ + http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz;apply=no;name=GeoIP-dat \ + http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz;apply=no;name=GeoIPv6-dat \ + http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz;apply=no;name=GeoLiteCity-dat \ + http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz;apply=no;name=GeoLiteCityv6-dat \ + file://run-ptest \ +" +SRCREV = "3169a8a88808c8df862e0b0355f99c738cce9f7e" + +SRC_URI[GeoIP-dat.md5sum] = "37c84ead332dda0362a5ac7b049b72d4" +SRC_URI[GeoIP-dat.sha256sum] = "79ff1099e96c2dc1c2539c9a18aaa13a9afd085cae477df60d95f1644d42bc07" + +SRC_URI[GeoIPv6-dat.md5sum] = "e75b84a4044e81d6d4484e33816bc762" +SRC_URI[GeoIPv6-dat.sha256sum] = "a009b0f21968d2868e6dd19d14f3c3b8cd60ae84a4bfc2970df34d771a04811e" + +SRC_URI[GeoLiteCity-dat.md5sum] = "4b6588d0bfe1af22e267ac90aa97f769" +SRC_URI[GeoLiteCity-dat.sha256sum] = "8a6467033a528f68b1a97de24d9d0ce86c8e8e83683820e16e433ddbd3f712f7" + +SRC_URI[GeoLiteCityv6-dat.md5sum] = "ad0cb42518af7f752499425dca0952bb" +SRC_URI[GeoLiteCityv6-dat.sha256sum] = "eda67f4204ba9fa5204a53cdb629167cca9394c712f5378bc723a8c29c0b440f" + +LICENSE = "LGPL-2.1" + +LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad \ + file://LICENSE;md5=0388276749a542b0d611601fa7c1dcc8 " + +S = "${WORKDIR}/git" + +inherit autotools + +EXTRA_OECONF = "--disable-static \ + --disable-dependency-tracking " + +do_install() { + make DESTDIR=${D} install + install -d ${D}/${datadir}/GeoIP + install ${WORKDIR}/GeoIP.dat ${D}/${datadir}/GeoIP/ + install ${WORKDIR}/GeoIPv6.dat ${D}/${datadir}/GeoIP/ + install ${WORKDIR}/GeoLiteCity.dat ${D}/${datadir}/GeoIP/ + install ${WORKDIR}/GeoLiteCityv6.dat ${D}/${datadir}/GeoIP/ + ln -s GeoLiteCity.dat ${D}${datadir}/GeoIP/GeoIPCity.dat +} + +PACKAGES =+ "${PN}-database" +FILES_${PN}-database = "" +FILES_${PN}-database += "${datadir}/GeoIP/*" + +# We cannot do much looking up without databases. +# +RDEPENDS_${PN} += "${PN}-database" + +inherit ptest + +do_configure_ptest() { + sed -i -e "s/noinst_PROGRAMS = /test_PROGRAMS = /g" \ + -e 's:SRCDIR=\\"$(top_srcdir)\\":SRCDIR=\\"$(testdir)\\":' \ + ${S}/test/Makefile.am + + if ! grep "^testdir = " ${S}/test/Makefile.am ; then + sed -e '/EXTRA_PROGRAMS = /itestdir = ${PTEST_PATH}/tests' \ + -i ${S}/test/Makefile.am + fi + + sed -i -e "s:/usr/local/share:/usr/share:g" \ + ${S}/test/benchmark.c + + sed -i -e 's:"../data/:"/usr/share/GeoIP/:g' \ + ${S}/test/test-geoip-city.c \ + ${S}/test/test-geoip-isp.c \ + ${S}/test/test-geoip-asnum.c \ + ${S}/test/test-geoip-netspeed.c \ + ${S}/test/test-geoip-org.c \ + ${S}/test/test-geoip-region.c +} + + +do_install_ptest() { + oe_runmake -C test DESTDIR=${D} install-testPROGRAMS + install ${S}/test/*.txt ${D}${PTEST_PATH}/tests +} diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/GeoIP.conf b/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/GeoIP.conf new file mode 100644 index 000000000..134cfed1f --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/GeoIP.conf @@ -0,0 +1,11 @@ +# The following UserId and LicenseKey are required placeholders: +UserId 999999 +LicenseKey 000000000000 + +# Include one or more of the following ProductIds: +# * GeoLite2-City - GeoLite 2 City +# * GeoLite2-Country - GeoLite2 Country +# * 506 - GeoLite Legacy Country +# * 517 - GeoLite Legacy ASN +# * 533 - GeoLite Legacy City +ProductIds GeoLite2-City GeoLite2-Country 506 517 533 diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/geoipupdate.cron b/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/geoipupdate.cron new file mode 100644 index 000000000..40597a856 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate-2.5.0/geoipupdate.cron @@ -0,0 +1,5 @@ +# top of crontab +MAILTO=your@email.com + +32 11 * * 4 /usr/local/bin/geoipupdate +# end of crontab diff --git a/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb b/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb new file mode 100644 index 000000000..f4eb2b799 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/geoip/geoipupdate_2.5.0.bb @@ -0,0 +1,33 @@ +SUMMARY = "Crontab entry to provide weekly updates of the GeoIP free databases." +DESCRIPTION = "update databases for GeoIP" + +HOMEPAGE = "http://dev.maxmind.com/geoip/" +SECTION = "net" + +DEPENDS = "zlib curl" + +SRC_URI = "https://github.com/maxmind/geoipupdate/releases/download/v2.5.0/geoipupdate-2.5.0.tar.gz \ + file://GeoIP.conf \ + file://geoipupdate.cron \ + " +SRC_URI[md5sum] = "28f633c49ec87ab01ad3c0fb0228a696" +SRC_URI[sha256sum] = "5119fd0e338cd083e886228b26679c64bcbaade8a815be092aecf865a610ab26" + +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "\ +file://ChangeLog.md;md5=11d2e31df0de2be3ccc3e2286c4dafcb \ +" +FILES_${PN} = "/usr/share/GeoIP \ + /etc/GeoIP.conf \ + /etc/cron.d/geoipupdate.cron \ + /usr/bin/geoipupdate \ +" +inherit autotools + +do_install_append() { + install -d ${D}/${sysconfdir} + install -d ${D}/${sysconfdir}/cron.d + install ${WORKDIR}/GeoIP.conf ${D}/${sysconfdir}/ + install ${WORKDIR}/geoipupdate.cron ${D}/${sysconfdir}/cron.d/ +} |