diff options
Diffstat (limited to 'contrib/packages/arch/gnunet-git/PKGBUILD')
-rw-r--r-- | contrib/packages/arch/gnunet-git/PKGBUILD | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/contrib/packages/arch/gnunet-git/PKGBUILD b/contrib/packages/arch/gnunet-git/PKGBUILD new file mode 100644 index 000000000..17d7e057f --- /dev/null +++ b/contrib/packages/arch/gnunet-git/PKGBUILD | |||
@@ -0,0 +1,122 @@ | |||
1 | # Maintainer: grufo <madmurphy333 AT gmail DOT com> | ||
2 | # Contributor: redfish <redfish AT galactica DOT pw> | ||
3 | # Contributor: kertase <kertase AT gmail DOT com> | ||
4 | # Contributor: Sergej Pupykin <pupykin DOT s+arch AT gmail.com> | ||
5 | # Contributor: wahnby <wahnby AT yahoo DOT fr> | ||
6 | |||
7 | _appname='gnunet' | ||
8 | pkgname="${_appname}-git" | ||
9 | pkgver=0.17.6.r4.g7bf2f8f59 | ||
10 | pkgrel=1 | ||
11 | pkgdesc='A framework for secure peer-to-peer networking' | ||
12 | arch=('i686' 'x86_64') | ||
13 | url="http://${_appname}.org" | ||
14 | license=('AGPL') | ||
15 | conflicts=("${_appname}" "${_appname}-bin") | ||
16 | provides=("${_appname}") | ||
17 | depends=('brotli' 'gettext' 'gnutls' 'iptables' 'jansson' 'libcurl-gnutls' | ||
18 | 'libextractor' 'libgcrypt' 'libidn2' 'libmicrohttpd' 'libsodium' | ||
19 | 'libtool' 'libunistring' 'miniupnpc' 'nss' 'openssl' 'sqlite' 'which' | ||
20 | 'zlib') | ||
21 | makedepends=('bluez-libs' 'gettext' 'git' 'libpulse' 'libtool' 'opus' | ||
22 | 'pkgconfig' 'postgresql' 'python' 'python-sphinx' | ||
23 | 'python-sphinx_rtd_theme' 'recutils') | ||
24 | optdepends=('bluez: for bluetooth transport' | ||
25 | 'gnunet-gtk: for handling the gnunet:// URI scheme' | ||
26 | 'jose: for re:claimID OpenID Connect plugin' | ||
27 | 'libogg: for conversation service' | ||
28 | 'libpabc: for re:claimID zero-knowledge privacy credentials' | ||
29 | 'libpulse: for conversation service' | ||
30 | 'mysql: for an alternative to sqlite in the database plugin' | ||
31 | 'opus: for conversation service' | ||
32 | 'postgresql: for an alternative to sqlite in the database plugin' | ||
33 | 'python: for test suite' | ||
34 | 'texi2mdoc: for automatic mdoc generation' | ||
35 | 'texinfo: for building the documentation' | ||
36 | 'texlive-core: for generating GNS business cards via gnunet-bcd' | ||
37 | 'zbar: for reading/writing QR codes using gnunet-qr') | ||
38 | backup=("etc/${_appname}.conf") | ||
39 | source=("git+https://git.${_appname}.org/${_appname}.git" | ||
40 | "${_appname}-system.service" | ||
41 | "${_appname}.sysusers" | ||
42 | "${_appname}.tmpfiles" | ||
43 | "${_appname}-user.conf" | ||
44 | "${_appname}-user.service") | ||
45 | install="${_appname}.install" | ||
46 | sha256sums=('SKIP' | ||
47 | '163818b89beddcaf78937daba5bdf0ae060b2975de0731aa13d1ccdd813cf262' | ||
48 | '66299dbbdd0219d2f5f0520e69fc094f38f789724d973c2f63a421257ea4f755' | ||
49 | '5c34e1ecc6208900426f8e399e8c3edbef12cce19eba605fd7364ddb3547d9f0' | ||
50 | '3f17b9ed2c1f8cc0f919fe477df99678c17778a31f1eeb56517e285e3cef30f2' | ||
51 | '60caee20b53bcc69522556b35ac3d35d89e28c49b9a22a2ed5121df4a2c33be5') | ||
52 | |||
53 | pkgver() { | ||
54 | |||
55 | cd "${_appname}" > /dev/null 2>&1 | ||
56 | git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' | ||
57 | |||
58 | } | ||
59 | |||
60 | prepare() { | ||
61 | |||
62 | cd "${srcdir}/${_appname}" | ||
63 | |||
64 | export GNUNET_PREFIX='/usr/lib' | ||
65 | ./bootstrap | ||
66 | |||
67 | } | ||
68 | |||
69 | build() { | ||
70 | |||
71 | cd "${srcdir}/${_appname}" | ||
72 | |||
73 | ./configure --prefix='/usr' --enable-experimental | ||
74 | make | ||
75 | make -C contrib | ||
76 | |||
77 | } | ||
78 | |||
79 | package() { | ||
80 | |||
81 | cd "${srcdir}/${_appname}" | ||
82 | |||
83 | make DESTDIR="${pkgdir}" install | ||
84 | make DESTDIR="${pkgdir}" -C contrib install | ||
85 | |||
86 | install -dm755 "${pkgdir}/usr/lib/systemd/system" | ||
87 | install -Dm644 "${srcdir}/${_appname}-system.service" \ | ||
88 | "${pkgdir}/usr/lib/systemd/system/${_appname}.service" | ||
89 | |||
90 | install -dm755 "${pkgdir}/usr/lib/systemd/user" | ||
91 | install -Dm644 "${srcdir}/${_appname}-user.service" \ | ||
92 | "${pkgdir}/usr/lib/systemd/user/${_appname}.service" | ||
93 | |||
94 | install -dm755 "${pkgdir}/usr/lib/sysusers.d" | ||
95 | install -Dm644 "${srcdir}/${_appname}.sysusers" \ | ||
96 | "${pkgdir}/usr/lib/sysusers.d/${_appname}.conf" | ||
97 | |||
98 | install -dm755 "${pkgdir}/usr/lib/tmpfiles.d" | ||
99 | install -Dm644 "${srcdir}/${_appname}.tmpfiles" \ | ||
100 | "${pkgdir}/usr/lib/tmpfiles.d/${_appname}.conf" | ||
101 | |||
102 | install -dm700 "${pkgdir}/etc/skel/.config" | ||
103 | install -Dm600 "${srcdir}/${_appname}-user.conf" \ | ||
104 | "${pkgdir}/etc/skel/.config/${_appname}.conf" | ||
105 | |||
106 | # Automatically generate a configuration file using the content of | ||
107 | # `/usr/share/gnunet/config.d/` as model; in this way we can ensure | ||
108 | # that this configuration file is the one backed up with each update, | ||
109 | # while `/usr/share/gnunet/config.d/` is kept as immutable default | ||
110 | # configuration. | ||
111 | |||
112 | install -dm755 "${pkgdir}/etc" | ||
113 | |||
114 | { | ||
115 | echo "# /etc/${_appname}.conf" | ||
116 | (cd "${pkgdir}" > /dev/null 2>&1 && find "usr/share/${_appname}/config.d" -type f -name '*.conf' \ | ||
117 | -printf '\n\n# For the default values of the the following lines please refer to\n# /%p\n\n' \ | ||
118 | -exec cat '{}' ';') | ||
119 | } > "${pkgdir}/etc/${_appname}.conf" | ||
120 | |||
121 | } | ||
122 | |||