From 0c26e7ca62d33cd9c4af618c214f10e82806f962 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..f10a9f39db34 --- /dev/null +++ b/srcpkgs/v2rayA/template @@ -0,0 +1,37 @@ +# Template file for 'v2rayA' +pkgname=v2rayA +version=1.5.9.1698.1 +revision=1 +build_wrksrc="service" +build_style="go" +go_import_path="github.com/v2rayA/v2rayA" +go_ldflags="-X github.com/v2rayA/v2rayA/conf.Version=${version}" +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" + +pre_build() { + # build for i686 + # issue: https://go.dev/issue/52919 + # fix: https://go-review.googlesource.com/c/go/+/421935/ + if [ "$XBPS_MACHINE" = "i686" ]; then + CGO_CFLAGS+=" -fno-stack-protector" + fi + 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 +}