mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 14:47:17 +08:00
46 lines
1.5 KiB
Bash
46 lines
1.5 KiB
Bash
|
# Maintainer: Michael Haesel <michael[dot]haesel[at]gmail[dot]com>
|
||
|
|
||
|
pkgname=geoip-database
|
||
|
pkgver=20120908
|
||
|
pkgrel=1
|
||
|
pkgdesc="GeoLite country geolocation database compiled by MaxMind"
|
||
|
arch=('any')
|
||
|
url="http://www.maxmind.com/app/ip-location"
|
||
|
license=('custom:OPEN DATA LICENSE')
|
||
|
source=("GeoIP-${pkgver}.dat.gz::http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz"
|
||
|
"GeoIPv6-${pkgver}.dat.gz::http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz"
|
||
|
"http://geolite.maxmind.com/download/geoip/database/LICENSE.txt")
|
||
|
noextract=("GeoIP-${pkgver}.dat.gz"
|
||
|
"GeoIPv6-${pkgver}.dat.gz")
|
||
|
sha256sums=('a7ba72cf0232e61bd8e1061d2233d78a308b892e7347d4700b4015fb54a72266'
|
||
|
'8cd13fddb0d627c9c8ae09746a1770af580097b245c5607cdf794cd25798075f'
|
||
|
'83a4cb82ef8953c0107886b49bc39fcf77590a222d30e778d48f5d92f5b5e383')
|
||
|
|
||
|
build() {
|
||
|
cd "${srcdir}"
|
||
|
|
||
|
for _database_name in GeoIP GeoIPv6; do
|
||
|
gunzip -c ${_database_name}-${pkgver}.dat.gz >${_database_name}.dat
|
||
|
done
|
||
|
}
|
||
|
|
||
|
check() {
|
||
|
cd "${srcdir}"
|
||
|
|
||
|
for _database in {GeoIP,GeoIPv6}.dat; do
|
||
|
if ! grep -q 'MaxMind Inc All Rights Reserved' ${_database}; then
|
||
|
error "Copyright notice is missing from ${_database}; something is fishy!"
|
||
|
return 1
|
||
|
fi
|
||
|
done
|
||
|
}
|
||
|
|
||
|
package() {
|
||
|
cd "${srcdir}"
|
||
|
|
||
|
install -d "${pkgdir}/usr/share/GeoIP"
|
||
|
install -m0644 -t "${pkgdir}/usr/share/GeoIP" GeoIP.dat GeoIPv6.dat
|
||
|
|
||
|
install -Dm0644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
|
||
|
}
|