aboutsummaryrefslogtreecommitdiff
path: root/net-misc/gnunet/gnunet-0.10.2_rc4.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/gnunet/gnunet-0.10.2_rc4.ebuild')
-rw-r--r--net-misc/gnunet/gnunet-0.10.2_rc4.ebuild231
1 files changed, 231 insertions, 0 deletions
diff --git a/net-misc/gnunet/gnunet-0.10.2_rc4.ebuild b/net-misc/gnunet/gnunet-0.10.2_rc4.ebuild
new file mode 100644
index 0000000..d705cf1
--- /dev/null
+++ b/net-misc/gnunet/gnunet-0.10.2_rc4.ebuild
@@ -0,0 +1,231 @@
1# Copyright 1999-2016 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# Written by, in historic order: vminko, vonlynX, ng0.
4# https://gnunet.org/gentoo-build is outdated, please ignore.
5#
6# taken from https://338909.bugs.gentoo.org/attachment.cgi?id=381924
7# referenced at https://bugs.gentoo.org/show_bug.cgi?id=338909
8# merged with 9999 variant from emery overlay
9# refined 2015-07 by carlo von lynX of youbroketheinternet.org
10# tweaks since 2015-07 by ng0 and lynX
11
12EAPI=6
13
14DESCRIPTION="Cryptographic GNU Mesh/Underlay Network Routing Layer"
15HOMEPAGE="https://gnunet.org/"
16LICENSE="GPL-3"
17KEYWORDS="~"
18# KEYWORDS="~amd64 ~x86"
19SLOT="0"
20
21PYTHON_COMPAT=( python2_7 )
22WANT_AUTOCONF="2.5"
23WANT_AUTOMAKE="1.11"
24# WANT_LIBTOOL="2.2"
25AUTOTOOLS_AUTORECONF=1
26
27# if you're a gnunet developer, you can put a symlink to your local git here:
28EGIT_REPO_URI="/usr/local/src/${PN}
29 https://gnunet.org/git/${PN}
30 https://github.com/gnunet/${PN}
31 git://git.gnunet.org/${PN}"
32
33case ${PV} in
34"9999")
35 inherit autotools git-r3 user python-any-r1 flag-o-matic
36 # using latest git. caution:
37 # this method is prone to man-in-the-middle attacks
38 ;;
39"0.10.2_rc4")
40 inherit autotools git-r3 user python-any-r1 flag-o-matic
41 EGIT_COMMIT="6bcc73a1cbb1d4a609884762eab1b6de761ad1d9"
42 ;;
43"0.10.1")
44 inherit autotools user python-any-r1 flag-o-matic
45 SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
46 S="${WORKDIR}/${PN}"
47 # tests of gnunet <= 0.10.1 are using python 2.7, gnunet HEAD uses python 3.
48 ;;
49esac
50#S="${WORKDIR}/${PF}/${PN}"
51
52AUTOTOOLS_IN_SOURCE_BUILD=1
53
54# XXX: There is a false warning about root or sudo required for GNS NSS library
55# installation, claiming that it will not be installed if it is missing from the
56# build environment. With current HEAD (Aug 28 2016) it seems that sudo is no
57# longer needed, neither is root. This warning must be fixed in gnunet.
58IUSE="debug +httpd +sqlite postgres mysql nls +nss +X +gnutls dane +bluetooth \
59 ssl libressl experimental extra pulseaudio gstreamer qr tex test \
60 +gnurl +curl curl_ssl_gnutls"
61
62# !!! TODO: Sort run depend, required use, build time use.
63REQUIRED_USE="|| ( mysql postgres sqlite )
64 ?? ( pulseaudio gstreamer )
65 experimental? ( || ( extra ) )
66 extra? ( || ( experimental ) )"
67
68# XXX: We do not know if libressl is functional here, at least it does build,
69# so buildtime is safe, runtime should be too. If you find bugs, get in contact
70# with me.
71## Helpful notes: https://gnunet.org/bugs/view.php?id=4618#bugnotes
72RDEPEND="
73 mysql? ( >=virtual/mysql-5.1 )
74 postgres? ( >=dev-db/postgresql-8.3:= )
75 sqlite? ( >=dev-db/sqlite-3.0 )
76 >=media-libs/libextractor-0.6.1
77 >=dev-libs/libgcrypt-1.6
78 >=dev-libs/libunistring-0.9.3
79 curl? (
80 gnurl? ( >=net-misc/gnurl-7.50.1 )
81 !gnurl? ( >=net-misc/curl-7.50.1[curl_ssl_gnutls] )
82 )
83 gnutls? ( net-libs/gnutls )
84 dane? ( net-libs/gnutls[dane] )
85 ssl? (
86 !libressl? ( dev-libs/openssl:0= )
87 libressl? ( dev-libs/libressl:0= )
88 )
89 net-dns/libidn
90 sys-libs/zlib
91 httpd? ( >=net-libs/libmicrohttpd-0.9.42[messages] )
92 nls? ( >=sys-devel/gettext-0.18.1 )
93 nss? (
94 dev-libs/nss
95 sys-libs/glibc
96 )
97 dev-libs/gmp:0=
98 X? (
99 x11-libs/libXt
100 x11-libs/libXext
101 x11-libs/libX11
102 x11-libs/libXrandr
103 )
104 dev-libs/jansson
105 >=sci-mathematics/glpk-4.43
106 extra? (
107 qr? ( >=media-gfx/zbar-0.10[python] )
108 tex? ( >=app-text/texlive-2012 )
109 )
110 gstreamer? (
111 media-libs/gstreamer:1.0
112 dev-libs/glib:2
113 )
114 pulseaudio? ( >=media-sound/pulseaudio-2.0 )
115 >=media-libs/opus-1.0.1
116 >=media-libs/libogg-1.3.0
117 bluetooth? ( net-wireless/bluez )
118 test? ( ${PYTHON_DEPS} )"
119
120DEPEND="${RDEPEND}
121 sys-devel/automake:1.14"
122
123# TODO: We should run tests on Gentoo, currently this fails.
124
125# XXX: parallel building fails, run one job only.
126MAKEOPTS="-j1"
127
128pkg_setup() {
129 export GNUNET_HOME="${GNUNET_HOME:=/var/lib/gnunet}"
130 # this does not work, someone fix this.
131 export GNUNET_PREFIX="${EPREFIX}/usr/lib"
132 enewgroup gnunetdns
133 enewgroup gnunet
134 enewuser gnunet -1 /bin/sh "${GNUNET_HOME}" gnunet
135 if [[ $(egethome gnunet) != ${GNUNET_HOME} ]]; then
136 ewarn "For homedir different from"
137 ewarn "/var/lib/gnunet set GNUNET_HOME in your make.conf"
138 ewarn "and re-emerge."
139 esethome gnunet "${GNUNET_HOME}"
140 fi
141}
142
143# Here we add and run what bootstrap would do.
144src_prepare() {
145 if [[ "${PV}" == "0.10.1_pre01021" ]]; then
146 rm -rf libltdl || die
147 eautoreconf
148 ./contrib/pogen.sh || die
149 default
150 eapply_user
151 elif [[ "${PV}" == "9999" ]]; then
152 rm -rf libltdl || die
153 eautoreconf
154 ./contrib/pogen.sh || die
155 default
156 eapply_user
157 else
158 default
159 eapply_user
160 fi
161}
162
163src_configure() {
164 ./bootstrap
165 econf \
166 $(use_enable experimental ) \
167 $(use_with httpd microhttpd ) \
168 $(use_with mysql ) \
169 $(use_with postgres postgresql ) \
170 $(use_with sqlite ) \
171 $(use_with X x ) \
172 $(use_with gnutls ) \
173 --with-extractor
174}
175# $(use_with sudo )
176
177
178src_install() {
179 into /
180 use nss && dolib.so src/gns/nss/.libs/libnss_gns*.so*
181 emake DESTDIR="${D}" install
182 rm -rf ${D}/usr/lib/gnunet/nss
183 newinitd "${FILESDIR}/${PN}.initd" gnunet
184 insinto /etc
185 use nss && doins "${FILESDIR}/nsswitch.conf"
186 insinto /etc/gnunet
187 doins "${FILESDIR}/gnunet.conf"
188 keepdir /var/{lib,log}/gnunet
189 fowners gnunet:gnunet /var/lib/gnunet /var/log/gnunet
190}
191
192pkg_postinst() {
193 # We should update the gtk icon cache for the icons.
194 # @TODO: provide average working example config to copy for user.
195 # @TODO: point out that exact time is needed currently.
196 elog " "
197 elog "To configure"
198 elog " 1) Add desired user(s) to the 'gnunet' group"
199 elog " 2) Edit the system-wide config file '/etc/gnunet/gnunet.conf'"
200 elog " preferably using 'gnunet-setup -c /etc/gnunet/gnunet.conf'"
201 elog " ('gnunet-setup' is part of the gnunet-gtk package)"
202 elog " 3) You may want to choose other bootstrap nodes than the ones"
203 elog " provided in /usr/share/gnunet/hellos or remove them if you"
204 elog " want to run GNUnet another way."
205 elog " 4) Certain services will require '/dev/net/tun' to exist,"
206 elog " which you must enable in your kernel."
207 elog " "
208 elog "Optionally, emerge gnunet-gtk to get a GUI for file-sharing and"
209 elog "configuration. This is particularly recommended"
210 elog "if your network setup is non-trivial, as gnunet-setup can be"
211 elog "used to test in the GUI if your network configuration is working."
212 elog "gnunet-setup should be run as the \"gnunet\" user under X. As it"
213 elog "does very little with the network, running it as \"root\" is likely"
214 elog "also harmless. You can also run it as a normal user, but then"
215 elog "you have to copy \"~/.gnunet/gnunet.conf\" over to the \"gnunet\" user's"
216 elog "home directory in the end."
217 elog " "
218 elog "Once you have configured your peer, run (as the 'gnunet' user)"
219 elog "\"gnunet-arm -s\" to start the peer. You can then run the various"
220 elog "GNUnet-tools as your \"normal\" user (who should only be in the group 'gnunet')."
221 elog " "
222 elog "Please emerge a network time protocol daemon or use other means to keep accurate"
223 elog "time on your device, otherwise you might experience problems."
224}
225
226pkg_postrm() {
227 elog " "
228 elog "You have to manually remove the previously created gnunet user"
229 elog "and the gnunet + gnunetdns groups."
230 elog " "
231}