logo

overlay

My (experimental) gentoo overlay
commit: 20ac260a2b41065d2e4bf8466072231ae7afc867
parent: 2b5b6e494071cd3e0a9223df2de69c5f5fece772
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed,  6 Feb 2019 18:53:08 +0100

net-p2p/gnunet: New Package

Diffstat:

Anet-p2p/gnunet/Manifest1+
Anet-p2p/gnunet/files/gnunet-9999.initd32++++++++++++++++++++++++++++++++
Anet-p2p/gnunet/gnunet-0.11.0_pre66.ebuild71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anet-p2p/gnunet/metadata.xml8++++++++
4 files changed, 112 insertions(+), 0 deletions(-)

diff --git a/net-p2p/gnunet/Manifest b/net-p2p/gnunet/Manifest @@ -0,0 +1 @@ +DIST gnunet-0.11.0pre66.tar.gz 7487985 BLAKE2B da175be61b63d561e8638d9a7873b8214ae3c47cb1c8d2d8a4f7e9c9a15c9554e1c7ce3a8be2fcb5492fd2d025da2aee3feb1dca3a9680fd334684b6bc2dfeb6 SHA512 914533659419ff3a64772e0933617be455390c8d0b22718dd8d6fe5b892ea9969f2fe55f3c128094f349597a19b32255e47d0c29952864557e1fc19af9465e2d diff --git a/net-p2p/gnunet/files/gnunet-9999.initd b/net-p2p/gnunet/files/gnunet-9999.initd @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + if ! test -f "/etc/gnunetd.conf"; then + eerror "You must create /etc/gnunetd.conf file first" + return 1 + fi + + ebegin "Starting GNUnet" + # -u username, -c path to gnunet.conf file + start-stop-daemon --start --quiet --background --exec /usr/bin/gnunetd \ + -- -u gnunetd -c /etc/gnunetd.conf + eend $? "Failed to start GNUnet" +} + +stop() { + ebegin "Stopping GNUnet" + killall gnunetd + eend $? "Failed to stop GNUnet" +} + +restart() { + svc_stop + sleep 3 + svc_start +} diff --git a/net-p2p/gnunet/gnunet-0.11.0_pre66.ebuild b/net-p2p/gnunet/gnunet-0.11.0_pre66.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2019 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit user + +MY_PV="0.11.0pre66" + +DESCRIPTION="GNUnet is a framework for secure peer-to-peer networking." +HOMEPAGE="http://gnunet.org/" +LICENSE="GPL-3" +SRC_URI="mirror://gnu/${PN}/${PN}-${MY_PV}.tar.gz" +KEYWORDS="~amd64" +SLOT="0" +IUSE="experimental http mysql postgres nls +sqlite X" +REQUIRED_USE="|| ( mysql postgres sqlite )" + +S="${WORKDIR}/${PN}-${MY_PV}" + +DEPEND=" + >=net-misc/curl-7.21.0 + >=media-libs/libextractor-0.6.1 + dev-libs/libgcrypt + >=dev-libs/libunistring-0.9.2 + sys-libs/ncurses + sys-libs/zlib + http? ( >=net-libs/libmicrohttpd-0.9.18 ) + mysql? ( >=virtual/mysql-5.1 ) + postgres? ( dev-db/postgresql ) + nls? ( sys-devel/gettext ) + sqlite? ( >=dev-db/sqlite-3.0 ) + X? ( + x11-libs/libXt + x11-libs/libXext + x11-libs/libX11 + x11-libs/libXrandr + ) +" + +pkg_setup() { + enewgroup gnunetdns + enewuser gnunet +} + +src_configure() { + econf \ + --docdir="${EPREFIX}/usr/share/doc/${PF}" \ + $(use_enable nls) \ + $(use_enable experimental) \ + $(use_with http microhttpd) \ + $(use_with mysql) \ + $(use_with postgres postgresql) \ + $(use_with sqlite) \ + $(use_with X x) +} + +src_install() { + emake -j1 DESTDIR="${D}" install + newinitd "${FILESDIR}"/${PN}-9999.initd gnunet + keepdir /var/{lib,log}/gnunet + fowners gnunet:gnunet /var/lib/gnunet /var/log/gnunet +} + +pkg_postinst() { + einfo + einfo "To configure" + einfo " 1) Add user(s) to the gnunet group" + einfo " 2) Edit the server config file '/etc/gnunet.conf'" + einfo +} diff --git a/net-p2p/gnunet/metadata.xml b/net-p2p/gnunet/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <use> + <flag name="experimental">enable experimental options</flag> + <flag name="http">enable embedded http server support</flag> + </use> +</pkgmetadata>