summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Wegener <swegener@gentoo.org>2008-06-07 21:19:45 +0000
committerSven Wegener <swegener@gentoo.org>2008-06-07 21:19:45 +0000
commitb5b9887f7a1c1cc62853802554d8f18a6e90b59c (patch)
tree1102acfdcafccc5af70b3ff1708acc1ca1f3d3fc /net-nntp/nzbget
parentRemove unused inherits that were used to patch and re-autotools before. (diff)
downloadhistorical-b5b9887f7a1c1cc62853802554d8f18a6e90b59c.tar.gz
historical-b5b9887f7a1c1cc62853802554d8f18a6e90b59c.tar.bz2
historical-b5b9887f7a1c1cc62853802554d8f18a6e90b59c.zip
Add support for a system-wide nzbget daemon, bug #217359. Credit for the idea goes to Chris Carlin.
Package-Manager: portage-2.1.5.4
Diffstat (limited to 'net-nntp/nzbget')
-rw-r--r--net-nntp/nzbget/ChangeLog9
-rw-r--r--net-nntp/nzbget/Manifest11
-rw-r--r--net-nntp/nzbget/files/nzbget.confd15
-rw-r--r--net-nntp/nzbget/files/nzbget.initd37
-rw-r--r--net-nntp/nzbget/nzbget-0.4.0-r1.ebuild79
5 files changed, 146 insertions, 5 deletions
diff --git a/net-nntp/nzbget/ChangeLog b/net-nntp/nzbget/ChangeLog
index 8bf1df101923..63ad43631285 100644
--- a/net-nntp/nzbget/ChangeLog
+++ b/net-nntp/nzbget/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-nntp/nzbget
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-nntp/nzbget/ChangeLog,v 1.18 2008/06/07 20:28:54 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-nntp/nzbget/ChangeLog,v 1.19 2008/06/07 21:19:45 swegener Exp $
+
+*nzbget-0.4.0-r1 (07 Jun 2008)
+
+ 07 Jun 2008; Sven Wegener <swegener@gentoo.org> +files/nzbget.confd,
+ +files/nzbget.initd, +nzbget-0.4.0-r1.ebuild:
+ Add support for a system-wide nzbget daemon, bug #217359. Credit for the
+ idea goes to Chris Carlin.
07 Jun 2008; Sven Wegener <swegener@gentoo.org> -files/0.2.3-gcc41.patch,
-files/0.2.3-include-order.patch, -files/0.2.3-double-free.patch,
diff --git a/net-nntp/nzbget/Manifest b/net-nntp/nzbget/Manifest
index a5e5787084b3..1cc9e7db90aa 100644
--- a/net-nntp/nzbget/Manifest
+++ b/net-nntp/nzbget/Manifest
@@ -1,14 +1,17 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
+AUX nzbget.confd 337 RMD160 7f88d0274d99d880194d18b5bf4c130e450c2084 SHA1 1a0a7a54654b15853d2ba5277a9d0ce919892bff SHA256 a2a305dc1ef482d82041c5261dba235f6faae229d894785f528d87c9c0e452b8
+AUX nzbget.initd 876 RMD160 3edadcf591f5843740c483746cc4ed573f7bf75b SHA1 4258ef47ee7d27d80a354baa77579648063c59fd SHA256 bb81a944ec8a3503d8cc1c3430a29d6f4c5b3be19c89e8220e7444d0b2156447
DIST nzbget-0.4.0.tar.gz 248895 RMD160 8a53a35e8528ba71e34301591c168512888497b7 SHA1 91cd634e1d470f955a2eaf8b680b31873466072d SHA256 ac1d3b4891626bf3ecaa92d2077780f354a1e1958e3577d7221a59cd9acd9900
+EBUILD nzbget-0.4.0-r1.ebuild 2133 RMD160 bfcfcab20c7d6068349875c14c85857728d42342 SHA1 d6d3357b7cd8252d730b8d85a422a31bae146f8d SHA256 ccb9df69cab95c90bf6f68ae0095af981c4a50711d95e8172ff9f303ad1b8b34
EBUILD nzbget-0.4.0.ebuild 941 RMD160 3f10c12f8092d868014216e74b02f72c89513893 SHA1 b8a32d515abbb171d8434d0c95aae55bdf2e327e SHA256 1e2a8551cef2cb2ad9dfaac2a971a7d61320f05859a646701fa171c144027476
-MISC ChangeLog 3483 RMD160 9965c764317aaa7f0d01d7cb1822d3e15bbb8c1c SHA1 f2ca42816374dcfa132ba256d2430405430d6df5 SHA256 88fe95189a447cdf96bea3faca965baf1c7e3613d5c22062343ac4a689202b72
+MISC ChangeLog 3739 RMD160 e0b7c19ed6315f8b8f90283cb6bac3353cffaff3 SHA1 8a9c44da61b875961a4e192d6b7090da9b46db0e SHA256 9255b13c52b23eb68b3a294251ead28ffaeb3ef1858a8a252accd67207d6e76d
MISC metadata.xml 357 RMD160 d743b08f78b3e5f572f66c1350328f7f19c601a0 SHA1 4a952400969d38f6455a1ed8888e368ea050330d SHA256 d0e611fbf6114a41796e7f267999724aa079de9e28c0959564987c3ef1995671
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
-iD8DBQFISu+MI1lqEGTUzyQRAldwAJ4kAv0WIkruq+hpHhb1HkJl1fZ4eACfZ/AX
-2jqspkswd7GTfnQFkwrc2wU=
-=X/qo
+iD8DBQFISvt5I1lqEGTUzyQRAk7DAKC9wcFuvtrRfZmlm5yMr/2s+D7C7QCfYpp2
+IiDypb9K+4a8NzI6XAOwyIo=
+=TpsH
-----END PGP SIGNATURE-----
diff --git a/net-nntp/nzbget/files/nzbget.confd b/net-nntp/nzbget/files/nzbget.confd
new file mode 100644
index 000000000000..ee8f38c1aefd
--- /dev/null
+++ b/net-nntp/nzbget/files/nzbget.confd
@@ -0,0 +1,15 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# /etc/conf.d/nzbget
+# Config file for nzbget init script
+
+# Which user to run nzbget as
+NZBGET_USER="nzbget"
+NZBGET_GROUP="nzbget"
+
+# Location of config file
+NZBGET_CONFIGFILE="/etc/nzbgetd.conf"
+
+# Other options
+NZBGET_OPTS=""
diff --git a/net-nntp/nzbget/files/nzbget.initd b/net-nntp/nzbget/files/nzbget.initd
new file mode 100644
index 000000000000..c174b81bc505
--- /dev/null
+++ b/net-nntp/nzbget/files/nzbget.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-nntp/nzbget/files/nzbget.initd,v 1.1 2008/06/07 21:19:45 swegener Exp $
+
+opts="pause unpause"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting nzbget"
+ start-stop-daemon --quiet --start --chuid "${NZBGET_USER}" \
+ --group "${NZBGET_GROUP}" --exec /usr/bin/nzbget -- \
+ --configfile "${NZBGET_CONFIGFILE}" --daemon \
+ ${NZBGET_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nzbget"
+ /usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --quit >/dev/null
+ eend $?
+}
+
+pause() {
+ ebegin "Pausing nzbget"
+ /usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --pause >/dev/null
+ eend $?
+}
+
+unpause() {
+ ebegin "Unpausing nzbget"
+ /usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --unpause >/dev/null
+ eend $?
+}
diff --git a/net-nntp/nzbget/nzbget-0.4.0-r1.ebuild b/net-nntp/nzbget/nzbget-0.4.0-r1.ebuild
new file mode 100644
index 000000000000..ea9dfbc463db
--- /dev/null
+++ b/net-nntp/nzbget/nzbget-0.4.0-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-nntp/nzbget/nzbget-0.4.0-r1.ebuild,v 1.1 2008/06/07 21:19:45 swegener Exp $
+
+EAPI="1"
+
+inherit eutils
+
+DESCRIPTION="A command-line based binary newsgrabber supporting .nzb files"
+HOMEPAGE="http://nzbget.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~x86"
+IUSE="debug ncurses parcheck"
+
+DEPEND="dev-libs/libxml2
+ parcheck? (
+ app-arch/libpar2
+ dev-libs/libsigc++:2
+ )
+ ncurses? ( sys-libs/ncurses )"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${A}
+
+ sed -i \
+ -e 's:^$MAINDIR=.*:$MAINDIR=/var/lib/nzbget:' \
+ -e 's:^LockFile=.*:LockFile=/var/run/nzbget/nzbget.pid:' \
+ -e 's:^LogFile=.*:LogFile=/var/log/nzbget/nzbget.log:' \
+ "${S}"/nzbget.conf.example \
+ || die "sed nzbget.conf.example failed"
+}
+
+src_compile() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable ncurses curses) \
+ $(use_enable parcheck) \
+ || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+
+ insinto /etc
+ newins nzbget.conf.example nzbgetd.conf || die "newins failed"
+
+ keepdir /var/lib/nzbget/{dst,nzb,queue,tmp}
+ keepdir /var/{log,run}/nzbget
+
+ newinitd "${FILESDIR}"/nzbget.initd nzbget
+ newconfd "${FILESDIR}"/nzbget.confd nzbget
+
+ dodoc AUTHORS ChangeLog README nzbget.conf.example || die "dodoc failed"
+}
+
+pkg_postinst() {
+ enewgroup nzbget
+ enewuser nzbget -1 -1 /var/lib/nzbget nzbget
+
+ chown nzbget:nzbget "${ROOT}"/var/lib/nzbget/{dst,nzb,queue,tmp}
+ chmod 750 "${ROOT}"/var/lib/nzbget/{queue,tmp}
+ chmod 770 "${ROOT}"/var/lib/nzbget/{dst,nzb}
+
+ chown nzbget:nzbget "${ROOT}"/var/{log,run}/nzbget
+ chmod 750 "${ROOT}"/var/{log,run}/nzbget
+
+ chown root:nzbget "${ROOT}"/etc/nzbgetd.conf
+ chmod 640 "${ROOT}"/etc/nzbgetd.conf
+
+ elog
+ elog "Please add users that you want to be able to use the system-wide"
+ elog "nzbget daemon to the nzbget group. To access the daemon run nzbget"
+ elog "with the --configfile /etc/nzbgetd.conf option."
+ elog
+}