diff options
author | m8D2 | 2020-09-24 18:31:35 -0700 |
---|---|---|
committer | m8D2 | 2020-09-24 18:31:35 -0700 |
commit | 97f0234ce6c6c6b1637b8d453e852eefbb9a4882 (patch) | |
tree | d71565ee02ab302f781b76a0424b6b833aa159b4 | |
parent | 461110e0b0be82ab6a7d568ea32bdb4d13636bb5 (diff) | |
download | aur-97f0234ce6c6c6b1637b8d453e852eefbb9a4882.tar.gz |
updated source url and matched repo PKGBUILD
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 68 |
2 files changed, 32 insertions, 50 deletions
@@ -1,13 +1,11 @@ pkgbase = v2ray-git pkgdesc = A set of network tools that help you to build your own computer network (git version). - pkgver = 4.20.0.r22.ge9f53059 - pkgrel = 2 - url = https://github.com/v2ray/v2ray-core + pkgver = 4.28.2.r25.g73311d10 + pkgrel = 1 + url = https://github.com/v2fly/v2ray-core arch = x86_64 license = MIT - makedepends = go-pie - makedepends = golang-golang-x-crypto - makedepends = golang-golang-x-net + makedepends = go makedepends = git depends = glibc depends = v2ray-domain-list-community @@ -15,10 +13,8 @@ pkgbase = v2ray-git provides = v2ray conflicts = v2ray backup = etc/v2ray/config.json - source = v2ray-git::git+https://github.com/v2ray/v2ray-core.git - source = v2ray.service + source = v2ray-git::git+https://github.com/v2fly/v2ray-core.git sha512sums = SKIP - sha512sums = 37efc20ef71147f4400eba2bf57766462b5803b5952768bd32d5224f35e37c9c5639aaa19e0f3b63b52063dafd0381f40e2bfbb60dace08b055f0b3245cfa2b7 pkgname = v2ray-git @@ -1,70 +1,56 @@ # Maintainer: m8D2 <omui (at) proton mail (dot) com> -# Maintainer: Dct Mei <dctxmei@gmail.com> -# Maintainer: Felix Yan <felixonmars@archlinux.org> +# Contributor: Dct Mei <dctxmei@gmail.com> +# Contributor: Felix Yan <felixonmars@archlinux.org> # Contributor: pandada8 <pandada8@gmail.com> pkgname=v2ray-git -pkgver=4.20.0.r22.ge9f53059 -pkgrel=2 +pkgver=4.28.2.r25.g73311d10 +pkgrel=1 pkgdesc="A set of network tools that help you to build your own computer network (git version)." arch=(x86_64) -url="https://github.com/v2ray/v2ray-core" +url="https://github.com/v2fly/v2ray-core" license=(MIT) depends=(glibc v2ray-domain-list-community v2ray-geoip) -makedepends=(go-pie golang-golang-x-crypto golang-golang-x-net git) +makedepends=(go git) backup=(etc/v2ray/config.json) provides=(v2ray) conflicts=(v2ray) -source=("$pkgname::git+$url.git" - 'v2ray.service') -sha512sums=('SKIP' - '37efc20ef71147f4400eba2bf57766462b5803b5952768bd32d5224f35e37c9c5639aaa19e0f3b63b52063dafd0381f40e2bfbb60dace08b055f0b3245cfa2b7') +source=("$pkgname::git+$url.git") +sha512sums=('SKIP') prepare() { - export GOPATH="$srcdir/build:/usr/share/gocode" - mkdir -p "$srcdir"/build/src/v2ray.com - - # mv *.com *.io *.org *.net "$srcdir"/build/src/ - mv $pkgname "$srcdir"/build/src/v2ray.com/core - - # Future makedepends - go get github.com/golang/protobuf/proto go.starlark.net/starlark go.starlark.net/syntax \ - google.golang.org/grpc - - # Future checkdepends - go get github.com/golang/mock/gomock github.com/google/go-cmp/cmp \ - golang.org/x/sync/errgroup github.com/miekg/dns h12.io/socks + cd "$srcdir"/$pkgname + sed -i 's|/usr/local/bin|/usr/bin|;s|/usr/local/etc|/etc|' release/config/systemd/system/*.service } - pkgver() { - # $pkgname was moved in prepare(), so need to enter new directory - cd "$srcdir"/build/src/v2ray.com/core + cd "$pkgname" # cutting off 'v' prefix that presents in the git tag git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { - go build -o v2ray v2ray.com/core/main - go build -o v2ctl v2ray.com/core/infra/control/main + cd "$srcdir"/$pkgname + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external" + export CGO_LDFLAGS="${LDFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + go build -o v2ray ./main + go build -o v2ctl ./infra/control/main } check() { - cd "$srcdir"/build/src/v2ray.com/core - go test -p 1 -tags json -v -timeout 30m v2ray.com/core/... + cd "$srcdir"/$pkgname + go test -p 1 -tags json -v -timeout 30m v2ray.com/core/... } package() { - cd "$srcdir"/build/src/v2ray.com/core - install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/v2ray/LICENSE - install -Dm644 release/config/systemd/v2ray.service "$pkgdir"/usr/lib/systemd/system/v2ray.service - sed -i -e '/ExecStart/i Environment=V2RAY_LOCATION_ASSET=/etc/v2ray' \ - -e 's|/usr/bin/v2ray/v2ray|/usr/bin/v2ray|' \ - "$pkgdir"/usr/lib/systemd/system/v2ray.service - install -Dm644 release/config/*.json -t "$pkgdir"/etc/v2ray/ - install -Dm755 "$srcdir"/v2ray -t "$pkgdir"/usr/bin/ - install -Dm755 "$srcdir"/v2ctl -t "$pkgdir"/usr/bin/ - - install -Dm644 "$srcdir"/v2ray.service "$pkgdir"/usr/lib/systemd/system/v2ray@.service + cd "$srcdir"/$pkgname + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/v2ray/LICENSE + install -Dm644 release/config/systemd/system/v2ray.service "$pkgdir"/usr/lib/systemd/system/v2ray.service + install -Dm644 release/config/systemd/system/v2ray@.service "$pkgdir"/usr/lib/systemd/system/v2ray@.service + install -Dm644 release/config/*.json -t "$pkgdir"/etc/v2ray/ + install -Dm755 v2ray -t "$pkgdir"/usr/bin/ + install -Dm755 v2ctl -t "$pkgdir"/usr/bin/ } |