blob: ee03f384e8d3b68d216dd8192978820b97561821 (
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
|
# Maintainer: Chi_Tang <me@chitang.dev>
# Contributor: Nekoray_CI <noreply@chitang.dev>
pkgname='nekoray-git'
pkgver=4.0.beta4.r5.gadef6cd
pkgrel=1
pkgdesc='Qt based cross-platform GUI proxy configuration manager (backend: v2ray / sing-box)'
arch=('x86_64')
url='https://matsuridayo.github.io'
license=('GPL')
makedepends=('cmake' 'git' 'ninja' 'go' 'zxing-cpp')
depends=('qt5-base' 'qt5-svg' 'qt5-tools' 'qt5-x11extras' 'protobuf' 'yaml-cpp' 'sing-geoip' 'sing-geosite')
source=(
'git+https://github.com/MatsuriDayo/nekoray.git'
'nekoray.desktop'
)
sha512sums=('SKIP' 'SKIP')
pkgver() {
cd "${srcdir}/nekoray"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "${srcdir}/nekoray"
git submodule init
git submodule update
bash libs/get_source.sh
mkdir -p build
cd build
cmake -GNinja -DQT_VERSION_MAJOR=5 -DNKR_PACKAGE=ON ..
ninja
cd "${srcdir}/nekoray"
GOOS=linux GOARCH=amd64 ./libs/build_go.sh
}
package() {
mkdir -p "${pkgdir}/usr/lib/nekobox"
mkdir -p "${pkgdir}/usr/bin"
mkdir -p "${pkgdir}/usr/share/pixmaps"
mkdir -p "${pkgdir}/usr/share/applications"
# assets
cp "${srcdir}/nekoray.desktop" "${pkgdir}/usr/share/applications/nekoray.desktop"
cp -a "${srcdir}/nekoray/res/public/nekobox.png" "${pkgdir}/usr/lib/nekobox/"
ln -s "/usr/lib/nekobox/nekobox.png" "${pkgdir}/usr/share/pixmaps/nekobox.png"
# core
cp -a "${srcdir}/nekoray/deployment/linux64/nekobox_core" "${pkgdir}/usr/lib/nekobox/"
# app
cp -a "${srcdir}/nekoray/build/nekobox" "${pkgdir}/usr/lib/nekobox/"
ln -s "/usr/lib/nekobox/nekobox" "${pkgdir}/usr/bin/nekobox"
}
|