[arch-commits] Commit in v2ray/trunk (PKGBUILD)
Felix Yan
felixonmars at archlinux.org
Thu Sep 3 09:02:34 UTC 2020
Date: Thursday, September 3, 2020 @ 09:02:34
Author: felixonmars
Revision: 697347
upgpkg: v2ray 4.27.5-2: fix service file and executable location
Modified:
v2ray/trunk/PKGBUILD
----------+
PKGBUILD | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-09-03 08:20:58 UTC (rev 697346)
+++ PKGBUILD 2020-09-03 09:02:34 UTC (rev 697347)
@@ -3,7 +3,7 @@
pkgname=v2ray
pkgver=4.27.5
-pkgrel=1
+pkgrel=2
pkgdesc="A platform for building proxies to bypass network restrictions"
arch=('x86_64')
url="https://github.com/v2fly/v2ray-core"
@@ -11,11 +11,24 @@
depends=('glibc' 'v2ray-domain-list-community' 'v2ray-geoip')
makedepends=('go' 'git')
backup=(etc/v2ray/config.json)
-source=("$pkgname-$pkgver.tar.gz::https://github.com/v2fly/v2ray-core/archive/v$pkgver.tar.gz")
-sha512sums=('f0c93458d091980d8daef95a3809c3fa05fcc23e713f1190a90d5708852d3c0998a6c20f4aa6fe56a0bdf6fcde61a595869679e6803be030d8a750a46d7508f2')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/v2fly/v2ray-core/archive/v$pkgver.tar.gz"
+ v2ray-fix-assets-tests.patch::https://github.com/v2fly/v2ray-core/pull/160.patch
+ v2ray-fix-assets-tests-again.patch::https://github.com/v2fly/v2ray-core/pull/161.patch)
+sha512sums=('f0c93458d091980d8daef95a3809c3fa05fcc23e713f1190a90d5708852d3c0998a6c20f4aa6fe56a0bdf6fcde61a595869679e6803be030d8a750a46d7508f2'
+ '744485707a3893bbb7ec7b7235aa94e2218ebaa79438e7705043f7a5bf683bf3b39186acedad76cc5c9dc0bc2df3d98a576dd13f95f8b8e1a51cc56dd1ca20f1'
+ 'a2e2860a92ad37329407afd6426ea4bd9773f3763f920dc0b2af82588a036c4b5dafb310389d446b1b2a8ee3a8ec6c5c4742d3b2096c28ec4100034afcea8d64')
+prepare() {
+ cd v2ray-core-$pkgver
+ # https://github.com/v2fly/v2ray-core/pull/160
+ # https://github.com/v2fly/v2ray-core/pull/161
+ patch -p1 -i ../v2ray-fix-assets-tests.patch
+ patch -p1 -i ../v2ray-fix-assets-tests-again.patch
+ sed -i 's|/usr/local/bin|/usr/bin|;s|/usr/local/etc|/etc|' release/config/systemd/system/*.service
+}
+
build() {
- cd "v2ray-core-$pkgver"
+ cd v2ray-core-$pkgver
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external"
export CGO_LDFLAGS="${LDFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
@@ -25,7 +38,7 @@
}
check() {
- cd "v2ray-core-$pkgver"
+ cd v2ray-core-$pkgver
go test -p 1 -tags json -v -timeout 30m v2ray.com/core/...
}
@@ -33,15 +46,8 @@
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
- sed -i -e 's|/usr/bin/v2ray/v2ray|/usr/lib/v2ray/v2ray|' \
- "$pkgdir"/usr/lib/systemd/system/v2ray.service
install -Dm644 release/config/systemd/system/v2ray at .service "$pkgdir"/usr/lib/systemd/system/v2ray at .service
- sed -i -e 's|/usr/bin/v2ray/v2ray|/usr/lib/v2ray/v2ray|' \
- "$pkgdir"/usr/lib/systemd/system/v2ray at .service
install -Dm644 release/config/*.json -t "$pkgdir"/etc/v2ray/
- install -Dm755 v2ray -t "$pkgdir"/usr/lib/v2ray/
- install -Dm755 v2ctl -t "$pkgdir"/usr/lib/v2ray/
- install -dm755 "$pkgdir"/usr/bin
- ln -s ../lib/v2ray/v2ray "$pkgdir"/usr/bin/v2ray
- ln -s ../lib/v2ray/v2ctl "$pkgdir"/usr/bin/v2ctl
+ install -Dm755 v2ray -t "$pkgdir"/usr/bin/
+ install -Dm755 v2ctl -t "$pkgdir"/usr/bin/
}
More information about the arch-commits
mailing list