blob: 76e942c3aa116578075489c8a14d63dd0f290cf6 (
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
|
# Maintainer: Chi_Tang <me@chitang.dev>
# Maintainer: Integral <integral@member.fsf.org>
pkgname=nekoray
pkgver=4.3.5
_pkgver=${pkgver/.beta/-beta}
pkgrel=1
pkgdesc="Qt based cross-platform GUI proxy configuration manager (backend: sing-box)"
arch=('x86_64' 'aarch64' 'riscv64')
url="https://github.com/Mahdi-zarei/${pkgname}"
license=('GPL-3.0-or-later')
makedepends=('cmake' 'go' 'qt6-tools')
depends=('qt6-base' 'qt6-charts' 'protobuf' 'yaml-cpp' 'zxing-cpp' 'abseil-cpp' 'cpr')
optdepends=(
'sing-geoip-db: geoip database for NekoBox'
'sing-geosite-db: geosite database for NekoBox'
)
source=(
"${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${_pkgver}.tar.gz"
${pkgname}.{sh,desktop}
)
install="${pkgname}.install"
sha512sums=('d22dbd19860d325cb1e1108905840c1e0adf28fb5e30a7d86b0e9c0cb416af0b3035f07f398684017f69de5b6ac4d74f7c4bcc87fab942128195e45b77cf2539'
'b377f7e8c859ee0b5bc05f89e2dc6c0b8535e740e089e9afe5e5f145c38a05fccbbddfcb6eb8ced9a7478e4d9ccc3cbd3ffb6843c128189c75599c40c87737e8'
'b0cfd99d7fd038d660af275a5f2fc7f9ebfe63d6751edd6eea66a8c5350f314b6dbc9eddaa5aaed134e97087290630d369b1bdf4ad59d12868c780103b33dbed')
build() {
cd "${pkgname}-${pkgver}/"
cmake -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
cd core/server
VERSION_SINGBOX=$(go list -m -f '{{.Version}}' github.com/sagernet/sing-box)
go build -o ../../build/ \
-buildmode=pie \
-trimpath \
-ldflags "-linkmode=external -w -s -X 'github.com/sagernet/sing-box/constant.Version=${VERSION_SINGBOX}'" \
-mod=readonly \
-modcacherw \
-tags "with_clash_api,with_gvisor,with_quic,with_wireguard,with_utls,with_ech,with_dhcp"
}
package() {
install -Dm644 "${pkgname}.desktop" -t "${pkgdir}/usr/share/applications/"
install -Dm755 "${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
cd "${pkgname}-${pkgver}/"
install -Dm644 "res/public/nekobox.png" -t "${pkgdir}/usr/share/pixmaps/"
install -Dm755 build/{${pkgname},nekobox_core} -t "${pkgdir}/usr/lib/${pkgname}/"
}
|