diff options
author | BigmenPixel0 | 2022-01-14 15:07:04 +0000 |
---|---|---|
committer | BigmenPixel0 | 2022-01-14 15:07:04 +0000 |
commit | 7e6049a978a60f652a00521d9f3903c3dc96bead (patch) | |
tree | 20f9fa0c0b0e0ab2cb793477f6880d2377be1a81 | |
download | aur-7e6049a978a60f652a00521d9f3903c3dc96bead.tar.gz |
feat: Add tun2socks
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 30 |
2 files changed, 42 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..09271f683f6d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,12 @@ +pkgbase = tun2socks + pkgdesc = tun2socks - powered by gVisor TCP/IP stack + pkgver = 2.3.2 + pkgrel = 1 + url = https://github.com/xjasonlyu/tun2socks + arch = any + license = GPL3 + makedepends = go + source = tun2socks-2.3.2.tar.gz::https://github.com/xjasonlyu/tun2socks/archive/v2.3.2.tar.gz + sha256sums = 87200130076b5a5cc5184f4b1b353c4bbeb36f9fca69208e0b62adcf73ec7afc + +pkgname = tun2socks diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e15238769a99 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,30 @@ +pkgname=tun2socks +pkgver=2.3.2 +pkgrel=1 +pkgdesc="tun2socks - powered by gVisor TCP/IP stack" +arch=('any') +url="https://github.com/xjasonlyu/tun2socks" +license=('GPL3') +source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") +makedepends=("go") +sha256sums=('87200130076b5a5cc5184f4b1b353c4bbeb36f9fca69208e0b62adcf73ec7afc') + +prepare() { + cd "${pkgname}-${pkgver}" + mkdir -p build/ +} + +build() { + cd "${pkgname}-${pkgver}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -o build +} + +package() { + cd "${pkgname}-${pkgver}" + install -Dm755 build/${pkgname} "${pkgdir}"/usr/bin/${pkgname} +} |