45 lines
1.2 KiB
Bash

# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Contributor: frank AT apsu DOT be
pkgname=(libmaxminddb mmdblookup)
pkgver=1.10.0
pkgrel=1
pkgdesc="MaxMind GeoIP2 database - split package with library and utilities"
license=('Apache-2.0')
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://dev.maxmind.com/geoip/geoip2/downloadable/"
optdepends=('geoip2-database: IP geolocation databases')
source=("https://github.com/maxmind/libmaxminddb/releases/download/$pkgver/libmaxminddb-$pkgver.tar.gz")
sha256sums=('5e6db72df423ae225bfe8897069f6def40faa8931f456b99d79b8b4d664c6671')
build() {
cd "$srcdir"/libmaxminddb-$pkgver
./configure --prefix=/usr
make
}
check() {
cd "$srcdir"/libmaxminddb-$pkgver
make check
}
package_libmaxminddb() {
pkgdesc="MaxMindDB GeoIP2 database library"
depends=('glibc')
cd "$srcdir"/libmaxminddb-$pkgver
make PREFIX=/usr DESTDIR="$pkgdir" install
rm -rf "$pkgdir"/usr/{bin,share/man/man1}
}
package_mmdblookup() {
pkgdesc="MaxMindDB GeoIP2 lookup utility"
depends=('libmaxminddb')
cd "$srcdir"/libmaxminddb-$pkgver
make PREFIX=/usr DESTDIR="$pkgdir" install
rm -rf "$pkgdir"/usr/{lib,include,share/man/man3}
}