2020-02-28 01:32:38 +00:00
|
|
|
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - remove makedepend on pandoc
|
|
|
|
# - patch to remove manual generation that uses pandoc
|
|
|
|
# - comment manual installation
|
|
|
|
|
|
|
|
pkgname=geoipupdate
|
2024-04-10 23:19:15 +00:00
|
|
|
pkgver=7.0.1
|
2023-03-16 19:37:18 +00:00
|
|
|
pkgrel=1
|
2020-02-28 01:32:38 +00:00
|
|
|
pkgdesc="Update GeoIP2 and GeoIP Legacy binary databases from MaxMind"
|
2024-04-10 23:19:15 +00:00
|
|
|
license=('Apache-2.0' 'MIT')
|
2020-02-28 01:32:38 +00:00
|
|
|
arch=('x86_64')
|
|
|
|
url="https://dev.maxmind.com/geoip/geoipupdate"
|
2020-11-02 23:58:06 +00:00
|
|
|
depends=(glibc)
|
2020-06-03 13:06:08 +00:00
|
|
|
makedepends=(go)
|
2020-02-28 01:32:38 +00:00
|
|
|
backup=(etc/GeoIP.conf)
|
|
|
|
provides=(geoip2-database)
|
|
|
|
replaces=(geoip2-database)
|
|
|
|
|
|
|
|
source=(
|
|
|
|
"https://github.com/maxmind/geoipupdate/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
|
|
|
|
"geoipupdate.service"
|
|
|
|
"geoipupdate.timer"
|
|
|
|
"0001-remove-manuals.patch"
|
|
|
|
)
|
|
|
|
|
2024-04-10 23:19:15 +00:00
|
|
|
sha256sums=('59c80ab737f128fc05e4ecdec4d84652182851dc8c8bea892022e3fc12db9101'
|
2022-10-03 12:54:52 +00:00
|
|
|
'ab2899197ea4c889b6da6e2b71bd7e50bc5aca976414aa79526d0008184e0307'
|
2020-02-28 01:32:38 +00:00
|
|
|
'ba9039ae9cc3dea4fe48480527b515cab2ad3a2f69aea5bf55f551e6895779e3'
|
|
|
|
'bac4deced8219f56e1b394986f5125a6b36864bb5e9ebf0499ec0edcba55f9ed')
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd "$srcdir/$pkgname-$pkgver"
|
|
|
|
sed -i 's/EditionIDs .*/EditionIDs GeoLite2-ASN GeoLite2-City GeoLite2-Country/' conf/GeoIP.conf.default
|
|
|
|
patch -p1 -i ../0001-remove-manuals.patch
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$srcdir/$pkgname-$pkgver"
|
|
|
|
|
|
|
|
export CONFFILE=/etc/GeoIP.conf
|
|
|
|
export DATADIR=/var/lib/GeoIP
|
|
|
|
|
|
|
|
make BUILDDIR="$srcdir/build" data
|
|
|
|
|
|
|
|
cd cmd/geoipupdate
|
2020-06-03 13:06:08 +00:00
|
|
|
go build \
|
|
|
|
-trimpath \
|
|
|
|
-buildmode=pie \
|
|
|
|
-mod=readonly \
|
|
|
|
-modcacherw \
|
|
|
|
-ldflags "-extldflags \"$LDFLAGS\" -X main.defaultConfigFile=$CONFFILE -X main.defaultDatabaseDirectory=$DATADIR -X main.version=$pkgver" \
|
|
|
|
-o "$srcdir/build/geoipupdate" \
|
|
|
|
.
|
2020-02-28 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
install -dm755 "$pkgdir/var/lib/GeoIP"
|
|
|
|
|
|
|
|
cd "$srcdir"
|
|
|
|
install -Dm644 geoipupdate.service "$pkgdir/usr/lib/systemd/system/geoipupdate.service"
|
|
|
|
install -Dm644 geoipupdate.timer "$pkgdir/usr/lib/systemd/system/geoipupdate.timer"
|
|
|
|
|
|
|
|
cd "$srcdir/build"
|
|
|
|
install -Dm755 geoipupdate "$pkgdir/usr/bin/geoipupdate"
|
2020-08-09 17:54:19 +00:00
|
|
|
install -Dm600 GeoIP.conf "$pkgdir/etc/GeoIP.conf"
|
2020-02-28 01:32:38 +00:00
|
|
|
install -Dm644 geoipupdate.md "$pkgdir/usr/share/doc/$pkgname/geoipupdate.md"
|
|
|
|
install -Dm644 GeoIP.conf.md "$pkgdir/usr/share/doc/$pkgname/GeoIP.conf.md"
|
|
|
|
#install -Dm644 geoipupdate.1 "$pkgdir/usr/share/man/man1/geoipupdate.1"
|
|
|
|
#install -Dm644 GeoIP.conf.5 "$pkgdir/usr/share/man/man5/GeoIP.conf.5"
|
|
|
|
|
|
|
|
cd "$srcdir/$pkgname-$pkgver"
|
|
|
|
install -Dm644 LICENSE-APACHE "$pkgdir/usr/share/licenses/$pkgname/LICENSE-APACHE"
|
|
|
|
install -Dm644 LICENSE-MIT "$pkgdir/usr/share/licenses/$pkgname/LICENSE-MIT"
|
|
|
|
}
|