summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 76251366585147ea47d99ff429cc2a723215c922 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Maintainer: Chi_Tang <me@chitang.dev>
# Maintainer: Integral <integral@member.fsf.org>

pkgname=nekoray
pkgver=3.26
pkgrel=3
pkgdesc='Qt based cross-platform GUI proxy configuration manager (backend: v2ray / sing-box)'
arch=('x86_64')
url='https://matsuridayo.github.io'
license=('GPL-3.0-or-later')
makedepends=('cmake' 'git' 'ninja' 'go')
depends=(
	'qt6-base' 'qt6-svg' 'qt6-tools'
	'protobuf' 'yaml-cpp' 'zxing-cpp'
)

optdepends=(
	'v2ray-domain-list-community: geosite data for NekoRay'
	'v2ray-geoip: geoip data for NekoRay'
	# AUR
	'sing-geoip: geoip data for NekoBox'
	'sing-geosite: geosite data for NekoBox'
)

source=(
	"git+https://github.com/MatsuriDayo/${pkgname}.git#tag=${pkgver}"
	"${pkgname}.desktop"
)

sha512sums=('SKIP'
            'c8ad5a0cf5d813e1e35b827f92d526c022d529d34dd4019066b550c8f0dbdb89b0fb62e6bfc650e8c18acac826591e858eff3b2e5e6c6f5014f0f4b50f1fa88b')

build() {
	cd "${pkgname}/"
	git submodule init
	git submodule update
	bash libs/get_source.sh

	mkdir build
	cd build
	cmake -GNinja -DQT_VERSION_MAJOR=6 -DNKR_PACKAGE=ON ..
	ninja

	cd ..
	GOOS=linux GOARCH=amd64 ./libs/build_go.sh
}

package() {
	install -dm755 "${pkgdir}/usr/bin/"

	# assets
	install -Dm644 "${pkgname}.desktop" -t "${pkgdir}/usr/share/applications/"
	install -Dm644 ${pkgname}/res/public/{nekoray,nekobox}.png -t "${pkgdir}/usr/share/pixmaps/"

	# core
	install -Dm755 ${pkgname}/deployment/linux64/{nekoray,nekobox}_core -t "${pkgdir}/usr/lib/${pkgname}/"

	# app
	install -Dm755 "${pkgname}/build/${pkgname}" -t "${pkgdir}/usr/lib/${pkgname}/"

	ln -s "/usr/lib/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
}