blob: 86c3075f91dd916dacceaaf6606478955fdd834c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Maintainer: everyx <lunt.luo#gmail.com>
pkgbase=sing-geoip
pkgname=(sing-geoip-db sing-geoip-rule-set)
pkgver=20250312
pkgrel=1
pkgdesc="GeoIP Database and Rule Sets for sing-box"
arch=(any)
url="https://github.com/SagerNet/$pkgbase"
license=(CC-BY-SA-4.0 GPL-3.0-or-later)
source=("${pkgver}-geoip.db::$url/releases/download/$pkgver/geoip.db"
"${pkgver}-geoip.db.sha256sum::$url/releases/download/$pkgver/geoip.db.sha256sum"
"${pkgver}-geoip-cn.db::$url/releases/download/$pkgver/geoip-cn.db"
"${pkgver}-geoip-cn.db.sha256sum::$url/releases/download/$pkgver/geoip-cn.db.sha256sum"
"${pkgver}-rule-set.tar.gz::$url/archive/refs/heads/rule-set.tar.gz")
sha256sums=('aa386889692ce57d34c84f514d0e99f9534b6ceda1bc3aa64e36e854ac8fe762'
'c5db06dd8b68ea6ac66db391e3d8d020cd22205cc1eafb272b2d6b61b7a784c0'
'72cbec92d08fa77dd875f65562a4b5d03036ad522ec5c0c4151a7d3a23f2358d'
'0392d66e88cfe11a1ed458acd2901d9334cb9e4d9a7f97a20da4150ce7c12d90'
'bf6d66113e63601ec94a35cf3b78817b9efdfee357ce456e5fe546609e883568')
prepare() {
mv ${pkgver}-geoip.db geoip.db
mv ${pkgver}-geoip-cn.db geoip-cn.db
sha256sum -c ${pkgver}-geoip.db.sha256sum
sha256sum -c ${pkgver}-geoip-cn.db.sha256sum
}
package_sing-geoip-db() {
pkgdesc="GeoIP Database for sing-box"
provides=($pkgbase)
install -dm755 "$pkgdir/usr/share/sing-box"
install -Dm644 geoip*.db "$pkgdir/usr/share/sing-box"
}
package_sing-geoip-rule-set() {
pkgdesc="GeoIP Rule Sets for sing-box"
provides=($pkgbase)
install -dm755 "$pkgdir/usr/share/sing-box/rule-set"
install -Dm644 ${pkgbase}-rule-set/geoip-*.srs "$pkgdir/usr/share/sing-box/rule-set"
install -dm755 "$pkgdir/usr/share/sing-box/$pkgname"
for _file in "$pkgdir"/usr/share/sing-box/rule-set/*; do
_rule_set=$(basename "$_file")
ln -s "/usr/share/sing-box/rule-set/$_rule_set" "$pkgdir/usr/share/sing-box/$pkgname/"
done
}
|