1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

Assorted minor fixes and touch-ups:

- Fix:     rcfile: export FETCHMAILUSER=$fetchmail_user [1]

- Fix:     when installing from source, make /var/run/fetchmail directory
           so that a global fetchmail installation won't break after port
           upgrades

- Change:  compile GSSAPI support by default (it's in base)

- Cleanup: rcfile: drop support for fetchmail.sh script name

- Cleanup: rcfile: don't mix backtick with apostrophe in comments, they don't
           match

Reported by:  thierry, Victor Balada Diaz <victor@bsdes.net> [1]
Suggested by: Victor Balada Diaz <victor@bsdes.net> [1]
PR:           ports/151783
Approved by:  maintainer timeout [1]
This commit is contained in:
Matthias Andree 2011-08-15 20:13:21 +00:00
parent 60ad1ce7b2
commit f12c178ff0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=279763
2 changed files with 24 additions and 22 deletions

View File

@ -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 ; \

View File

@ -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"