Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Nekoray
@ 2024-02-19 10:26 nuckle
  2024-02-19 12:41 ` New package: nekoray 3.26 slymattz
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: nuckle @ 2024-02-19 10:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

There is a new pull request by nuckle against master on the void-packages repository

https://github.com/nuckle/void-packages nekoray
https://github.com/void-linux/void-packages/pull/48831

Nekoray
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**


<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (`x86_64-glibc`)

A patch file from https://github.com/void-linux/void-packages/pull/48831.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nekoray-48831.patch --]
[-- Type: text/x-diff, Size: 6340 bytes --]

From 778bdc1f8ebdbc95b1c8c0218030d4a86fe55159 Mon Sep 17 00:00:00 2001
From: Nuckle <coil@itscat.org>
Date: Mon, 19 Feb 2024 13:24:44 +0300
Subject: [PATCH 1/3] New package: nekoray-3.26

---
 srcpkgs/nekoray/files/nekoray.desktop  |  9 ++++
 srcpkgs/nekoray/patches/protobuf.patch | 11 +++++
 srcpkgs/nekoray/template               | 65 ++++++++++++++++++++++++++
 3 files changed, 85 insertions(+)
 create mode 100644 srcpkgs/nekoray/files/nekoray.desktop
 create mode 100644 srcpkgs/nekoray/patches/protobuf.patch
 create mode 100644 srcpkgs/nekoray/template

diff --git a/srcpkgs/nekoray/files/nekoray.desktop b/srcpkgs/nekoray/files/nekoray.desktop
new file mode 100644
index 0000000000000..19414f8bc825a
--- /dev/null
+++ b/srcpkgs/nekoray/files/nekoray.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=NekoRay
+Comment=NekoRay
+Exec=nekoray
+Icon=nekoray
+Terminal=false
+StartupWMClass=NekoRay,nekoray,Nekoray,nekoRay
+Type=Application
+Categories=Network
diff --git a/srcpkgs/nekoray/patches/protobuf.patch b/srcpkgs/nekoray/patches/protobuf.patch
new file mode 100644
index 0000000000000..ec68cd6537f7c
--- /dev/null
+++ b/srcpkgs/nekoray/patches/protobuf.patch
@@ -0,0 +1,11 @@
+Makes cmake compatible with Void's version of Protobuf
+--- a/nekoray/cmake/myproto.cmake	
++++ b/nekoray/cmake/myproto.cmake
+@@ -1,4 +1,6 @@
+-find_package(Protobuf CONFIG REQUIRED)
++include(FindProtobuf)
++find_package(Protobuf REQUIRED)
++INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR})
+ 
+ set(PROTO_FILES
+         go/grpc_server/gen/libcore.proto
diff --git a/srcpkgs/nekoray/template b/srcpkgs/nekoray/template
new file mode 100644
index 0000000000000..1f00f32e36829
--- /dev/null
+++ b/srcpkgs/nekoray/template
@@ -0,0 +1,65 @@
+# Template file for 'nekoray'
+pkgname=nekoray
+version=3.26
+revision=1
+archs="x86_64 aarch64"
+build_style=cmake
+configure_args="-DQT_VERSION_MAJOR=6 -DNKR_PACKAGE=ON"
+hostmakedepends="cmake ninja go git protobuf"
+makedepends="qt6-tools qt6-base-devel qt6-svg-devel
+ protobuf-devel yaml-cpp-devel zxing-cpp-devel"
+depends="sing-geoip sing-geosite"
+short_desc="Qt based cross-platform GUI proxy configuration manager (v2ray/sing-box)"
+maintainer="Nuckle <coil@itscat.org>"
+license="GPL-3.0-or-later, LGPL-3.0-or-later"
+homepage="https://matsuridayo.github.io"
+changelog="https://github.com/MatsuriDayo/nekoray/releases"
+checksum=21977bc7f8e732b5e171a0f4e099050228815a3ca49582056060bff5023e5a20
+build_wrksrc="${pkgname}"
+
+do_fetch() {
+	git clone \
+		--branch ${version} \
+		https://github.com/MatsuriDayo/${pkgname}.git ${wrksrc}/${pkgname}
+	ls -l
+	cd ${wrksrc}/${pkgname}
+	git submodule init
+	git submodule update
+}
+
+do_extract() {
+	: # submodule not in tarball
+}
+
+do_build() {
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64) ARCH='amd64' ;;
+		aarch64) ARCH='arm64' ;;
+	esac
+
+	cd ${wrksrc}/${pkgname}
+	bash libs/get_source.sh
+	cd build
+	cmake -GNinja ${configure_args} ..
+	ninja
+	cd ${wrksrc}/${pkgname}
+	GOOS=linux GOARCH=${ARCH} ./libs/build_go.sh
+}
+
+do_clean() {
+	go clean -modcache
+}
+
+do_install() {
+	vmkdir usr/lib/nekoray
+	vcopy ${wrksrc}/${pkgname}/deployment/linux*/nekobox_core usr/lib/nekoray
+	vcopy ${wrksrc}/${pkgname}/deployment/linux*/nekoray_core usr/lib/nekoray
+
+	vmkdir usr/bin
+	vcopy ${wrksrc}/${pkgname}/build/nekoray usr/lib/nekoray
+	ln -sf /usr/lib/nekoray/nekoray ${DESTDIR}/usr/bin/
+
+	vinstall ${wrksrc}/${pkgname}/res/public/nekoray.png 644 usr/share/pixmaps
+	vinstall ${wrksrc}/${pkgname}/res/public/nekobox.png 644 usr/share/pixmaps
+	vinstall ${FILESDIR}/nekoray.desktop 644 usr/share/applications
+}

From 32cfce6fe7a757bca9025015ecda5914bcb0598e Mon Sep 17 00:00:00 2001
From: Nuckle <coil@itscat.org>
Date: Mon, 19 Feb 2024 13:25:27 +0300
Subject: [PATCH 2/3] New package: sing-geoip-20240212

---
 srcpkgs/sing-geoip/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/sing-geoip/template

diff --git a/srcpkgs/sing-geoip/template b/srcpkgs/sing-geoip/template
new file mode 100644
index 0000000000000..031e76f1bd96d
--- /dev/null
+++ b/srcpkgs/sing-geoip/template
@@ -0,0 +1,26 @@
+# Template file for 'sing-geoip'
+pkgname=sing-geoip
+version=20240212
+revision=1
+build_style=meta
+hostmakedepends="go"
+short_desc="Geoip database and rule sets for sing-box"
+maintainer="Nuckle <coil@itscat.org>"
+license="GPL-3.0-or-later, LGPL-3.0-or-later"
+homepage="https://github.com/SagerNet/sing-geoip"
+changelog="https://github.com/SagerNet/sing-geoip/releases"
+distfiles="https://github.com/SagerNet/sing-geoip/archive/refs/tags/${version}.tar.gz"
+checksum=9c45705de8bff9ac875a332e5b2dc26b5658414f2da75b69e7e306931e6c1308
+
+do_build() {
+	cd ${wrksrc}
+	NO_SKIP=true go run -modcacherw -v .
+}
+
+do_install() {
+	vmkdir usr/share/sing-geoip
+	vmkdir usr/share/sing-geoip/rule-set
+
+	vcopy ${wrksrc}/rule-set/* usr/share/sing-geoip/rule-set
+	vcopy ${wrksrc}/*.db usr/share/sing-geoip
+}

From 2930a69aa1d7d14e67cda48eec777d4383da761e Mon Sep 17 00:00:00 2001
From: Nuckle <coil@itscat.org>
Date: Mon, 19 Feb 2024 13:25:52 +0300
Subject: [PATCH 3/3] New package: sing-geosite-20240217140518

---
 srcpkgs/sing-geosite/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/sing-geosite/template

diff --git a/srcpkgs/sing-geosite/template b/srcpkgs/sing-geosite/template
new file mode 100644
index 0000000000000..3c45ffb5367e8
--- /dev/null
+++ b/srcpkgs/sing-geosite/template
@@ -0,0 +1,26 @@
+# Template file for 'sing-geosite'
+pkgname=sing-geosite
+version=20240217140518
+revision=1
+build_style=meta
+hostmakedepends="go"
+short_desc="Geosite database and rule sets for sing-box"
+maintainer="Nuckle <coil@itscat.org>"
+license="GPL-3.0-or-later, LGPL-3.0-or-later"
+homepage="https://github.com/SagerNet/sing-geosite"
+changelog="https://github.com/SagerNet/sing-geosite/releases"
+distfiles="https://github.com/SagerNet/sing-geosite/archive/refs/tags/${version}.tar.gz"
+checksum=44f065601e89918dd4746f5d18756de1bceea3ea1b309d6a05e6eaeeee476c59
+
+do_build() {
+	cd ${wrksrc}
+	NO_SKIP=true go run -modcacherw -v .
+}
+
+do_install() {
+	vmkdir usr/share/sing-geosite
+	vmkdir usr/share/sing-geosite/rule-set
+
+	vcopy ${wrksrc}/rule-set/* usr/share/sing-geosite/rule-set
+	vcopy ${wrksrc}/*.db usr/share/sing-geosite
+}

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2024-02-28 20:11 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19 10:26 [PR PATCH] Nekoray nuckle
2024-02-19 12:41 ` New package: nekoray 3.26 slymattz
2024-02-19 13:31 ` nuckle
2024-02-19 13:33 ` nuckle
2024-02-19 13:38 ` nuckle
2024-02-19 13:46 ` slymattz
2024-02-19 13:48 ` slymattz
2024-02-19 13:49 ` chrysos349
2024-02-19 13:58 ` chrysos349
2024-02-19 14:29 ` nuckle
2024-02-19 19:54 ` [PR PATCH] [Updated] " nuckle
2024-02-19 19:55 ` nuckle
2024-02-19 21:34 ` nuckle
2024-02-19 22:30 ` nuckle
2024-02-20  7:08 ` nuckle
2024-02-20  7:25 ` [PR REVIEW] " chrysos349
2024-02-20  7:34 ` [PR PATCH] [Updated] " nuckle
2024-02-20  8:11 ` nuckle
2024-02-20  8:15 ` nuckle
2024-02-20  8:20 ` nuckle
2024-02-28 20:01 ` nuckle
2024-02-28 20:04 ` nuckle
2024-02-28 20:11 ` nuckle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).