33 lines
820 B
Bash
33 lines
820 B
Bash
# Maintainer: everyx <lunt.luo#gmail.com>
|
|
|
|
pkgname=sing-geosite
|
|
pkgver=20240426060244
|
|
pkgrel=1
|
|
pkgdesc='sing-geosite database'
|
|
arch=('any')
|
|
url="https://github.com/SagerNet/sing-geosite"
|
|
license=('custom:sing-geosite')
|
|
makedepends=('git' 'go' 'jq')
|
|
source=("git+https://github.com/SagerNet/sing-geosite.git")
|
|
sha256sums=('SKIP')
|
|
|
|
pkgver() {
|
|
curl -s https://api.github.com/repos/v2fly/domain-list-community/releases/latest | jq -r ".name"
|
|
}
|
|
|
|
build() {
|
|
export NO_SKIP=true
|
|
|
|
cd "${srcdir}/${pkgname}"
|
|
go run -v .
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/${pkgname}"
|
|
install -Dm644 "geosite.db" "${pkgdir}/usr/share/${pkgname}/geosite.db"
|
|
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
|
|
cd "rule-set"
|
|
install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/rule-set" ./*.srs
|
|
}
|