Skip to content

geoiplookup: updated to l&g database #2964

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 31 additions & 22 deletions GeoIP.be0
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
#!/usr/bin/env beesh

# BEE_VERSION GeoIP-1.4.8-2
# BEE_VERSION GeoIP-1.6.12-0

# no vars since this is the latest for all time

SRCURL[0]="/src/mariux/download/GeoIP-1.4.8.tar.gz"

PATCHURL[0]="/src/mariux/download/GeoIP-1.4.8-1-GeoLiteCity.dat.gz"

#PATCHURL[0]=""
# SRCURL[0]="/src/mariux/download/GeoIP-1.4.8.tar.gz"
# SRCURL[0]="https://github.com/maxmind/geoip-api-c/archive/v1.6.12.tar.gz"
SRCURL[0]="https://beehive.molgen.mpg.de/727e5d6df9e9fc039dbc3a323cc56d2e/v1.6.12.tar.gz"

# PATCHURL[0]="/src/mariux/download/GeoIP-1.4.8-1-GeoLiteCity.dat.gz"'

# wget "https://dl.miyuru.lk/geoip/maxmind/country/maxmind4.dat.gz"
PATCHURL+=("https://beehive.molgen.mpg.de/bac1b69ed20af58d7d3cd5996dc668dd/country-maxmind4.dat.gz GeoIP.dat.gz")
# wget "https://dl.miyuru.lk/geoip/maxmind/country/maxmind6.dat.gz"
PATCHURL+=("https://beehive.molgen.mpg.de/db5a3a163eec06a6e4cf2606b1f0ac03/country-maxmind6.dat.gz GeoIPv6.dat.gz")
# wget "https://dl.miyuru.lk/geoip/maxmind/city/maxmind.dat.gz"
PATCHURL+=("https://beehive.molgen.mpg.de/5516cba225ef9983a122a8d73d0b5411/maxmind.dat.gz GeoIPCityv6.dat.gz")
# wget "https://dl.miyuru.lk/geoip/maxmind/city/maxmind4.dat.gz"
PATCHURL+=("https://beehive.molgen.mpg.de/0d59a57a2403df3551860728c82fe280/maxmind4.dat.gz GeoIPCity.dat.gz")
# wget "https://dl.miyuru.lk/geoip/maxmind/asn/maxmind4.dat.gz"
PATCHURL+=("https://beehive.molgen.mpg.de/49cea350c4a9e63cd515af70a3103799/asn-maxmind4.dat.gz GeoIPASNum.dat.gz")
# wget https://dl.miyuru.lk/geoip/maxmind/asn/maxmind6.dat.gz"
PATCHURL+=("https://beehive.molgen.mpg.de/c39da1becbdc5cdb5d88bd08e48071f3/asn-maxmind6.dat.gz GeoIPASNumv6.dat.gz")

# BEE_CONFIGURE=compat

# BEE_BUILDTYPE=
BEE_BUILDTYPE=autotools

BEE_EXTRACT_STRIP=2
BEE_EXTRACT_STRIP=1

# EXCLUDE=()

Expand All @@ -26,37 +39,33 @@ mee_extract() {
}

mee_patch() {
# bee_patch "${@}"
# gzip --force -d -c "${F}/GeoLiteCity.dat.gz" > ${S}/GeoLiteCity.dat
gzip --force -d -c "${@}" > ${S}/GeoLiteCity.dat
for i in "${@}"; do
cp -v $i ${S}/data
done
}

mee_patch_post() {
# do NOT put downloaded patches in /usr/share/bee
unset bee_PATCHFILES
./bootstrap
}

mee_configure() {
autoreconf -i
cp -vax /usr/share/libtool/config/ltmain.sh ${S}
CFLAGS=-Wno-unused-but-set-variable \
bee_configure \
--disable-dependency-tracking \
--enable-shared=no \
--with-gnu-ld
--enable-shared=no
}

mee_build() {
grep LIBTOOL ${S}/Makefile
bee_build
}
#mee_build() {
# bee_build
#}

mee_install() {
bee_install
mkdir -p ${D}/usr/share/GeoIP
mv -v ${S}/GeoLiteCity.dat ${D}/usr/share/GeoIP/GeoIPCity.dat
cp -v ${S}/data/*.dat ${D}/usr/share/GeoIP/
rm -vrf ${D}/usr/include
rm -vrf ${D}/usr/lib
rm -vrf ${D}/etc
rm -vrf ${D}/usr/bin/geoipupdate ${D}/usr/share/man/man1/geoipupdate.1
}