mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 12:57:14 +08:00
47 lines
1.5 KiB
Bash
47 lines
1.5 KiB
Bash
# Maintainer: Michael Haesel <michael[dot]haesel[at]gmail[dot]com>
|
|
|
|
pkgname=geoip-database
|
|
pkgver=20150407
|
|
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::https://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
|
|
|
|
GeoIPv6-$pkgver.dat.gz::https://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=('fb6583b72e5f495a0c91f6ac32978ef302810f96da29a48ed71dd12a8f8ee896'
|
|
'0f390c619891f67c02f511203690ee491afe1208a17ed3139a690250dcf5f12a'
|
|
'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"
|
|
}
|