[arch-commits] Commit in v2ray/repos (2 files)
Felix Yan
felixonmars at gemini.archlinux.org
Wed Sep 7 12:58:36 UTC 2022
Date: Wednesday, September 7, 2022 @ 12:58:36
Author: felixonmars
Revision: 1296077
archrelease: copy trunk to community-testing-x86_64
Added:
v2ray/repos/community-testing-x86_64/
v2ray/repos/community-testing-x86_64/PKGBUILD
(from rev 1296076, v2ray/trunk/PKGBUILD)
----------+
PKGBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
Copied: v2ray/repos/community-testing-x86_64/PKGBUILD (from rev 1296076, v2ray/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2022-09-07 12:58:36 UTC (rev 1296077)
@@ -0,0 +1,43 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: pandada8 <pandada8 at gmail.com>
+
+pkgname=v2ray
+pkgver=5.1.0
+pkgrel=1
+pkgdesc="A platform for building proxies to bypass network restrictions"
+arch=('x86_64')
+url="https://github.com/v2fly/v2ray-core"
+license=('MIT')
+depends=('glibc' 'v2ray-domain-list-community' 'v2ray-geoip')
+makedepends=('go' 'git')
+backup=(etc/v2ray/config.json)
+source=("https://github.com/v2fly/v2ray-core/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
+sha512sums=('a25d990e7f938319720e067a1de795ffc4a8a5c688cbba13be89f9c9f606181673101eb11b80ceb3fab15de67656f5d59f0d6ddc6f7c0084f496d4ad55517d6a')
+
+prepare() {
+ cd v2ray-core-$pkgver
+ sed -i 's|/usr/local/bin|/usr/bin|;s|/usr/local/etc|/etc|' release/config/systemd/system/*.service
+}
+
+build() {
+ cd v2ray-core-$pkgver
+ 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
+}
+
+check() {
+ cd v2ray-core-$pkgver
+ go test -p 1 -tags json -v -timeout 30m ./...
+}
+
+package() {
+ cd v2ray-core-$pkgver
+ 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 at .service "$pkgdir"/usr/lib/systemd/system/v2ray at .service
+ install -Dm644 release/config/*.json -t "$pkgdir"/etc/v2ray/
+ install -Dm755 v2ray -t "$pkgdir"/usr/bin/
+}
More information about the arch-commits
mailing list