blob: 5b1d71c51df0618d718f88bd274b7b0dc6b04733 (
plain) (
blame)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# taken from https://338909.bugs.gentoo.org/attachment.cgi?id=381924
# referenced at https://bugs.gentoo.org/show_bug.cgi?id=338909
# merged with 9999 variant from emery overlay
# refined 2015-07 by carlo von lynX of youbroketheinternet.org
# complete rewrite by ng0 (collective libertad)
EAPI=6
DESCRIPTION="Cryptographic GNU Mesh/Underlay Network Routing Layer"
HOMEPAGE="https://gnunet.org/"
LICENSE="GPL-3"
PYTHON_COMPAT=( python2_7 ) # tests are not yet python3 compatible.
if [[ "${PV}" == "9999" ]]; then
inherit eutils autotools subversion user python-any-r1
ESVN_REPO_URI="https://gnunet.org/svn/gnunet"
ESVN_PROJECT="gnunet"
WANT_AUTOCONF="2.59"
WANT_AUTOMAKE="1.11"
WANT_LIBTOOL="2.2"
AUTOTOOLS_AUTORECONF=1
else
inherit eutils autotools subversion user python-any-r1
WANT_AUTOCONF="2.59"
WANT_AUTOMAKE="1.11"
WANT_LIBTOOL="2.2"
AUTOTOOLS_AUTORECONF=1
SRC_URI="mirror://gnu/gnunet/${P}.tar.gz"
fi
AUTOTOOLS_IN_SOURCE_BUILD=1
KEYWORDS="~amd64"
SLOT="0"
IUSE="+httpd +sqlite postgresql mysql nls nss +X +gnutls +dane +bluetooth ssl experimental extra conversation pulseaudio gstreamer qr tex test hardened"
# Current svn numbers no longer need to be patched.
#if [[ ${PV} != "9999" ]] ; then
# PATCHES=( "${FILESDIR}"/install.diff )
#fi
RESTRICT="test"
REQUIRED_USE="?? ( mysql postgresql sqlite )
?? ( pulseaudio gstreamer )"
RDEPEND="
mysql? ( >=virtual/mysql-5.1 )
postgresql? ( >=dev-db/postgresql-8.3:= )
sqlite? ( >=dev-db/sqlite-3.0 )
>=net-misc/curl-7.21.0
>=media-libs/libextractor-0.6.1
>=dev-libs/libgcrypt-1.6
>=dev-libs/libunistring-0.9.3
>=net-misc/gnurl-7.34.0
gnutls? ( net-libs/gnutls )
dane? ( net-libs/gnutls[dane] )
ssl? ( dev-libs/openssl:0= )
net-dns/libidn
sys-libs/ncurses:0
sys-libs/zlib
httpd? ( >=net-libs/libmicrohttpd-0.9.42[messages] )
nls? ( >=sys-devel/gettext-0.18.1 )
nss? ( dev-libs/nss )
dev-libs/gmp:0=
X? (
x11-libs/libXt
x11-libs/libXext
x11-libs/libX11
x11-libs/libXrandr
)
dev-libs/jansson
>=sci-mathematics/glpk-4.43
extra? (
qr? ( >=media-gfx/zbar-0.10[python] )
tex? ( >=app-text/texlive-2012 )
conversation? (
gstreamer? (
media-libs/gstreamer:1.0
dev-libs/glib:2
)
pulseaudio? ( >=media-sound/pulseaudio-2.0 )
>=media-libs/opus-1.0.1
>=media-libs/libogg-1.3.0
)
)
bluetooth? ( net-wireless/bluez )
test? ( ${PYTHON_DEPS} )"
#test? ( >=dev-lang/python-2.7:2.7 )
DEPEND="
${RDEPEND}"
#sys-devel/automake:1.14"
MAKEOPTS="${MAKEOPTS} -j1"
pkg_setup() {
enewgroup gnunetdns
enewgroup gnunet
enewuser "gnunet" -1 -1 /var/lib/gnunet "gnunet"
esethome "gnunet" /var/lib/gnunet
}
src_prepare() {
if [[ "${PV}" == "9999" ]]; then
subversion_src_prepare
rm -rf libltdl || die
eautoreconf
./contrib/pogen.sh || die
default
else
# run what ./bootstrap would run:
rm -rf libltdl || die
eautoreconf
./contrib/pogen.sh || die
default
fi
}
src_configure() {
econf \
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
$(use_enable nls) \
$(use_enable experimental) \
$(use_with httpd microhttpd) \
$(use_with mysql) \
$(use_with postgresql) \
$(use_with sqlite) \
$(use_with X x) \
$(use_with gnutls) \
$(use_with bluetooth) \
--with-libextractor
# hardened build (untested)
use hardened && append-ldflags "--with-gcc-hardening --with-linker-hardening"
}
# debug those:
#$(use_with ssl) \
src_install() {
default
newinitd "${FILESDIR}"/gnunet.initd gnunet
insinto /etc/gnunet
doins "${FILESDIR}"/gnunet.conf
keepdir /var/{lib,log}/gnunet
fowners gnunet:gnunet /var/lib/gnunet /var/log/gnunet
}
pkg_postinst() {
# We should update the gtk icon cache for the icons.
elog "To configure"
elog " 1) Add desired user(s) to the 'gnunet' group"
elog " 2) Edit the system-wide config file '/etc/gnunet/gnunet.conf'"
elog " preferably using 'gnunet-setup -c /etc/gnunet/gnunet.conf'"
elog " ('gnunet-setup' is part of the gnunet-gtk package)"
elog " 3) You may want to choose other bootstrap nodes than the ones"
elog " provided in /usr/share/gnunet/hellos or remove them if you"
elog " want to run GNUnet another way."
elog " 4) Certain services will require '/dev/net/tun' to exist,"
elog " which you must enable in your kernel."
elog " "
elog "Optionally, emerge gnunet-gtk to get a GUI for file-sharing and"
elog "configuration. This is particularly recommended"
elog "if your network setup is non-trivial, as gnunet-setup can be"
elog "used to test in the GUI if your network configuration is working."
elog "gnunet-setup should be run as the \"gnunet\" user under X. As it"
elog "does very little with the network, running it as \"root\" is likely"
elog "also harmless. You can also run it as a normal user, but then"
elog "you have to copy \"~/.gnunet/gnunet.conf\" over to the \"gnunet\" user's"
elog "home directory in the end."
elog " "
elog "Once you have configured your peer, run (as the 'gnunet' user)"
elog "\"gnunet-arm -s\" to start the peer. You can then run the various"
elog "GNUnet-tools as your \"normal\" user (who should only be in the group 'gnunet')."
}
|