diff options
author | fokx | 2023-06-17 21:52:01 +0800 |
---|---|---|
committer | fokx | 2023-06-17 21:52:01 +0800 |
commit | 3eb46c193a9fd10c35906f6c9cdff51fb5c905e6 (patch) | |
tree | 6358f94eb380d849629eedeef119e2e0d3e8284a | |
download | aur-3eb46c193a9fd10c35906f6c9cdff51fb5c905e6.tar.gz |
init
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 39 |
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8a1b7cc89e8d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = tun2socks-git + pkgdesc = create a network interface which passes all traffic through proxy + pkgver = v2.5.1.r0.g7ab86fd + pkgrel = 1 + url = https://github.com/xjasonlyu/tun2socks + arch = x86_64 + license = GPL3 + makedepends = go + makedepends = git + makedepends = make + provides = tun2socks + conflicts = tun2socks + conflicts = tun2socks-bin + source = git+https://github.com/xjasonlyu/tun2socks + b2sums = SKIP + +pkgname = tun2socks-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7a34c2329f33 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: soh @ AUR + +pkgname=tun2socks-git +_pkgname=tun2socks +pkgver=v2.5.1.r0.g7ab86fd +pkgrel=1 +pkgdesc='create a network interface which passes all traffic through proxy' +arch=('x86_64') +url='https://github.com/xjasonlyu/tun2socks' +license=('GPL3') +depends=() +source=('git+https://github.com/xjasonlyu/tun2socks') +makedepends=('go' 'git' 'make') +optdepends=() +backup=() +b2sums=('SKIP') +provides=('tun2socks') +conflicts=('tun2socks' 'tun2socks-bin') + + +pkgver() { + cd ${srcdir}/${_pkgname} + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +build(){ + cd ${srcdir}/${_pkgname} + GO111MODULE=on CGO_ENABLED=0 go build -v \ + -buildmode=pie -trimpath -mod=readonly -modcacherw \ + -tags "full" \ + -ldflags="-s -w -extldflags=-Wl,-z,now,-z,relro" \ + -o tun2socks +} + +package(){ + cd ${srcdir}/${_pkgname} + install -Dm755 tun2socks ${pkgdir}/usr/bin/tun2socks + install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/tun2socks/LICENSE +} |