added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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-or-later"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e4f3ea6e9b28af88dc0321190a1f8250"
S = "${WORKDIR}/git"
SRCREV = "4cdfdc38eca237c19c22a8b90490446ce6d970fa"
SRC_URI = "git://github.com/maxmind/geoip-api-perl.git;branch=main;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"

View File

@@ -0,0 +1,92 @@
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"
GEOIP_DATABASE_VERSION = "20181205"
SRC_URI = "git://github.com/maxmind/geoip-api-c.git;branch=main;protocol=https \
http://sources.openembedded.org/GeoIP.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoIP-dat; \
http://sources.openembedded.org/GeoIPv6.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoIPv6-dat; \
http://sources.openembedded.org/GeoLiteCity.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoLiteCity-dat; \
http://sources.openembedded.org/GeoLiteCityv6.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoLiteCityv6-dat; \
file://run-ptest \
"
SRCREV = "4b526e7331ca1d692b74a0509ddcc725622ed31a"
SRC_URI[GeoIP-dat.md5sum] = "d538e57ad9268fdc7955c6cf9a37c4a9"
SRC_URI[GeoIP-dat.sha256sum] = "b9c05eb8bfcf90a6ddfdc6815caf40a8db2710f0ce3dd48fbd6c24d485ae0449"
SRC_URI[GeoIPv6-dat.md5sum] = "52d6aa0aac1adbfa5eb7fa4742197c11"
SRC_URI[GeoIPv6.sha256sum] = "416ac92fcc35a21d5efbb32e5c88e609c37aec1aa1af6247d088b8da1af6e9bf"
SRC_URI[GeoLiteCity-dat.md5sum] = "d700c137232f8e077ac8db8577f699d9"
SRC_URI[GeoLiteCity-dat.sha256sum] = "90db2e52195e3d1bcdb2c2789209006d09de5c742812dbd9a1b36c12675ec4cd"
SRC_URI[GeoLiteCityv6-dat.md5sum] = "6734ccdc644fc0ba76eb276dce73d005"
SRC_URI[GeoLiteCityv6-dat.sha256sum] = "c95a9d2643b7f53d7abeed2114388870e13fbbad4653f450a49efa7e4b86aca4"
LICENSE = "LGPL-2.1-only"
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.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoIP.dat
install ${WORKDIR}/GeoIPv6.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoIPv6.dat
install ${WORKDIR}/GeoLiteCity.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoLiteCity.dat
install ${WORKDIR}/GeoLiteCityv6.dat.${GEOIP_DATABASE_VERSION} ${D}/${datadir}/GeoIP/GeoLiteCityv6.dat
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
}

View File

@@ -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

View File

@@ -0,0 +1,5 @@
# top of crontab
MAILTO=your@email.com
32 11 * * 4 /usr/local/bin/geoipupdate
# end of crontab

View File

@@ -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 = "GPL-2.0-only"
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/
}