From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/blueness:master commit in: net-p2p/gnunet/, net-p2p/gnunet/files/
Date: Wed, 7 Mar 2012 02:12:44 +0000 (UTC) [thread overview]
Message-ID: <1331086355.f3e47de08ee486dfedbc097f58c64ea602251787.blueness@gentoo> (raw)
commit: f3e47de08ee486dfedbc097f58c64ea602251787
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 7 02:12:35 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Wed Mar 7 02:12:35 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/blueness.git;a=commit;h=f3e47de0
net-p2p/gnunet: testing Vitaly Minko's ebuild, bug #338909
---
net-p2p/gnunet/files/gnunet-0.9.2.conf | 10 ++
net-p2p/gnunet/files/gnunet-0.9.2.confd | 10 ++
net-p2p/gnunet/files/gnunet-0.9.2.initd | 39 ++++++++
net-p2p/gnunet/files/gnunet.initd | 32 -------
net-p2p/gnunet/gnunet-0.9.2.ebuild | 152 ++++++++++++++++---------------
5 files changed, 137 insertions(+), 106 deletions(-)
diff --git a/net-p2p/gnunet/files/gnunet-0.9.2.conf b/net-p2p/gnunet/files/gnunet-0.9.2.conf
new file mode 100644
index 0000000..76e0671
--- /dev/null
+++ b/net-p2p/gnunet/files/gnunet-0.9.2.conf
@@ -0,0 +1,10 @@
+[PATHS]
+SERVICEHOME = /var/lib/gnunet/
+DEFAULTCONFIG = /etc/gnunet.conf
+
+[arm]
+GLOBAL_POSTFIX = -l /var/log/gnunet/{}.log
+
+[transport]
+UNIX_MATCH_UID = NO
+
diff --git a/net-p2p/gnunet/files/gnunet-0.9.2.confd b/net-p2p/gnunet/files/gnunet-0.9.2.confd
new file mode 100644
index 0000000..8be9c9c
--- /dev/null
+++ b/net-p2p/gnunet/files/gnunet-0.9.2.confd
@@ -0,0 +1,10 @@
+# /etc/conf.d/gnunet: config file for /etc/init.d/gnunet
+
+# GNUnet user
+GNUNET_USER="gnunet"
+
+# GNUnet group
+GNUNET_GROUP="gnunet"
+
+# GNUnet config file
+GNUNET_CONF="/etc/gnunet.conf"
diff --git a/net-p2p/gnunet/files/gnunet-0.9.2.initd b/net-p2p/gnunet/files/gnunet-0.9.2.initd
new file mode 100644
index 0000000..a3586b2
--- /dev/null
+++ b/net-p2p/gnunet/files/gnunet-0.9.2.initd
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ if [ ! -f "${GNUNET_CONF}" ]; then
+ eerror "You must create the config file first."
+ return 1
+ fi
+
+ ebegin "Starting GNUnet"
+ start-stop-daemon --exec /usr/bin/gnunet-arm \
+ --user=${GNUNET_USER} \
+ --group=${GNUNET_GROUP} \
+ -- -q -c ${GNUNET_CONF} -s
+ eend $? "Failed to start GNUnet"
+}
+
+stop() {
+ ebegin "Stopping GNUnet"
+ start-stop-daemon --exec /usr/bin/gnunet-arm \
+ --user=${GNUNET_USER} \
+ --group=${GNUNET_GROUP} \
+ -- -q -c ${GNUNET_CONF} -e
+ eend $? "Failed to stop GNUnet"
+}
+
+restart() {
+ ebegin "Restarting GNUnet"
+ start-stop-daemon --exec /usr/bin/gnunet-arm \
+ --user=${GNUNET_USER} \
+ --group=${GNUNET_GROUP} \
+ -- -q -c ${GNUNET_CONF} -r
+ eend $? "Failed to restart GNUnet"
+}
diff --git a/net-p2p/gnunet/files/gnunet.initd b/net-p2p/gnunet/files/gnunet.initd
deleted file mode 100644
index ffd0107..0000000
--- a/net-p2p/gnunet/files/gnunet.initd
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2008 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.9.2.ebuild b/net-p2p/gnunet/gnunet-0.9.2.ebuild
index 60d1921..68bcde5 100644
--- a/net-p2p/gnunet/gnunet-0.9.2.ebuild
+++ b/net-p2p/gnunet/gnunet-0.9.2.ebuild
@@ -1,96 +1,100 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/gnunet/gnunet-0.8.1-r2.ebuild,v 1.3 2011/03/28 14:24:51 nirbheek Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/gnunet/gnunet-0.8.1.ebuild,v 1.2 2010/06/20 13:56:46 xarthisius Exp $
-EAPI="4"
+EAPI=2
-DESCRIPTION="GNUnet is an anonymous, distributed, reputation based network."
+inherit autotools eutils flag-o-matic
+
+MY_PV=${PV/_/}
+MY_P="${PN}-${MY_PV}"
+S="${WORKDIR}/${MY_P}"
+DESCRIPTION="GNUnet is a framework for secure peer-to-peer networking."
HOMEPAGE="http://gnunet.org/"
-SRC_URI="ftp://ftp.gnu.org/gnu/gnunet/${P}.tar.gz"
-#RESTRICT="test"
+SRC_URI="ftp://ftp.gnu.org/gnu/gnunet/${MY_P}.tar.gz"
+RESTRICT="test"
-REQUIRED_USE="|| ( sqlite mysql postgres )"
-IUSE="microhttpd +sqlite mysql postgres nls setup"
-KEYWORDS="~amd64 ~x86"
-LICENSE="GPL-2"
+IUSE="mysql nls +sqlite http esmtp X experimental"
+KEYWORDS="~amd64 ~x86 ~arm"
+LICENSE="GPL-3"
SLOT="0"
-RDEPEND="
- >=media-libs/libextractor-0.6.1
- >=dev-libs/libgcrypt-1.2
+DEPEND=">=dev-libs/libgcrypt-1.4.5
+ >=media-libs/libextractor-0.6.0
+ >=dev-libs/libunistring-0.9.1.1
+ >=dev-libs/gmp-4.3.0
+ sys-libs/zlib
>=net-misc/curl-7.21.0
- >=dev-libs/libunistring-0.9.2
- >=sys-devel/libtool-2.2
-"
-
-# microhttpd? ( >=net-libs/libmicrohttpd-0.9.18 )
-# sqlite? ( >=dev-db/sqlite-3.0 )
-# mysql? ( >=virtual/mysql-5.1 )
-# postgres? ( >= dev-db/postgresql-server-8.3 )
-# nls? ( sys-devel/gettext )"
-# setup? ( net-p2p/gnunet-gtk-0.9.2 )
-# >=dev-libs/gmp-4.0.0
-# sys-libs/zlib
+ sys-apps/sed
+ sys-libs/ncurses
+ http? ( >=net-libs/libmicrohttpd-0.9.18 )
+ esmtp? ( net-libs/libesmtp )
+ mysql? ( >=virtual/mysql-5.0 )
+ sqlite? ( >=dev-db/sqlite-3.6.0 )
+ nls? ( sys-devel/gettext )
+ X? (
+ x11-libs/libXt
+ x11-libs/libXext
+ x11-libs/libX11
+ x11-libs/libXrandr
+ )
+ "
-DEPEND="${RDEPEND}
- sys-apps/sed
- dev-util/pkgconfig"
-
-pkg_preinst() {
- enewgroup gnunetd
- enewuser gnunetd -1 -1 /dev/null gnunetd
+pkg_setup() {
+ enewgroup gnunetdns
+ enewgroup gnunet
+ enewuser gnunet -1 -1 /dev/null gnunet
+ if ! use mysql && ! use sqlite; then
+ einfo
+ einfo "You need to specify at least one of 'mysql' or 'sqlite'"
+ einfo "USE flag in order to have properly installed gnunet"
+ einfo
+ die "Invalid USE flag set"
+ fi
}
-#src_prepare() {
-# if ! use sqlite; then
-# # make mysql default sqstore if we do not compile sqlite support
-# # (bug #107330)
-# if use mysql; then \
-# sed -i 's:default "sqstore_sqlite":default "sqstore_mysql":' \
-# contrib/config-daemon.in
-# else
-# ewarn
-# ewarn "You didn't specify preferred database (mysql or sqlite)"
-# ewarn "Choosing sqlite for you."
-# ewarn
-# fi
-# fi
-#
-# # we do not want to built gtk support with USE=-gtk
-# if ! use gtk ; then
-# sed -i "s:AC_DEFINE_UNQUOTED..HAVE_GTK.*:true:" configure.ac
-# fi
-#}
+src_unpack() {
+ unpack ${A}
+ sed -i -e 's|$(bindir)/gnunet|$(DESTDIR)$(bindir)/gnunet|g' \
+ "${S}"/src/nat/Makefile.in || die "sed failed"
+ sed -i -e 's|$(bindir)/gnunet|$(DESTDIR)$(bindir)/gnunet|g' \
+ "${S}"/src/transport/Makefile.in || die "sed failed"
+ sed -i -e 's|$(bindir)/gnunet|$(DESTDIR)$(bindir)/gnunet|g' \
+ "${S}"/src/vpn/Makefile.in || die "sed failed"
+ sed -i -e 's|$(bindir)/gnunet|$(DESTDIR)$(bindir)/gnunet|g' \
+ "${S}"/src/dns/Makefile.in || die "sed failed"
+ sed -i -e 's|$(bindir)/gnunet|$(DESTDIR)$(bindir)/gnunet|g' \
+ "${S}"/src/exit/Makefile.in || die "sed failed"
+}
src_configure() {
+ append-ldflags $(no-as-needed)
econf \
- $(use_with microhttpd) \
- $(use_with sqlite) \
- $(use_with mysql) \
- $(use_with postgres) \
- $(use_enable postgres)
+ $(use_with X x) \
+ $(use_enable nls) \
+ $(use_enable experimental) \
+ || die "econf failed"
}
-#src_install() {
-# emake DESTDIR="${D}" install || die "make install failed"
-# dodoc AUTHORS ChangeLog INSTALL NEWS PLATFORMS README UPDATING || die
-# insinto /etc
-# newins contrib/gnunet.conf gnunet.conf
-# docinto contrib
-# dodoc contrib/* || die
-# newinitd "${FILESDIR}"/${PN}.initd gnunet
-# dodir /var/lib/gnunet
-# chown gnunetd:gnunetd "${D}"/var/lib/gnunet
-#}
+src_compile() {
+ emake -j1 || die "make failed"
+}
-pkg_postinst() {
- # make sure permissions are ok
- chown -R gnunetd:gnunetd "${ROOT}"/var/lib/gnunet
+src_install() {
+ emake -j1 DESTDIR="${D}" install || die "make install failed"
+ dodoc ABOUT-NLS AUTHORS INSTALL NEWS README || die
+ insinto /etc
+ newins "${FILESDIR}"/${P}.conf gnunet.conf || die "newins failed"
+ newconfd "${FILESDIR}"/${P}.confd gnunet || die "newconfd failed"
+ newinitd "${FILESDIR}"/${P}.initd gnunet || die "newinitd failed"
+ 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 gnunetd group"
- einfo " 2) Run 'gnunet-setup' to generate your client config file"
- einfo " 3) Run gnunet-setup -d as root to generate a server config file"
+ einfo " 1) Add user(s) to the gnunet group"
+ einfo " 2) Edit the server config file '/etc/gnunet.conf'"
einfo
}
next reply other threads:[~2012-03-07 2:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 2:12 Anthony G. Basile [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-04-04 15:14 [gentoo-commits] dev/blueness:master commit in: net-p2p/gnunet/, net-p2p/gnunet/files/ Anthony G. Basile
2012-03-04 11:51 Anthony G. Basile
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1331086355.f3e47de08ee486dfedbc097f58c64ea602251787.blueness@gentoo \
--to=blueness@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox