lilac/repo/sing-geosite/PKGBUILD

33 lines
820 B
Bash
Raw Normal View History

# Maintainer: everyx <lunt.luo#gmail.com>
pkgname=sing-geosite
pkgver=20240614093027
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}"
2024-01-29 19:16:47 +00:00
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"
2024-01-29 19:16:47 +00:00
cd "rule-set"
install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/rule-set" ./*.srs
}