archrelease: copy trunk to community-any
[arch-community.git] / python-geoipsets / trunk / PKGBUILD
blobd530d1027ecad78b55f4355a6d88daca25917f31
1 # Maintainer: Justin Kromlinger <hashworks@archlinux.org>
3 pkgname=python-geoipsets
4 pkgver=2.3.5
5 pkgrel=2
6 pkgdesc='Tool to generate country-specific IP ranges for iptables/ipset and nftables'
7 arch=('any')
8 license=('GPL3')
9 url='https://github.com/chr0mag/geoipsets/tree/main/python'
10 depends=(
11   'python-requests'
12   'python-beautifulsoup4'
14 makedepends=(
15   'python-setuptools'
17 checkdepends=('python-pytest')
18 source=("$pkgname-$pkgver.tar.gz::https://github.com/chr0mag/geoipsets/archive/refs/tags/v${pkgver}.tar.gz")
19 sha512sums=('9a39769311b8b48a56f35e4697f5f9f872486271db748a1c580856bae323c3f19d6595095bf9d7c49f78450a95547fa69a76a013691dd4547927d13d5b2d6b21')
21 build() {
22   cd "geoipsets-$pkgver/python"
24   python setup.py build
27 check() {
28   cd "geoipsets-$pkgver/python"
30   python -m pytest
33 package() {
34   cd "geoipsets-$pkgver/python"
36   python setup.py install --root="$pkgdir" --optimize=1
38   install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README_python.md"
39   install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
40   install -Dm644 ../README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
41   install -Dm644 ../systemd/update-geoipsets.service "${pkgdir}/usr/lib/systemd/system/update-geoipsets.service"
42   install -Dm644 ../systemd/update-geoipsets.timer "${pkgdir}/usr/lib/systemd/system/update-geoipsets.timer"