lilac/repo/sing-geosite/PKGBUILD

30 lines
750 B
Bash
Raw Normal View History

# Maintainer: everyx <lunt.luo#gmail.com>
pkgname=sing-geosite
pkgver=20240101162810
pkgrel=1
pkgdesc='sing-geosite database'
arch=('any')
2023-05-16 05:17:51 +00:00
url="https://github.com/SagerNet/sing-geosite"
license=('custom:sing-geosite')
2023-11-05 01:27:28 +00:00
makedepends=('git' 'go' 'jq')
2023-05-16 05:17:51 +00:00
source=("git+https://github.com/SagerNet/sing-geosite.git")
sha256sums=('SKIP')
pkgver() {
2023-05-16 05:51:58 +00:00
curl -s https://api.github.com/repos/v2fly/domain-list-community/releases/latest | jq -r ".name"
2023-05-16 05:17:51 +00:00
}
2023-05-16 05:17:51 +00:00
build() {
export NO_SKIP=true
cd "${srcdir}/${pkgname}"
2023-11-05 01:27:28 +00:00
GOTOOLCHAIN=go1.20.10 go run -v .
2023-05-16 05:17:51 +00:00
}
package() {
2023-05-16 05:17:51 +00:00
cd "${srcdir}/${pkgname}"
install -Dm644 "geosite.db" "${pkgdir}/usr/share/${pkgname}/geosite.db"
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}