diff options
Diffstat (limited to 'meta-networking/recipes-support/geoip/geoip_1.6.11.bb')
-rw-r--r-- | meta-networking/recipes-support/geoip/geoip_1.6.11.bb | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/geoip/geoip_1.6.11.bb b/meta-networking/recipes-support/geoip/geoip_1.6.11.bb new file mode 100644 index 0000000000..3527d0cba7 --- /dev/null +++ b/meta-networking/recipes-support/geoip/geoip_1.6.11.bb | |||
@@ -0,0 +1,90 @@ | |||
1 | SUMMARY = "C library for country/city/organization to IP address or hostname mapping" | ||
2 | DESCRIPTION = "GeoIP is a C library that enables the user to find the country that any IP \ | ||
3 | address or hostname originates from. It uses a file based database that is \ | ||
4 | accurate as of March 2003. This database simply contains IP blocks as keys, and \ | ||
5 | countries as values. This database should be more complete and accurate than \ | ||
6 | using reverse DNS lookups." | ||
7 | |||
8 | HOMEPAGE = "http://dev.maxmind.com/geoip/" | ||
9 | SECTION = "libdevel" | ||
10 | |||
11 | SRC_URI = "git://github.com/maxmind/geoip-api-c.git \ | ||
12 | http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz;apply=no;name=GeoIP-dat \ | ||
13 | http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz;apply=no;name=GeoIPv6-dat \ | ||
14 | http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz;apply=no;name=GeoLiteCity-dat \ | ||
15 | http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz;apply=no;name=GeoLiteCityv6-dat \ | ||
16 | file://run-ptest \ | ||
17 | " | ||
18 | SRCREV = "3169a8a88808c8df862e0b0355f99c738cce9f7e" | ||
19 | |||
20 | SRC_URI[GeoIP-dat.md5sum] = "37c84ead332dda0362a5ac7b049b72d4" | ||
21 | SRC_URI[GeoIP-dat.sha256sum] = "79ff1099e96c2dc1c2539c9a18aaa13a9afd085cae477df60d95f1644d42bc07" | ||
22 | |||
23 | SRC_URI[GeoIPv6-dat.md5sum] = "e75b84a4044e81d6d4484e33816bc762" | ||
24 | SRC_URI[GeoIPv6-dat.sha256sum] = "a009b0f21968d2868e6dd19d14f3c3b8cd60ae84a4bfc2970df34d771a04811e" | ||
25 | |||
26 | SRC_URI[GeoLiteCity-dat.md5sum] = "4b6588d0bfe1af22e267ac90aa97f769" | ||
27 | SRC_URI[GeoLiteCity-dat.sha256sum] = "8a6467033a528f68b1a97de24d9d0ce86c8e8e83683820e16e433ddbd3f712f7" | ||
28 | |||
29 | SRC_URI[GeoLiteCityv6-dat.md5sum] = "ad0cb42518af7f752499425dca0952bb" | ||
30 | SRC_URI[GeoLiteCityv6-dat.sha256sum] = "eda67f4204ba9fa5204a53cdb629167cca9394c712f5378bc723a8c29c0b440f" | ||
31 | |||
32 | LICENSE = "LGPL-2.1" | ||
33 | |||
34 | LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad \ | ||
35 | file://LICENSE;md5=0388276749a542b0d611601fa7c1dcc8 " | ||
36 | |||
37 | S = "${WORKDIR}/git" | ||
38 | |||
39 | inherit autotools | ||
40 | |||
41 | EXTRA_OECONF = "--disable-static \ | ||
42 | --disable-dependency-tracking " | ||
43 | |||
44 | do_install() { | ||
45 | make DESTDIR=${D} install | ||
46 | install -d ${D}/${datadir}/GeoIP | ||
47 | install ${WORKDIR}/GeoIP.dat ${D}/${datadir}/GeoIP/ | ||
48 | install ${WORKDIR}/GeoIPv6.dat ${D}/${datadir}/GeoIP/ | ||
49 | install ${WORKDIR}/GeoLiteCity.dat ${D}/${datadir}/GeoIP/ | ||
50 | install ${WORKDIR}/GeoLiteCityv6.dat ${D}/${datadir}/GeoIP/ | ||
51 | ln -s GeoLiteCity.dat ${D}${datadir}/GeoIP/GeoIPCity.dat | ||
52 | } | ||
53 | |||
54 | PACKAGES =+ "${PN}-database" | ||
55 | FILES_${PN}-database = "" | ||
56 | FILES_${PN}-database += "${datadir}/GeoIP/*" | ||
57 | |||
58 | # We cannot do much looking up without databases. | ||
59 | # | ||
60 | RDEPENDS_${PN} += "${PN}-database" | ||
61 | |||
62 | inherit ptest | ||
63 | |||
64 | do_configure_ptest() { | ||
65 | sed -i -e "s/noinst_PROGRAMS = /test_PROGRAMS = /g" \ | ||
66 | -e 's:SRCDIR=\\"$(top_srcdir)\\":SRCDIR=\\"$(testdir)\\":' \ | ||
67 | ${S}/test/Makefile.am | ||
68 | |||
69 | if ! grep "^testdir = " ${S}/test/Makefile.am ; then | ||
70 | sed -e '/EXTRA_PROGRAMS = /itestdir = ${PTEST_PATH}/tests' \ | ||
71 | -i ${S}/test/Makefile.am | ||
72 | fi | ||
73 | |||
74 | sed -i -e "s:/usr/local/share:/usr/share:g" \ | ||
75 | ${S}/test/benchmark.c | ||
76 | |||
77 | sed -i -e 's:"../data/:"/usr/share/GeoIP/:g' \ | ||
78 | ${S}/test/test-geoip-city.c \ | ||
79 | ${S}/test/test-geoip-isp.c \ | ||
80 | ${S}/test/test-geoip-asnum.c \ | ||
81 | ${S}/test/test-geoip-netspeed.c \ | ||
82 | ${S}/test/test-geoip-org.c \ | ||
83 | ${S}/test/test-geoip-region.c | ||
84 | } | ||
85 | |||
86 | |||
87 | do_install_ptest() { | ||
88 | oe_runmake -C test DESTDIR=${D} install-testPROGRAMS | ||
89 | install ${S}/test/*.txt ${D}${PTEST_PATH}/tests | ||
90 | } | ||