aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e44561f8a5362d23066862a3a58291b5e22b7ad6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Maintainer: Amish <contact at via dot aur>
pkgname=xtables-geoip-db
pkgver=1.2
pkgrel=1
pkgdesc="GeoIP Database for xtables"
arch=('any')
license=('BSD' 'GPL')
url="https://dev.maxmind.com/geoip/geoip2/geolite2/"
makedepends=('perl-text-csv-xs' 'perl-net-cidr-lite')
_xtver=3.7

# create a file named geoip.license.key which contains MaxMind License key in following format:
#_maxmind_key=XXXX
source geoip.license.key

source=("GeoLite2-Country-CSV.zip::https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&suffix=zip&license_key=${_maxmind_key}"
        "xt_geoip_build::https://sourceforge.net/p/xtables-addons/xtables-addons/ci/v${_xtver}/tree/geoip/xt_geoip_build?format=raw")
sha256sums=('SKIP'
            '216cb5a8c018c9db1cbff6b8a788d71d08f1d23dbb4ae60d318fc62fab1a2b46')

package() {
    cd "${srcdir}"/GeoLite2-Country-CSV_*
    install -d -m 755 "${pkgdir}"/usr/share/xt_geoip
    perl "${srcdir}"/xt_geoip_build -D "${pkgdir}"/usr/share/xt_geoip
}