diff options
Diffstat (limited to 'net-misc/gnunet/gnunet-9999.ebuild')
-rw-r--r-- | net-misc/gnunet/gnunet-9999.ebuild | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/net-misc/gnunet/gnunet-9999.ebuild b/net-misc/gnunet/gnunet-9999.ebuild index 1bacd5f..5b1d71c 100644 --- a/net-misc/gnunet/gnunet-9999.ebuild +++ b/net-misc/gnunet/gnunet-9999.ebuild | |||
@@ -1,19 +1,19 @@ | |||
1 | # Copyright 1999-2016 Gentoo Foundation | 1 | # Copyright 1999-2016 Gentoo Foundation |
2 | # Distributed under the terms of the GNU General Public License v2 | 2 | # Distributed under the terms of the GNU General Public License v2 |
3 | # $Id$ | 3 | # $Id$ |
4 | # | 4 | |
5 | # taken from https://338909.bugs.gentoo.org/attachment.cgi?id=381924 | 5 | # taken from https://338909.bugs.gentoo.org/attachment.cgi?id=381924 |
6 | # referenced at https://bugs.gentoo.org/show_bug.cgi?id=338909 | 6 | # referenced at https://bugs.gentoo.org/show_bug.cgi?id=338909 |
7 | # merged with 9999 variant from emery overlay | 7 | # merged with 9999 variant from emery overlay |
8 | # refined 2015-07 by carlo von lynX of youbroketheinternet.org | 8 | # refined 2015-07 by carlo von lynX of youbroketheinternet.org |
9 | # tweaks, complete rewrite since 2015-07 by ng0 | 9 | # complete rewrite by ng0 (collective libertad) |
10 | 10 | ||
11 | EAPI=6 | 11 | EAPI=6 |
12 | 12 | ||
13 | DESCRIPTION="Cryptographic GNU Mesh/Underlay Network Routing Layer" | 13 | DESCRIPTION="Cryptographic GNU Mesh/Underlay Network Routing Layer" |
14 | HOMEPAGE="https://gnunet.org/" | 14 | HOMEPAGE="https://gnunet.org/" |
15 | LICENSE="GPL-3" | 15 | LICENSE="GPL-3" |
16 | PYTHON_COMPAT=( python2_7 ) #rest needs to be tested | 16 | PYTHON_COMPAT=( python2_7 ) # tests are not yet python3 compatible. |
17 | 17 | ||
18 | if [[ "${PV}" == "9999" ]]; then | 18 | if [[ "${PV}" == "9999" ]]; then |
19 | inherit eutils autotools subversion user python-any-r1 | 19 | inherit eutils autotools subversion user python-any-r1 |
@@ -29,34 +29,28 @@ else | |||
29 | WANT_AUTOMAKE="1.11" | 29 | WANT_AUTOMAKE="1.11" |
30 | WANT_LIBTOOL="2.2" | 30 | WANT_LIBTOOL="2.2" |
31 | AUTOTOOLS_AUTORECONF=1 | 31 | AUTOTOOLS_AUTORECONF=1 |
32 | SRC_URI="mirror://gentoo/${P}.tar.gz | 32 | SRC_URI="mirror://gnu/gnunet/${P}.tar.gz" |
33 | https://libertad.pw/static/${PN}-${PV}.tar.gz" | ||
34 | #intended temporary place, also later moved to code.* | ||
35 | #old/upstream: mirror://gnu/${PN}/${P}.tar.gz | ||
36 | fi | 33 | fi |
34 | |||
37 | AUTOTOOLS_IN_SOURCE_BUILD=1 | 35 | AUTOTOOLS_IN_SOURCE_BUILD=1 |
38 | KEYWORDS="~amd64" | 36 | KEYWORDS="~amd64" |
39 | SLOT="0" | 37 | SLOT="0" |
40 | IUSE="+httpd +sqlite postgresql mysql nls nss +X +gnutls +dane +bluetooth ssl experimental extra conversation pulseaudio gstreamer qr tex test" | 38 | IUSE="+httpd +sqlite postgresql mysql nls nss +X +gnutls +dane +bluetooth ssl experimental extra conversation pulseaudio gstreamer qr tex test hardened" |
41 | # With current svn numbers this is no longer needed. | 39 | # Current svn numbers no longer need to be patched. |
42 | #if [[ ${PV} != "9999" ]] ; then | 40 | #if [[ ${PV} != "9999" ]] ; then |
43 | # PATCHES=( "${FILESDIR}"/install.diff ) | 41 | # PATCHES=( "${FILESDIR}"/install.diff ) |
44 | #fi | 42 | #fi |
45 | RESTRICT="test" # how is running tests handled in this case in gentoo? | 43 | RESTRICT="test" |
46 | REQUIRED_USE="?? ( mysql postgresql sqlite ) | 44 | REQUIRED_USE="?? ( mysql postgresql sqlite ) |
47 | ?? ( pulseaudio gstreamer )" | 45 | ?? ( pulseaudio gstreamer )" |
48 | 46 | ||
49 | # note for gentoo-hardened: | ||
50 | # might be possible to build with | ||
51 | # "--with-gcc-hardening" and "--with-linker-hardening" | ||
52 | |||
53 | RDEPEND=" | 47 | RDEPEND=" |
54 | mysql? ( >=virtual/mysql-5.1 ) | 48 | mysql? ( >=virtual/mysql-5.1 ) |
55 | postgresql? ( >=dev-db/postgresql-8.3:= ) | 49 | postgresql? ( >=dev-db/postgresql-8.3:= ) |
56 | sqlite? ( >=dev-db/sqlite-3.0 ) | 50 | sqlite? ( >=dev-db/sqlite-3.0 ) |
57 | >=net-misc/curl-7.21.0 | 51 | >=net-misc/curl-7.21.0 |
58 | >=media-libs/libextractor-0.6.1 | 52 | >=media-libs/libextractor-0.6.1 |
59 | >=dev-libs/libgcrypt-1.7 | 53 | >=dev-libs/libgcrypt-1.6 |
60 | >=dev-libs/libunistring-0.9.3 | 54 | >=dev-libs/libunistring-0.9.3 |
61 | >=net-misc/gnurl-7.34.0 | 55 | >=net-misc/gnurl-7.34.0 |
62 | gnutls? ( net-libs/gnutls ) | 56 | gnutls? ( net-libs/gnutls ) |
@@ -83,7 +77,8 @@ RDEPEND=" | |||
83 | conversation? ( | 77 | conversation? ( |
84 | gstreamer? ( | 78 | gstreamer? ( |
85 | media-libs/gstreamer:1.0 | 79 | media-libs/gstreamer:1.0 |
86 | dev-libs/glib:2 ) | 80 | dev-libs/glib:2 |
81 | ) | ||
87 | pulseaudio? ( >=media-sound/pulseaudio-2.0 ) | 82 | pulseaudio? ( >=media-sound/pulseaudio-2.0 ) |
88 | >=media-libs/opus-1.0.1 | 83 | >=media-libs/opus-1.0.1 |
89 | >=media-libs/libogg-1.3.0 | 84 | >=media-libs/libogg-1.3.0 |
@@ -100,13 +95,12 @@ DEPEND=" | |||
100 | MAKEOPTS="${MAKEOPTS} -j1" | 95 | MAKEOPTS="${MAKEOPTS} -j1" |
101 | 96 | ||
102 | pkg_setup() { | 97 | pkg_setup() { |
98 | enewgroup gnunetdns | ||
103 | enewgroup gnunet | 99 | enewgroup gnunet |
104 | enewuser "gnunet" -1 -1 /var/lib/gnunet "gnunet" | 100 | enewuser "gnunet" -1 -1 /var/lib/gnunet "gnunet" |
105 | esethome "gnunet" /var/lib/gnunet | 101 | esethome "gnunet" /var/lib/gnunet |
106 | } | 102 | } |
107 | 103 | ||
108 | # Technically it is a svn checkout, just to be sure | ||
109 | # we run what ./bootstrap would do. | ||
110 | src_prepare() { | 104 | src_prepare() { |
111 | if [[ "${PV}" == "9999" ]]; then | 105 | if [[ "${PV}" == "9999" ]]; then |
112 | subversion_src_prepare | 106 | subversion_src_prepare |
@@ -115,6 +109,7 @@ src_prepare() { | |||
115 | ./contrib/pogen.sh || die | 109 | ./contrib/pogen.sh || die |
116 | default | 110 | default |
117 | else | 111 | else |
112 | # run what ./bootstrap would run: | ||
118 | rm -rf libltdl || die | 113 | rm -rf libltdl || die |
119 | eautoreconf | 114 | eautoreconf |
120 | ./contrib/pogen.sh || die | 115 | ./contrib/pogen.sh || die |
@@ -135,13 +130,14 @@ src_configure() { | |||
135 | $(use_with gnutls) \ | 130 | $(use_with gnutls) \ |
136 | $(use_with bluetooth) \ | 131 | $(use_with bluetooth) \ |
137 | --with-libextractor | 132 | --with-libextractor |
133 | # hardened build (untested) | ||
134 | use hardened && append-ldflags "--with-gcc-hardening --with-linker-hardening" | ||
138 | } | 135 | } |
139 | # debug those: | 136 | # debug those: |
140 | #$(use_with ssl) \ | 137 | #$(use_with ssl) \ |
141 | 138 | ||
142 | src_install() { | 139 | src_install() { |
143 | default | 140 | default |
144 | #newinitd "${FILESDIR}/gnunet.initd" gnunet | ||
145 | newinitd "${FILESDIR}"/gnunet.initd gnunet | 141 | newinitd "${FILESDIR}"/gnunet.initd gnunet |
146 | insinto /etc/gnunet | 142 | insinto /etc/gnunet |
147 | doins "${FILESDIR}"/gnunet.conf | 143 | doins "${FILESDIR}"/gnunet.conf |
@@ -150,8 +146,7 @@ src_install() { | |||
150 | } | 146 | } |
151 | 147 | ||
152 | pkg_postinst() { | 148 | pkg_postinst() { |
153 | einfo "Updating GTK icon cache" | 149 | # We should update the gtk icon cache for the icons. |
154 | gtk-update-icon-cache #does not work somehow. | ||
155 | elog "To configure" | 150 | elog "To configure" |
156 | elog " 1) Add desired user(s) to the 'gnunet' group" | 151 | elog " 1) Add desired user(s) to the 'gnunet' group" |
157 | elog " 2) Edit the system-wide config file '/etc/gnunet/gnunet.conf'" | 152 | elog " 2) Edit the system-wide config file '/etc/gnunet/gnunet.conf'" |
@@ -162,7 +157,18 @@ pkg_postinst() { | |||
162 | elog " want to run GNUnet another way." | 157 | elog " want to run GNUnet another way." |
163 | elog " 4) Certain services will require '/dev/net/tun' to exist," | 158 | elog " 4) Certain services will require '/dev/net/tun' to exist," |
164 | elog " which you must enable in your kernel." | 159 | elog " which you must enable in your kernel." |
165 | elog "" | 160 | elog " " |
166 | elog " For further troubleshooting and info, take a look at the wiki" | 161 | elog "Optionally, emerge gnunet-gtk to get a GUI for file-sharing and" |
167 | elog " page about gnunet." | 162 | elog "configuration. This is particularly recommended" |
163 | elog "if your network setup is non-trivial, as gnunet-setup can be" | ||
164 | elog "used to test in the GUI if your network configuration is working." | ||
165 | elog "gnunet-setup should be run as the \"gnunet\" user under X. As it" | ||
166 | elog "does very little with the network, running it as \"root\" is likely" | ||
167 | elog "also harmless. You can also run it as a normal user, but then" | ||
168 | elog "you have to copy \"~/.gnunet/gnunet.conf\" over to the \"gnunet\" user's" | ||
169 | elog "home directory in the end." | ||
170 | elog " " | ||
171 | elog "Once you have configured your peer, run (as the 'gnunet' user)" | ||
172 | elog "\"gnunet-arm -s\" to start the peer. You can then run the various" | ||
173 | elog "GNUnet-tools as your \"normal\" user (who should only be in the group 'gnunet')." | ||
168 | } | 174 | } |