diff options
Diffstat (limited to 'contrib/packages/arch/gnunet-git/PKGBUILD')
-rw-r--r-- | contrib/packages/arch/gnunet-git/PKGBUILD | 128 |
1 files changed, 128 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..bb4d3598d --- /dev/null +++ b/contrib/packages/arch/gnunet-git/PKGBUILD | |||
@@ -0,0 +1,128 @@ | |||
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.0.r0.g0a9c2aa9d | ||
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' 'gnurl' 'gnutls' 'iptables' 'jansson' | ||
18 | 'libextractor' 'libgcrypt' 'libidn2' 'libmicrohttpd' 'libsodium' | ||
19 | 'libtool' 'libunistring' 'nss' 'openssl' 'sqlite' 'which' 'zlib') | ||
20 | makedepends=('bluez-libs' 'gettext' 'git' 'libpulse' 'libtool' 'opus' | ||
21 | 'pkgconfig' 'postgresql' 'python' 'recutils') | ||
22 | optdepends=('bluez: for bluetooth transport' | ||
23 | 'gnunet-gtk: for handling the gnunet:// URI scheme' | ||
24 | 'libgabe: for Attribute-Based Encryption' | ||
25 | 'libogg: for conversation service' | ||
26 | 'libpabc: for re:claimID zero-knowledge privacy credentials' | ||
27 | 'libpulse: for conversation service' | ||
28 | 'miniupnpc: for NAT uPnP support' | ||
29 | 'mysql: for an alternative to sqlite in the database plugin' | ||
30 | 'opus: for conversation service' | ||
31 | 'pbc: for Attribute-Based Encryption' | ||
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}-uri.desktop" | ||
44 | "${_appname}-user.conf" | ||
45 | "${_appname}-user.service") | ||
46 | install="${_appname}.install" | ||
47 | sha256sums=('SKIP' | ||
48 | '163818b89beddcaf78937daba5bdf0ae060b2975de0731aa13d1ccdd813cf262' | ||
49 | '66299dbbdd0219d2f5f0520e69fc094f38f789724d973c2f63a421257ea4f755' | ||
50 | '5c34e1ecc6208900426f8e399e8c3edbef12cce19eba605fd7364ddb3547d9f0' | ||
51 | '98e4e1d6d4fd7c7fd05d9e16402c95f1e7afeb4b97c8c68ac63e8abd11ff4ee7' | ||
52 | '3f17b9ed2c1f8cc0f919fe477df99678c17778a31f1eeb56517e285e3cef30f2' | ||
53 | '60caee20b53bcc69522556b35ac3d35d89e28c49b9a22a2ed5121df4a2c33be5') | ||
54 | |||
55 | pkgver() { | ||
56 | |||
57 | cd "${_appname}" > /dev/null 2>&1 | ||
58 | git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' | ||
59 | |||
60 | } | ||
61 | |||
62 | prepare() { | ||
63 | |||
64 | cd "${srcdir}/${_appname}" | ||
65 | |||
66 | export GNUNET_PREFIX='/usr/lib' | ||
67 | ./bootstrap | ||
68 | |||
69 | } | ||
70 | |||
71 | build() { | ||
72 | |||
73 | cd "${srcdir}/${_appname}" | ||
74 | |||
75 | ./configure --prefix='/usr' --enable-experimental | ||
76 | make | ||
77 | make -C contrib | ||
78 | |||
79 | } | ||
80 | |||
81 | package() { | ||
82 | |||
83 | cd "${srcdir}/${_appname}" | ||
84 | |||
85 | make DESTDIR="${pkgdir}" install | ||
86 | make DESTDIR="${pkgdir}" -C contrib install | ||
87 | |||
88 | install -dm755 "${pkgdir}/usr/lib/systemd/system" | ||
89 | install -Dm644 "${srcdir}/${_appname}-system.service" \ | ||
90 | "${pkgdir}/usr/lib/systemd/system/${_appname}.service" | ||
91 | |||
92 | install -dm755 "${pkgdir}/usr/lib/systemd/user" | ||
93 | install -Dm644 "${srcdir}/${_appname}-user.service" \ | ||
94 | "${pkgdir}/usr/lib/systemd/user/${_appname}.service" | ||
95 | |||
96 | install -dm755 "${pkgdir}/usr/lib/sysusers.d" | ||
97 | install -Dm644 "${srcdir}/${_appname}.sysusers" \ | ||
98 | "${pkgdir}/usr/lib/sysusers.d/${_appname}.conf" | ||
99 | |||
100 | install -dm755 "${pkgdir}/usr/lib/tmpfiles.d" | ||
101 | install -Dm644 "${srcdir}/${_appname}.tmpfiles" \ | ||
102 | "${pkgdir}/usr/lib/tmpfiles.d/${_appname}.conf" | ||
103 | |||
104 | install -dm755 "${pkgdir}/usr/share/applications" | ||
105 | install -Dm644 "${srcdir}/${_appname}-uri.desktop" \ | ||
106 | "${pkgdir}/usr/share/applications/${_appname}-uri.desktop" | ||
107 | |||
108 | install -dm700 "${pkgdir}/etc/skel/.config" | ||
109 | install -Dm600 "${srcdir}/${_appname}-user.conf" \ | ||
110 | "${pkgdir}/etc/skel/.config/${_appname}.conf" | ||
111 | |||
112 | # Automatically generate a configuration file using the content of | ||
113 | # `/usr/share/gnunet/config.d/` as model; in this way we can ensure | ||
114 | # that this configuration file is the one backed up with each update, | ||
115 | # while `/usr/share/gnunet/config.d/` is kept as immutable default | ||
116 | # configuration. | ||
117 | |||
118 | install -dm755 "${pkgdir}/etc" | ||
119 | |||
120 | { | ||
121 | echo "# /etc/${_appname}.conf" | ||
122 | (cd "${pkgdir}" > /dev/null 2>&1 && find "usr/share/${_appname}/config.d" -type f -name '*.conf' \ | ||
123 | -printf '\n\n# For the default values of the the following lines please refer to\n# /%p\n\n' \ | ||
124 | -exec cat '{}' ';') | ||
125 | } > "${pkgdir}/etc/${_appname}.conf" | ||
126 | |||
127 | } | ||
128 | |||