mirror of
https://github.com/archlinux-jerry/pkgbuilds
synced 2024-11-21 21:40:41 +08:00
autoupdate: overture to 1.6-1 from aur
This commit is contained in:
parent
a764835363
commit
e3761ae1c6
2 changed files with 20 additions and 39 deletions
|
@ -2,15 +2,15 @@
|
||||||
# Maintainer: Maddie Zhan <maddie@emzee.be>
|
# Maintainer: Maddie Zhan <maddie@emzee.be>
|
||||||
|
|
||||||
pkgname=overture
|
pkgname=overture
|
||||||
pkgver=1.5
|
pkgver=1.6
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
pkgdesc="A DNS upstream switcher written in Go in order to purify DNS records"
|
pkgdesc="A DNS upstream switcher written in Go in order to purify DNS records"
|
||||||
arch=("i686" "x86_64" "arm" "armv6h" "armv7h" "aarch64")
|
arch=("i686" "x86_64" "arm" "armv6h" "armv7h" "aarch64")
|
||||||
url="https://github.com/shawn1m/overture"
|
url="https://github.com/shawn1m/overture"
|
||||||
license=("MIT")
|
license=("MIT")
|
||||||
provides=("overture")
|
provides=("overture")
|
||||||
optdepends=("dnsmasq: advanced DNS configuration")
|
optdepends=("dnsmasq: advanced DNS configuration")
|
||||||
makedepends=("go>=1.9")
|
makedepends=("go>=1.12")
|
||||||
backup=("etc/overture/config.json" "etc/overture/hosts" "etc/overture/china_ip_list.txt" "etc/overture/gfwlist.txt")
|
backup=("etc/overture/config.json" "etc/overture/hosts" "etc/overture/china_ip_list.txt" "etc/overture/gfwlist.txt")
|
||||||
|
|
||||||
install=${pkgname}.install
|
install=${pkgname}.install
|
||||||
|
@ -27,51 +27,24 @@ source=("git+https://github.com/shawn1m/${pkgname}.git#tag=v${pkgver}"
|
||||||
sha256sums=("SKIP"
|
sha256sums=("SKIP"
|
||||||
"82948c5f5d806b384a4eda405fba0691c8df10cd1293d116a80d427ebe802e18"
|
"82948c5f5d806b384a4eda405fba0691c8df10cd1293d116a80d427ebe802e18"
|
||||||
"107cb3b11c4a06d5a804c4375c56890fd8e2006ecd978ad76332dc480e0e1946"
|
"107cb3b11c4a06d5a804c4375c56890fd8e2006ecd978ad76332dc480e0e1946"
|
||||||
"3d630b10c18756aadc6a05e572a2e163c9e730340a5a022549181113457a0d70"
|
"e8ceec2fa23e92fc56db895b40503ed0dde6ebcb46d98b9fb43e9760515b0d7a"
|
||||||
"b9faeacafaf842f6643a81b6d85c60bf7d045132b661f787e6ced19318d4d049"
|
"b9faeacafaf842f6643a81b6d85c60bf7d045132b661f787e6ced19318d4d049"
|
||||||
"02c82a9ffce44f1517b0b64380e11ea41d15812267a0fbff97221b5a6921df50"
|
"02c82a9ffce44f1517b0b64380e11ea41d15812267a0fbff97221b5a6921df50"
|
||||||
"9529e60a7963fd284ad2afb99d28803af90f16db99a1ba662ac5c7fd52903d3f")
|
"9529e60a7963fd284ad2afb99d28803af90f16db99a1ba662ac5c7fd52903d3f")
|
||||||
|
|
||||||
_goroot="/usr/lib/go"
|
_goroot="/usr/lib/go"
|
||||||
|
|
||||||
prepare() {
|
|
||||||
export GOROOT=/usr/lib/go
|
|
||||||
|
|
||||||
rm -rf build
|
|
||||||
mkdir -p build/go
|
|
||||||
cd build/go
|
|
||||||
|
|
||||||
for f in "$GOROOT/"*; do
|
|
||||||
ln -s "$f"
|
|
||||||
done
|
|
||||||
|
|
||||||
rm -rf pkg
|
|
||||||
mkdir pkg
|
|
||||||
cd pkg
|
|
||||||
|
|
||||||
for f in "$GOROOT/pkg/"*; do
|
|
||||||
ln -s "$f"
|
|
||||||
done
|
|
||||||
|
|
||||||
export GOROOT="$srcdir/build/go"
|
|
||||||
export GOPATH="$srcdir/build"
|
|
||||||
|
|
||||||
mkdir -p "$GOPATH/src/github.com/shawn1m"
|
|
||||||
|
|
||||||
mv "$srcdir/$pkgname" $GOPATH/src/${_gourl}
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd $GOPATH/src/${_gourl}
|
GOROOT=${_goroot}
|
||||||
go get ./...
|
|
||||||
|
|
||||||
msg2 "Building overture"
|
msg2 "Building overture"
|
||||||
CGO_ENABLED=0 go build -ldflags="-w -s" -o $pkgname main/main.go
|
cd ${srcdir}/${pkgname}
|
||||||
|
[ ! -d ${srcdir}/${pkgname}/out ] && mkdir ${srcdir}/${pkgname}/out
|
||||||
|
CGO_ENABLED=1 go build -ldflags="-w -s -X main.version=${pkgver}" -trimpath -o out/${pkgname} main/main.go
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
# Binary
|
# Binary
|
||||||
install -Dm0755 "$srcdir/build/src/${_gourl}/$pkgname" "$pkgdir/usr/bin/$pkgname"
|
install -Dm0755 "$srcdir/${pkgname}/out/$pkgname" "$pkgdir/usr/bin/$pkgname"
|
||||||
|
|
||||||
# Config and other files
|
# Config and other files
|
||||||
install -Dm0644 "$srcdir/config.json" "$pkgdir/etc/overture/config.json"
|
install -Dm0644 "$srcdir/config.json" "$pkgdir/etc/overture/config.json"
|
||||||
|
@ -84,7 +57,7 @@ package() {
|
||||||
install -Dm0644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
install -Dm0644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
||||||
|
|
||||||
# License
|
# License
|
||||||
install -Dm0644 "$srcdir/build/src/${_gourl}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
|
install -Dm0644 "$srcdir/${pkgname}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
}
|
}
|
||||||
|
|
||||||
post_upgrade() {
|
post_upgrade() {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"BindAddress": ":53",
|
"BindAddress": ":53",
|
||||||
|
"DebugHTTPAddress": "127.0.0.1:5555",
|
||||||
"PrimaryDNS": [
|
"PrimaryDNS": [
|
||||||
{
|
{
|
||||||
"Name": "114DNS",
|
"Name": "114DNS",
|
||||||
|
@ -52,6 +53,9 @@
|
||||||
],
|
],
|
||||||
"OnlyPrimaryDNS": false,
|
"OnlyPrimaryDNS": false,
|
||||||
"IPv6UseAlternativeDNS": false,
|
"IPv6UseAlternativeDNS": false,
|
||||||
|
"AlternativeDNSConcurrent": false,
|
||||||
|
"PoolIdleTimeout": 15,
|
||||||
|
"PoolMaxCapacity": 15,
|
||||||
"WhenPrimaryDNSAnswerNoneUse": "PrimaryDNS",
|
"WhenPrimaryDNSAnswerNoneUse": "PrimaryDNS",
|
||||||
"IPNetworkFile": {
|
"IPNetworkFile": {
|
||||||
"Primary": "/etc/overture/china_ip_list.txt",
|
"Primary": "/etc/overture/china_ip_list.txt",
|
||||||
|
@ -59,9 +63,13 @@
|
||||||
},
|
},
|
||||||
"DomainFile": {
|
"DomainFile": {
|
||||||
"Primary": "",
|
"Primary": "",
|
||||||
"Alternative": "/etc/overture/gfwlist.txt"
|
"Alternative": "/etc/overture/gfwlist.txt",
|
||||||
|
"Matcher": "full-map"
|
||||||
|
},
|
||||||
|
"HostsFile": {
|
||||||
|
"HostsFile": "/etc/overture/hosts",
|
||||||
|
"Finder": "full-map"
|
||||||
},
|
},
|
||||||
"HostsFile": "/etc/overture/hosts",
|
|
||||||
"MinimumTTL": 0,
|
"MinimumTTL": 0,
|
||||||
"DomainTTLFile": "/etc/overture/domain_ttl.txt",
|
"DomainTTLFile": "/etc/overture/domain_ttl.txt",
|
||||||
"CacheSize": 4096,
|
"CacheSize": 4096,
|
||||||
|
|
Loading…
Reference in a new issue