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