blob: 6a9ef8cca44b56880bba9fa165d38afd3207bf3c (
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
|
# Maintainer: taotieren <admin@taotieren.com>
pkgname=opengnb
pkgver=1.4.5.a
pkgrel=3
pkgdesc="GNB is open source de-centralized VPN to achieve layer3 network via p2p with the ultimate capability of NAT Traversal."
arch=(x86_64
aarch64
riscv64)
url="https://github.com/gnbdev/opengnb"
license=('GPL-3.0-or-later')
provides=(${pkgname})
conflicts=(${pkgname})
replaces=()
depends=(
bash
glibc)
optdepends=()
makedepends=(sed
libnatpmp
miniupnpc
zlib)
backup=()
options=('!makeflags')
install=
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('a68817d63dcf3e15166b52389e5bc46affcf18f910932dd8dd8eb7247eb47b9a')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
sed -i -e 's|-I./libs|-I./libs -I/usr/include|g' \
-e 's|-I./libs/miniupnpc/|-I/usr/include/miniupnpc|g' \
-e 's|-I./libs/libnatpmp | |g' \
-e 's|-I./libs/zlib | |g' \
-e 's| -pthread| -pthread -z relro -z now -z shstk|g' Makefile.linux
sed -i -e 's|sbin|bin|g' scripts/opengnb\@.service
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
make -f Makefile.linux
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make -f Makefile.linux install
install -Dm0755 bin/* -t "${pkgdir}/usr/bin/"
install -Dm0644 scripts/${pkgname}@.service -t "${pkgdir}/usr/lib/systemd/system/"
install -Dm0644 examples/node_config_example/*.conf -t "${pkgdir}/usr/share/${pkgname}/node_config_example/"
install -Dm0644 examples/node_config_example/scripts/* -t "${pkgdir}/usr/share/${pkgname}/node_config_example/scripts/"
install -Dm0644 docs/* -t "${pkgdir}/usr/share/doc/${pkgname}/docs/"
}
|