From abb096c998521a703a9b34f5ec32cc79ffab38d1 Mon Sep 17 00:00:00 2001 From: bgme Date: Tue, 16 May 2023 13:17:51 +0800 Subject: [PATCH] update sing-geoip sing-geosite --- repo/sing-geoip/PKGBUILD | 38 +++++++++++++++++++++--------------- repo/sing-geoip/lilac.yaml | 13 ++++++++---- repo/sing-geosite/PKGBUILD | 32 ++++++++++++++++++------------ repo/sing-geosite/lilac.yaml | 10 ++++++---- 4 files changed, 57 insertions(+), 36 deletions(-) diff --git a/repo/sing-geoip/PKGBUILD b/repo/sing-geoip/PKGBUILD index a8c70ff..7770a73 100644 --- a/repo/sing-geoip/PKGBUILD +++ b/repo/sing-geoip/PKGBUILD @@ -1,24 +1,30 @@ -# Maintainer: everyx +# Maintainer: bgme pkgname=sing-geoip -pkgver=20230112 -pkgrel=5 - +pkgver=20230512 +pkgrel=1 pkgdesc='sing-geoip database' arch=('any') -_repo="SagerNet/${pkgname}" -url="https://github.com/${_repo}" -license=('GPL3') +url="https://github.com/SagerNet/sing-geoip" +license=('custom:sing-geoip') +makedepends=('git' 'go1.19') +source=("git+https://github.com/SagerNet/sing-geoip.git") +sha256sums=('SKIP') -source=("${pkgver}.geoip-cn.db::${url}/releases/download/${pkgver}/geoip-cn.db" - "${pkgver}.geoip.db::${url}/releases/download/${pkgver}/geoip.db" - "${pkgver}.LICENSE::https://raw.githubusercontent.com/${_repo}/${pkgver}/LICENSE") -sha256sums=('c1832e5a14e532f67784c1d4acdce7d123d871f80837649300806d515f053b84' - '06155d3109b6aa6e4b6de2ef87ef372227eafb896520af7ddc353cffbcfec813' - '2f02b7486bcfa90d115c71a20437f3906b6fd5bef81c5dc0efd341399e89d0fd') +pkgver() { + curl https://api.github.com/repos/Dreamacro/maxmind-geoip/releases/latest | jq -r ".name" +} + +build() { + export NO_SKIP=true + + cd "${srcdir}/${pkgname}" + go1.19 run -v . +} package() { - install -Dm644 "${pkgver}.geoip-cn.db" "${pkgdir}/usr/share/${pkgname}/geoip-cn.db" - install -Dm644 "${pkgver}.geoip.db" "${pkgdir}/usr/share/${pkgname}/geoip.db" - install -Dm644 "${pkgver}.LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + 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" } diff --git a/repo/sing-geoip/lilac.yaml b/repo/sing-geoip/lilac.yaml index 39aba1a..91883dc 100644 --- a/repo/sing-geoip/lilac.yaml +++ b/repo/sing-geoip/lilac.yaml @@ -2,12 +2,17 @@ maintainers: - github: yingziwu email: i@bgme.me +repo_depends: + - go1.19 + build_prefix: extra-x86_64 -pre_build: aur_pre_build +pre_build: vcs_update -post_build: aur_post_build +post_build: git_pkgbuild_commit update_on: - - source: aur - aur: sing-geoip + - source: github + github: SagerNet/sing-geoip + - source: cmd + cmd: curl https://api.github.com/repos/Dreamacro/maxmind-geoip/releases/latest | jq -r ".name" diff --git a/repo/sing-geosite/PKGBUILD b/repo/sing-geosite/PKGBUILD index 635f181..2a9112a 100644 --- a/repo/sing-geosite/PKGBUILD +++ b/repo/sing-geosite/PKGBUILD @@ -1,21 +1,29 @@ # Maintainer: everyx pkgname=sing-geosite -pkgver=20230319124808 -pkgrel=4 - +pkgver=20230515070747 +pkgrel=1 pkgdesc='sing-geosite database' arch=('any') -_repo="SagerNet/${pkgname}" -url="https://github.com/${_repo}" -license=('GPL3') +url="https://github.com/SagerNet/sing-geosite" +license=('custom:sing-geosite') +makedepends=('git' 'go') +source=("git+https://github.com/SagerNet/sing-geosite.git") +sha256sums=('SKIP') -source=("${pkgver}.geosite.db::${url}/releases/download/${pkgver}/geosite.db" - "${pkgver}.LICENSE::https://raw.githubusercontent.com/${_repo}/${pkgver}/LICENSE") -sha256sums=('66794196faaf7f321e96648d5e65109c41838ff8ccf5d76733b44419133d130c' - '2f02b7486bcfa90d115c71a20437f3906b6fd5bef81c5dc0efd341399e89d0fd') +pkgver() { + curl 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() { - install -Dm644 "${pkgver}.geosite.db" "${pkgdir}/usr/share/${pkgname}/geosite.db" - install -Dm644 "${pkgver}.LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + cd "${srcdir}/${pkgname}" + install -Dm644 "geosite.db" "${pkgdir}/usr/share/${pkgname}/geosite.db" + install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/repo/sing-geosite/lilac.yaml b/repo/sing-geosite/lilac.yaml index ea82c0f..932fbef 100644 --- a/repo/sing-geosite/lilac.yaml +++ b/repo/sing-geosite/lilac.yaml @@ -4,10 +4,12 @@ maintainers: build_prefix: extra-x86_64 -pre_build: aur_pre_build +pre_build: vcs_update -post_build: aur_post_build +post_build: git_pkgbuild_commit update_on: - - source: aur - aur: sing-geosite + - source: github + github: SagerNet/sing-geosite + - source: cmd + cmd: curl https://api.github.com/repos/v2fly/domain-list-community/releases/latest | jq -r ".name"