From 78377430e4b5bbf50360ac6db840e60f5e0a3675 Mon Sep 17 00:00:00 2001 From: ketlrznt Date: Tue, 2 Aug 2022 12:18:59 +0800 Subject: [PATCH] add v2raya --- srcpkgs/v2raya-bin/files/v2raya-bin/run | 3 ++ srcpkgs/v2raya-bin/template | 42 +++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 srcpkgs/v2raya-bin/files/v2raya-bin/run create mode 100644 srcpkgs/v2raya-bin/template diff --git a/srcpkgs/v2raya-bin/files/v2raya-bin/run b/srcpkgs/v2raya-bin/files/v2raya-bin/run new file mode 100644 index 000000000000..ad7f4db3f469 --- /dev/null +++ b/srcpkgs/v2raya-bin/files/v2raya-bin/run @@ -0,0 +1,3 @@ +#!/bin/bash + +exec /usr/bin/v2raya --log-disable-timestamp diff --git a/srcpkgs/v2raya-bin/template b/srcpkgs/v2raya-bin/template new file mode 100644 index 000000000000..09df6a8f27e5 --- /dev/null +++ b/srcpkgs/v2raya-bin/template @@ -0,0 +1,42 @@ +# Template file for 'v2raya-bin' +pkgname=v2raya-bin +version=1.5.8.1 +revision=1 +archs="x86_64" +hostmakedepends="tar xz" +depends="v2ray>=4.37.0-1 iptables" +short_desc="A web GUI client of Project V which supports various protocols" +maintainer="ketlrznt " +license="AGPL-3.0" +homepage="https://github.com/v2rayA/v2rayA" + + +_v2raya_url="https://apt.v2raya.org/pool/main/v/v2raya" +_file_name="v2raya_${version}_amd64.deb" +distfiles="${_v2raya_url}/${_file_name}" +checksum="aa9276f063ce42a2899cce7d195c555dc87768fc79ae0ea8b5ea75a102b994a4" + +do_extract() { + mkdir -p ${DESTDIR} + ar x ${XBPS_SRCDISTDIR}/v2raya-bin-$version/$_file_name +} + + +do_install() { + + tar xf data.tar.gz -C ${DESTDIR} + + # set permission + # v2ray + chmod 755 ${DESTDIR}/usr/bin/v2raya + # desktop launcher + chmod 644 ${DESTDIR}/usr/share/applications/v2raya.desktop + # icon + chmod 755 ${DESTDIR}/usr/share/icons/hicolor/512x512/apps/v2raya.png +} + +post_install() { + vsv ${pkgname} + # remove unused systemd service + rm ${DESTDIR}/usr/lib/systemd/user/v2raya-lite.service +}