From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- .../nzbget/files/nzbget-14.0_pre1145-tinfo.patch | 18 ++++++++++++++ net-nntp/nzbget/files/nzbget.confd | 15 ++++++++++++ net-nntp/nzbget/files/nzbget.initd | 28 ++++++++++++++++++++++ net-nntp/nzbget/files/nzbget.initd-r1 | 28 ++++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 net-nntp/nzbget/files/nzbget-14.0_pre1145-tinfo.patch create mode 100644 net-nntp/nzbget/files/nzbget.confd create mode 100644 net-nntp/nzbget/files/nzbget.initd create mode 100644 net-nntp/nzbget/files/nzbget.initd-r1 (limited to 'net-nntp/nzbget/files') diff --git a/net-nntp/nzbget/files/nzbget-14.0_pre1145-tinfo.patch b/net-nntp/nzbget/files/nzbget-14.0_pre1145-tinfo.patch new file mode 100644 index 000000000000..e6cd13f6ffc1 --- /dev/null +++ b/net-nntp/nzbget/files/nzbget-14.0_pre1145-tinfo.patch @@ -0,0 +1,18 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -46,6 +46,7 @@ + AC_PATH_PROG(MAKE, make, $FALSE) + AC_PROG_INSTALL + ++PKG_PROG_PKG_CONFIG() + + dnl + dnl Do all tests with c++ compiler. +@@ -291,6 +292,7 @@ + if test "$FOUND" = "no"; then + AC_MSG_ERROR([Couldn't find curses headers (ncurses.h or curses.h)]) + fi ++ PKG_CHECK_MODULES(ncurses,ncurses,LIBS="$LIBS $ncurses_LIBS",) + AC_SEARCH_LIBS([refresh], [ncurses curses],, + AC_ERROR([Couldn't find curses library])) + else 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..06f75596e438 --- /dev/null +++ b/net-nntp/nzbget/files/nzbget.initd @@ -0,0 +1,28 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +start() { + ebegin "Starting ${RC_SVCNAME}" + checkpath -d -m 0755 -o "${NZBGET_USER}":"${NZBGET_GROUP}" /run/nzbget + start-stop-daemon --quiet --start --user "${NZBGET_USER}" \ + --group "${NZBGET_GROUP}" --exec /usr/bin/nzbget -- \ + --configfile "${NZBGET_CONFIGFILE}" --daemon \ + ${NZBGET_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${RC_SVCNAME}" + start-stop-daemon --stop --exec /usr/bin/nzbget -- \ + --configfile "${NZBGET_CONFIGFILE}" --daemon \ + ${NZBGET_OPTS} +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + /usr/bin/nzbget --configfile "${NZBGET_CONFIGFILE}" --reload >/dev/null + eend $? +} diff --git a/net-nntp/nzbget/files/nzbget.initd-r1 b/net-nntp/nzbget/files/nzbget.initd-r1 new file mode 100644 index 000000000000..2a9fae6c32b4 --- /dev/null +++ b/net-nntp/nzbget/files/nzbget.initd-r1 @@ -0,0 +1,28 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +description="A command-line based binary newsgrabber supporting .nzb files" +pidfile=/run/nzbget/nzbget.pid +command=/usr/bin/nzbget +command_args="--configfile \"${NZBGET_CONFIGFILE}\" \ + --daemon --option LockFile=${pidfile} \ + ${NZBGET_OPTS}" +start_stop_daemon_args="--user \"${NZBGET_USER}\" \ + --group \"${NZBGET_GROUP}\"" + +depend() { + need localmount net +} + +start_pre() { + checkpath -d -m 0755 -o "${NZBGET_USER}":"${NZBGET_GROUP}" /run/nzbget +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + ${command} --configfile "${NZBGET_CONFIGFILE}" --reload >/dev/null + eend $? +} -- cgit v1.2.3