diff options
author | detiam | 2024-06-04 16:55:54 +0800 |
---|---|---|
committer | detiam | 2024-06-04 16:55:54 +0800 |
commit | d951fa830efd6df0f8fc0960791b15790062bb85 (patch) | |
tree | 499d09b32a49ee61629892566395bb720a955cf6 | |
parent | cddbda3c467d942ff5ed4b5ae1ba60c8d9b4aac3 (diff) | |
download | aur-d951fa830efd6df0f8fc0960791b15790062bb85.tar.gz |
change to my fork, default pcap build but can be switched via `_use_pcap` env ver
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 42 |
2 files changed, 26 insertions, 30 deletions
@@ -1,8 +1,8 @@ pkgbase = phantomsocks-ipv6-git pkgdesc = A cross-platform proxy client/server for Linux/Windows/macOS (resolve both ipv4 and ipv6 dns record) - pkgver = r304.2576269 + pkgver = r309.05daf2a pkgrel = 1 - url = https://github.com/macronut/phantomsocks + url = https://github.com/detiam/phantomsocks install = phantomsocks.install arch = i686 arch = x86_64 @@ -11,19 +11,17 @@ pkgbase = phantomsocks-ipv6-git makedepends = git depends = systemd depends = jq - optdepends = libpcap: you can build pcap version if you want, see PKGBUILD build() provides = phantomsocks conflicts = phantomsocks replaces = phantomsocks - source = git+https://github.com/macronut/phantomsocks.git + source = git+https://github.com/detiam/phantomsocks.git#branch=domain_as_address source = phantomsocks-init.sh source = phantomsocks.service - source = 0001-resolve-both-v4-and-v6-dns-record-default.patch - source = 0002-just-keep-random.patch sha256sums = SKIP sha256sums = 22d5545c6bb8430cd8efd1452e0647ee0d3feab0c8e775167ec291e4fba24927 sha256sums = 4602cf1421b16780aea3eef1d69ed44197efa6cbfe5e64193a127852ba71750c - sha256sums = 92c398376e015b069544a2d64d1ff898961089f1d7595f074eda34c7f1594977 - sha256sums = 31925baa7ab583f724188bd99323182dc9aef273991874028ffc3bf773dfe8d4 pkgname = phantomsocks-ipv6-git + depends = systemd + depends = jq + depends = libpcap @@ -1,12 +1,15 @@ # Maintainer: detiam <dehe_tian@outlook.com> +# pcap have more feature, but require libpcap +_use_pcap=${_use_pcap-y} + _pkgname=phantomsocks pkgname=phantomsocks-ipv6-git -pkgver=r304.2576269 +pkgver=r309.05daf2a pkgrel=1 pkgdesc="A cross-platform proxy client/server for Linux/Windows/macOS (resolve both ipv4 and ipv6 dns record)" arch=(i686 x86_64) -url="https://github.com/macronut/$_pkgname" +url="https://github.com/detiam/$_pkgname" license=('LGPL-3.0') provides=("$_pkgname") @@ -14,22 +17,15 @@ conflicts=("$_pkgname") replaces=("$_pkgname") makedepends=('go' 'git') depends=('systemd' 'jq') -optdepends=( - 'libpcap: you can build pcap version if you want, see PKGBUILD build()' -) install=$_pkgname.install source=( - "git+${url}.git" + "git+${url}.git#branch=domain_as_address" "$_pkgname-init.sh" - "$_pkgname.service" - '0001-resolve-both-v4-and-v6-dns-record-default.patch' - '0002-just-keep-random.patch') + "$_pkgname.service") sha256sums=('SKIP' '22d5545c6bb8430cd8efd1452e0647ee0d3feab0c8e775167ec291e4fba24927' - '4602cf1421b16780aea3eef1d69ed44197efa6cbfe5e64193a127852ba71750c' - '92c398376e015b069544a2d64d1ff898961089f1d7595f074eda34c7f1594977' - '31925baa7ab583f724188bd99323182dc9aef273991874028ffc3bf773dfe8d4') + '4602cf1421b16780aea3eef1d69ed44197efa6cbfe5e64193a127852ba71750c') pkgver() { cd "$_pkgname" @@ -39,22 +35,24 @@ pkgver() { ) } -prepare() { - cd "$_pkgname" - - # For ipv6 dns record resolve - patch -p1 -i '../0001-resolve-both-v4-and-v6-dns-record-default.patch' - patch -p1 -i '../0002-just-keep-random.patch' -} +#prepare() { +# cd "$_pkgname" +#} build() { cd "$_pkgname" - # Choose between them - go build -tags rawsocket - #go build -tags pcap + if [[ $_use_pcap == y ]]; then + go build -tags pcap + else + go build -tags rawsocket + fi } package() { + if [[ $_use_pcap == y ]]; then + depends+=('libpcap') + fi + install -dm755 "$pkgdir/usr/bin" install -dm755 "$pkgdir/usr/lib/systemd/user" install -dm755 "$pkgdir/usr/share/phantomsocks" |