From 2773dd291eef9014573f1f544a34006da70e5042 Mon Sep 17 00:00:00 2001 From: ketlrznt Date: Mon, 8 Aug 2022 10:19:39 +0800 Subject: [PATCH] add package: v2raya --- srcpkgs/v2raya/files/v2raya/run | 6 ++++++ srcpkgs/v2raya/template | 37 +++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 srcpkgs/v2raya/files/v2raya/run create mode 100644 srcpkgs/v2raya/template diff --git a/srcpkgs/v2raya/files/v2raya/run b/srcpkgs/v2raya/files/v2raya/run new file mode 100644 index 000000000000..fd6527ed7096 --- /dev/null +++ b/srcpkgs/v2raya/files/v2raya/run @@ -0,0 +1,6 @@ +#!/bin/sh + +export XDG_DATA_HOME="/usr/share" + +exec /usr/bin/v2rayA + diff --git a/srcpkgs/v2raya/template b/srcpkgs/v2raya/template new file mode 100644 index 000000000000..c974d5067b2b --- /dev/null +++ b/srcpkgs/v2raya/template @@ -0,0 +1,37 @@ +# Template file for 'v2raya' +pkgname=v2raya +version=1.5.9.1698.1 +revision=1 +wrksrc="v2rayA-${version}" +build_wrksrc="service" +build_style="go" +go_import_path="github.com/v2rayA/v2rayA" +go_ldflags="-X github.com/v2rayA/v2rayA/conf.Version=${version} -s -w" +hostmakedepends="nodejs yarn" +depends="v2ray>=4.37.0_1" +short_desc="Web GUI client of Project V which supports various protocals" +maintainer="ketlrznt " +license="AGPL-3.0-only" +homepage="https://github.com/v2rayA/v2rayA" +distfiles="https://github.com/v2rayA/v2rayA/archive/v${version}.tar.gz" +checksum="247a357230c616bf48309c61d119686e4ad56939c05afef584c45051e9dc6220" + +# build for i686 +# issue: https://go.dev/issue/52919 +# fix: https://go-review.googlesource.com/c/go/+/421935/ +export CGO_CFLAGS="-fno-stack-protector" + +pre_build() { + cd ${wrksrc}/gui + yarn --check-files + OUTPUT_DIR="${wrksrc}/service/server/router/web" yarn build +} + +post_install() { + cd ${wrksrc} + vinstall install/universal/v2raya.desktop 0644 usr/share/applications + vsv v2raya + vinstall gui/public/img/icons/android-chrome-512x512.png \ + 0644 usr/share/icons/hicolor/512x512/apps/ v2raya.png + vlicense LICENSE +}