blob: 71fb6568ed291de783fa9dcfed37d4a6fc9d8a3f (
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# Maintainer: nekgem <nekgem@cock.li>
pkgname=lokinet
pkgver=0.7.1
pkgrel=1
pkgdesc="Anonymous, decentralized and IP based overlay network for the internet."
arch=('x86_64' 'aarch64')
url="https://lokinet.org"
license=('ZLIB')
depends=('libuv' 'libsodium' 'curl')
makedepends=('git' 'cmake')
install='lokinet.install'
_gitname=loki-network
source=("git+https://github.com/loki-project/$_gitname.git#tag=v$pkgver" # github archives don't embed submodules
'git+https://github.com/nlohmann/json.git'
'git+https://github.com/google/googletest.git'
'git+https://github.com/jarro2783/cxxopts.git'
'git+https://github.com/gulrak/filesystem.git'
'git+https://github.com/catchorg/Catch2'
'git+https://github.com/martinmoene/optional-lite.git'
'git+https://github.com/HowardHinnant/date.git'
'lokinet.service'
'lokinet-bootstrap.service'
'lokinet-default-config.service'
'lokinet.sysusers'
'lokinet.tmpfiles')
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'ce7f40f91c1de020466f82fb504e261e66774ef5f97a9d914dbe61236a1baf01'
'21c9bc83f8466ab17fa927561d7f24f930f97c996a8aa0fbbbbb2b65cb97b342'
'6ef779170b72856bbb8df40c34a808acffddd156684bdb66a55e71d50cf95841'
'137cf7eeebc8737d62f3ccfad2398fb1c442a91cb9db7d650429b218dd949a00'
'53837c9cfc90b93d55558045108a5d1d7a8b8a75a266af264d7f9101363d043f')
prepare() {
cd "$_gitname"
git submodule init
git config submodule.external/nlohmann.url "$srcdir"/json
git config submodule.external/googletest.url "$srcdir"/googletest
git config submodule.external/cxxopts.url "$srcdir"/cxxopts
git config submodule.external/ghc-filesystem.url "$srcdir"/filesystem
git config submodule.test/Catch2.url "$srcdir"/Catch2
git config submodule.external/optional-lite.url "$srcdir"/optional-lite
git config submodule.external/date.url "$srcdir"/date
git submodule update
}
build() {
cd "$_gitname"
rm -rf build && mkdir build && cd build
# XXX cmake stuff overrides CFLAGS
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DNATIVE_BUILD=OFF \
-DSTATIC_LINK_RUNTIME=OFF \
-DUSE_NETNS=OFF \
-DUSE_AVX2=OFF \
-DXSAN=OFF \
-DWITH_SHARED=OFF \
-DWITH_TESTS=OFF \
-DDOWNLOAD_SODIUM=OFF \
-DSUBMODULE_CHECK=OFF \
-Wno-dev \
..
make
}
package() {
cd "$_gitname"
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
cd build
make DESTDIR="$pkgdir" install
install -D -m 644 "$srcdir/lokinet.service" "$pkgdir/usr/lib/systemd/system/lokinet.service"
install -D -m 644 "$srcdir/lokinet-bootstrap.service" "$pkgdir/usr/lib/systemd/system/lokinet-bootstrap.service"
install -D -m 644 "$srcdir/lokinet-default-config.service" "$pkgdir/usr/lib/systemd/system/lokinet-default-config.service"
install -D -m 644 "$srcdir/lokinet.sysusers" "$pkgdir/usr/lib/sysusers.d/lokinet.conf"
install -D -m 644 "$srcdir/lokinet.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/lokinet.conf"
}
|