summaryrefslogtreecommitdiff
path: root/net-nntp/nzbget/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-nntp/nzbget/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-nntp/nzbget/files')
-rw-r--r--net-nntp/nzbget/files/nzbget-14.0_pre1145-tinfo.patch18
-rw-r--r--net-nntp/nzbget/files/nzbget.confd15
-rw-r--r--net-nntp/nzbget/files/nzbget.initd28
-rw-r--r--net-nntp/nzbget/files/nzbget.initd-r128
4 files changed, 89 insertions, 0 deletions
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 $?
+}