summaryrefslogtreecommitdiff
path: root/mail/fetchmail
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2003-09-11 22:58:05 +0000
committerjlam <jlam@pkgsrc.org>2003-09-11 22:58:05 +0000
commit629fec95bd3a2aa68aa3c3da0a92b8a50935acad (patch)
tree6ce8159dc197900e3a91758e213becfa18650cd1 /mail/fetchmail
parent1c0646c9c7fbb8e0a30dfe5dcb0b08ebdd1eeb86 (diff)
downloadpkgsrc-629fec95bd3a2aa68aa3c3da0a92b8a50935acad.tar.gz
Add a rc.d script to easily start fetchmail as a daemon at startup.
Diffstat (limited to 'mail/fetchmail')
-rw-r--r--mail/fetchmail/Makefile6
-rw-r--r--mail/fetchmail/PLIST3
-rwxr-xr-xmail/fetchmail/files/fetchmail.sh26
3 files changed, 32 insertions, 3 deletions
diff --git a/mail/fetchmail/Makefile b/mail/fetchmail/Makefile
index 3e7b4921cca..0a4475beb49 100644
--- a/mail/fetchmail/Makefile
+++ b/mail/fetchmail/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.131 2003/09/02 12:27:46 frueauf Exp $
+# $NetBSD: Makefile,v 1.132 2003/09/11 22:58:05 jlam Exp $
DISTNAME= fetchmail-6.2.4
CATEGORIES= mail
@@ -12,6 +12,7 @@ COMMENT= Batch mail retrieval/forwarding utility for pop2, pop3, apop, imap
BUILD_USES_MSGFMT= YES
USE_BUILDLINK2= YES
+USE_PKGINSTALL= YES
USE_PKGLOCALEDIR= YES
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --without-hesiod
@@ -48,7 +49,8 @@ CONFIGURE_ARGS+= --with-kerberos=no
CONFIGURE_ARGS+= --enable-inet6
.endif
-FDOC= ${PREFIX}/share/doc/fetchmail
+FDOC= ${PREFIX}/share/doc/fetchmail
+RCD_SCRIPTS= fetchmail
post-extract:
@${RM} -f ${WRKSRC}/intl/libintl.h
diff --git a/mail/fetchmail/PLIST b/mail/fetchmail/PLIST
index 4d409803fd3..ac5b0020e80 100644
--- a/mail/fetchmail/PLIST
+++ b/mail/fetchmail/PLIST
@@ -1,5 +1,6 @@
-@comment $NetBSD: PLIST,v 1.6 2003/07/20 14:52:45 frueauf Exp $
+@comment $NetBSD: PLIST,v 1.7 2003/09/11 22:58:05 jlam Exp $
bin/fetchmail
+etc/rc.d/fetchmail
man/man1/fetchmail.1
share/doc/fetchmail/README
share/doc/fetchmail/COPYING
diff --git a/mail/fetchmail/files/fetchmail.sh b/mail/fetchmail/files/fetchmail.sh
new file mode 100755
index 00000000000..e48442411f4
--- /dev/null
+++ b/mail/fetchmail/files/fetchmail.sh
@@ -0,0 +1,26 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: fetchmail.sh,v 1.1 2003/09/11 22:58:06 jlam Exp $
+#
+# PROVIDE: fetchmail
+# REQUIRE: DAEMON
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="fetchmail"
+rcvar=$name
+command="@PREFIX@/bin/${name}"
+pidfile="/var/run/${name}.pid"
+required_files="@PKG_SYSCONFDIR@/${name}.conf"
+extra_commands="reload"
+command_args="-f - < @PKG_SYSCONFDIR@/${name}.conf"
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO@ -n ' ${name}'
+ ${command} ${fetchmail_flags} ${command_args}
+fi