summaryrefslogtreecommitdiff
path: root/net-mail/fetchmail/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-mail/fetchmail/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-mail/fetchmail/files')
-rw-r--r--net-mail/fetchmail/files/fetchmail-6.3.26-python-optional.patch14
-rw-r--r--net-mail/fetchmail/files/fetchmail-6.3.26-tests.patch11
-rw-r--r--net-mail/fetchmail/files/fetchmail.conf1
-rw-r--r--net-mail/fetchmail/files/fetchmail.confd9
-rw-r--r--net-mail/fetchmail/files/fetchmail.initd44
-rw-r--r--net-mail/fetchmail/files/fetchmail.service11
-rw-r--r--net-mail/fetchmail/files/fetchmail_at.service11
7 files changed, 101 insertions, 0 deletions
diff --git a/net-mail/fetchmail/files/fetchmail-6.3.26-python-optional.patch b/net-mail/fetchmail/files/fetchmail-6.3.26-python-optional.patch
new file mode 100644
index 000000000000..2eafe4dcbb24
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail-6.3.26-python-optional.patch
@@ -0,0 +1,14 @@
+--- fetchmail-6.3.26/Makefile.am
++++ fetchmail-6.3.26/Makefile.am
+@@ -16,9 +16,11 @@
+ pys= fetchmailconf.py
+ pym= fetchmailconf.man
+
++if HAVE_PYTHON
+ nodist_bin_SCRIPTS= fetchmailconf
+ python_PYTHON= $(pys)
+ dist_man1_MANS+= $(pym)
++endif
+
+ CLEANFILES= $(nodist_bin_SCRIPTS)
+
diff --git a/net-mail/fetchmail/files/fetchmail-6.3.26-tests.patch b/net-mail/fetchmail/files/fetchmail-6.3.26-tests.patch
new file mode 100644
index 000000000000..a0b3e8b5dfbb
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail-6.3.26-tests.patch
@@ -0,0 +1,11 @@
+--- fetchmail-6.3.26/Makefile.am
++++ fetchmail-6.3.26/Makefile.am
+@@ -45,7 +47,7 @@
+ check_PROGRAMS=
+
+ TESTS= t.smoke t.validate-xhtml10 t.validate-xhtml t.x509_name_match
+-TESTS_ENVIRONMENT= srcdir="$(srcdir)" LC_ALL=C TZ=UTC SHELL="$(SHELL)" $(SHELL)
++TESTS_ENVIRONMENT= srcdir="$(srcdir)" LC_ALL=C TZ=UTC SHELL="$(SHELL)"
+
+ if NEED_TRIO
+ noinst_LIBRARIES+= libtrio.a
diff --git a/net-mail/fetchmail/files/fetchmail.conf b/net-mail/fetchmail/files/fetchmail.conf
new file mode 100644
index 000000000000..07945f876468
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail.conf
@@ -0,0 +1 @@
+d /run/fetchmail 700 fetchmail nobody
diff --git a/net-mail/fetchmail/files/fetchmail.confd b/net-mail/fetchmail/files/fetchmail.confd
new file mode 100644
index 000000000000..67feed2e6401
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail.confd
@@ -0,0 +1,9 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Polling frequency in seconds
+# (fetchmail will daemonize and check for new mail at this interval)
+polling_period="60"
+
+# Directory where the pid file is kept
+pid_dir="/var/run/fetchmail"
diff --git a/net-mail/fetchmail/files/fetchmail.initd b/net-mail/fetchmail/files/fetchmail.initd
new file mode 100644
index 000000000000..f967e5aed552
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail.initd
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+
+piddir=${pid_dir:-/var/run/fetchmail}
+pid_file=${piddir}/${RC_SVCNAME}.pid
+rcfile=/etc/${RC_SVCNAME}rc
+
+depend() {
+ need net
+ use mta
+}
+
+checkconfig() {
+ if [ ! -f ${rcfile} ]; then
+ eerror "Configuration file ${rcfile} not found"
+ return 1
+ fi
+ local fetchmail_instance
+ fetchmail_instance=${RC_SVCNAME##*.}
+ if [ -n "${fetchmail_instance}" -a "${RC_SVCNAME}" != "fetchmail" ]; then
+ fidfile=/var/lib/fetchmail/.fetchids.${RC_SVCNAME}
+ else
+ fidfile=/var/lib/fetchmail/.fetchids
+ fi
+ if [ ! -d ${piddir} ]; then
+ checkpath -q -d -o fetchmail:fetchmail -m 0755 ${piddir} || return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${RC_SVCNAME}"
+ start-stop-daemon --start --pidfile ${pid_file} \
+ --user fetchmail --exec /usr/bin/fetchmail \
+ -- -d ${polling_period} -f ${rcfile} \
+ --pidfile ${pid_file} -i ${fidfile}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping ${RC_SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile ${pid_file}
+ eend ${?}
+}
+
diff --git a/net-mail/fetchmail/files/fetchmail.service b/net-mail/fetchmail/files/fetchmail.service
new file mode 100644
index 000000000000..954f06e27be0
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=A remote-mail retrieval utility
+After=network.target
+
+[Service]
+User=fetchmail
+ExecStart=/usr/bin/fetchmail -d 60 -f /etc/fetchmailrc
+RestartSec=1
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-mail/fetchmail/files/fetchmail_at.service b/net-mail/fetchmail/files/fetchmail_at.service
new file mode 100644
index 000000000000..7e23bf1ed2a4
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail_at.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=A remote-mail retrieval utility for %i
+After=network.target
+
+[Service]
+User=fetchmail
+ExecStart=/usr/bin/fetchmail --pidfile %t/fetchmail/fetchmail-%i.pid -i /var/lib/fetchmail/.fetchids.%i -f /etc/fetchmailrc-%i -d 60
+RestartSec=1
+
+[Install]
+WantedBy=multi-user.target