lilac/repo/sing-geoip/PKGBUILD

31 lines
779 B
Bash
Raw Normal View History

2023-05-16 05:17:51 +00:00
# Maintainer: bgme <i@bgme.me>
2023-05-14 19:36:19 +00:00
pkgname=sing-geoip
2023-05-16 05:17:51 +00:00
pkgver=20230512
2023-05-16 05:54:48 +00:00
pkgrel=2
2023-05-14 19:36:19 +00:00
pkgdesc='sing-geoip database'
arch=('any')
2023-05-16 05:17:51 +00:00
url="https://github.com/SagerNet/sing-geoip"
license=('custom:sing-geoip')
2023-05-16 05:28:04 +00:00
makedepends=('git' 'go1.19' 'jq')
2023-05-16 05:17:51 +00:00
source=("git+https://github.com/SagerNet/sing-geoip.git")
sha256sums=('SKIP')
pkgver() {
2023-05-16 05:51:58 +00:00
curl -s https://api.github.com/repos/Dreamacro/maxmind-geoip/releases/latest | jq -r ".name"
2023-05-16 05:17:51 +00:00
}
2023-05-14 19:36:19 +00:00
2023-05-16 05:17:51 +00:00
build() {
export NO_SKIP=true
cd "${srcdir}/${pkgname}"
go1.19 run -v .
}
2023-05-14 19:36:19 +00:00
package() {
2023-05-16 05:17:51 +00:00
cd "${srcdir}/${pkgname}"
install -Dm644 "geoip-cn.db" "${pkgdir}/usr/share/${pkgname}/geoip-cn.db"
install -Dm644 "geoip.db" "${pkgdir}/usr/share/${pkgname}/geoip.db"
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
2023-05-14 19:36:19 +00:00
}