aboutsummaryrefslogtreecommitdiff
path: root/mail/fetchmail
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2011-08-15 20:13:21 +0000
committerMatthias Andree <mandree@FreeBSD.org>2011-08-15 20:13:21 +0000
commitf12c178ff0558ee8df5c72c9dfc39adc3f9518fd (patch)
tree6c51aed33c6c6cea4c44ce8bdcef200b710a63ba /mail/fetchmail
parent60ad1ce7b2f4cd69ff582a93245f35416b6e6e8b (diff)
downloadports-f12c178ff0558ee8df5c72c9dfc39adc3f9518fd.tar.gz
ports-f12c178ff0558ee8df5c72c9dfc39adc3f9518fd.zip
Notes
Diffstat (limited to 'mail/fetchmail')
-rw-r--r--mail/fetchmail/Makefile11
-rw-r--r--mail/fetchmail/files/fetchmail.in35
2 files changed, 24 insertions, 22 deletions
diff --git a/mail/fetchmail/Makefile b/mail/fetchmail/Makefile
index 2b871c7e99e1..558bd76eff1f 100644
--- a/mail/fetchmail/Makefile
+++ b/mail/fetchmail/Makefile
@@ -6,11 +6,13 @@
#
# NOTE: The fetchmailconf program (an interactive program for
# writing .fetchmailrc files) requires Python, Tk, X11, etc..
+#
# The fetchmail program itself does not need Python, but if you
-# want fetchmailconf to work, define WITH_X11
+# want fetchmailconf to work, define the X11 option.
PORTNAME= fetchmail
PORTVERSION= 6.3.20
+PORTREVISION= 1
CATEGORIES= mail ipv6
MASTER_SITES= BERLIOS/fetchmail/ \
http://mandree.home.pages.de/fetchmail/ \
@@ -21,6 +23,7 @@ COMMENT= Batch mail retrieval utility for IMAP/POP3/ETRN/ODMR
RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:${PORTSDIR}/security/ca_root_nss
+# Note USERS can only contain a single word as parts below rely on that.
USERS= ${PORTNAME}
GROUPS= ${USERS}
@@ -45,7 +48,7 @@ MLINKS= fetchmail.1 fetchmailconf.1
OPTIONS= X11 "Python/Tkinter dependencies for fetchmailconf" off \
NLS "National language support (NLS)." on \
NTLM "Build in support for NTLM/MSN authentication." off \
- GSSAPI "Build GSSAPI/Kerberos 5 support" off
+ GSSAPI "Build GSSAPI/Kerberos 5 support" on
.include <bsd.port.options.mk>
@@ -121,7 +124,9 @@ post-install:
${INSTALL_SCRIPT} ${WRKDIR}/fetchmailconf ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/fetchmailconf.py ${PREFIX}/libexec
- ${INSTALL} -m 644 -o fetchmail -g fetchmail ${FILESDIR}/fetchmailrc.sample ${PREFIX}/etc/fetchmailrc.sample
+ ${MKDIR} -m 0755 "/var/run/${PORTNAME}"
+ ${CHOWN} "${USERS}:${GROUPS}" "/var/run/${PORTNAME}"
+ ${INSTALL} -m 644 -o ${USERS} -g ${GROUPS} ${FILESDIR}/fetchmailrc.sample ${PREFIX}/etc/fetchmailrc.sample
if [ ! -f ${PREFIX}/etc/fetchmailrc ]; then \
${CP} -p ${PREFIX}/etc/fetchmailrc.sample ${PREFIX}/etc/fetchmailrc ; \
${CHMOD} 600 ${PREFIX}/etc/fetchmailrc ; \
diff --git a/mail/fetchmail/files/fetchmail.in b/mail/fetchmail/files/fetchmail.in
index a8fc0863a74f..953ee8210c2b 100644
--- a/mail/fetchmail/files/fetchmail.in
+++ b/mail/fetchmail/files/fetchmail.in
@@ -4,7 +4,7 @@
#
# PROVIDE: fetchmail
-# REQUIRE: mail
+# REQUIRE: LOGIN mail
# KEYWORD: shutdown
#
@@ -18,28 +18,28 @@
# * Single system-wide fetchmail daemon:
# - It is run as user `fetchmail_user' (default: fetchmail)
# Note: The directory /var/run/fetchmail must be writable for
-# `fetchmail_user'.
+# 'fetchmail_user'.
# - All configuration is contained in one global file
-# `fetchmail_config' (default: %%PREFIX%%/etc/fetchmailrc),
-# that must be owned by `fetchmail_user' (mode 700)
+# 'fetchmail_config' (default: %%PREFIX%%/etc/fetchmailrc)
+# that must be owned by 'fetchmail_user' (mode 700)
# - The fetchmail daemon awakes to fetch mail every
-# `fetchmail_polling_interval' seconds (default: 900).
+# 'fetchmail_polling_interval' seconds (default: 900).
#
# * Per-user daemon
# - Users for which a fetchmail daemon is to be started must be
-# listed in `fetchmail_users', e.g. fetchmail_users="user1 user2"
-# The `fetchmail_user' (sic!) variable is ignored in this
+# listed in 'fetchmail_users', e.g. fetchmail_users="user1 user2"
+# The 'fetchmail_user' (sic!) variable is ignored in this
# configuration variant.
# - The config files for the individual users must be located at
# ${fetchmail_home_prefix}/${user}/${fetchmail_config_name}. The
-# default for `fetchmail_home_prefix' is "/home", and that for
-# `fetchmail_config_name' is ".fetchmailrc".
+# default for 'fetchmail_home_prefix' is "/home", and that for
+# 'fetchmail_config_name' is ".fetchmailrc".
# - Note that "${fetchmail_home_prefix}/${user}" must be writable
# for ${user} since it is used to store the per-user PID files!
-# - There are user-specific versions of `fetchmail_config' and
-# `fetchmail_polling_interval' that can be used to override the
-# defaults, i.e. for the user `user1' there are variables
-# `fetchmail_user1_config' and `fetchmail_user1_polling_interval'
+# - There are user-specific versions of 'fetchmail_config' and
+# 'fetchmail_polling_interval' that can be used to override the
+# defaults, i.e. for the user 'user1' there are variables
+# 'fetchmail_user1_config' and 'fetchmail_user1_polling_interval'
# - All commands (e.g. start, stop, awaken (see below)) can be either
# passed to all instances of the daemon (if %%PREFIX%%/etc/rc.d/fetchmail)
# is run as root), or just to the instance belonging to the respective
@@ -47,7 +47,7 @@
#
# Extra commands:
#
-# * `awaken': Sends a signal to the daemon(s) to check for new mail
+# * 'awaken': Sends a signal to the daemon(s) to check for new mail
# immediately
#
# Fetchmail configuration:
@@ -66,11 +66,7 @@ pidfile=/var/run/fetchmail/${name}.pid
extra_commands="awaken"
awaken_cmd="fetchmail_awaken"
-if [ -f %%PREFIX%%/etc/rc.d/fetchmail ]; then
- fetchmail_script=%%PREFIX%%/etc/rc.d/fetchmail
-elif [ -f %%PREFIX%%/etc/rc.d/fetchmail.sh ]; then
- fetchmail_script=%%PREFIX%%/etc/rc.d/fetchmail.sh
-fi
+fetchmail_script=%%PREFIX%%/etc/rc.d/$name
# read settings, set default values
load_rc_config "$name"
@@ -149,4 +145,5 @@ else
fi
# actually execute the fetchmail program
+export FETCHMAILUSER=$fetchmail_user
run_rc_command "$1"