diff options
author | mandree <mandree@FreeBSD.org> | 2011-08-16 04:13:21 +0800 |
---|---|---|
committer | mandree <mandree@FreeBSD.org> | 2011-08-16 04:13:21 +0800 |
commit | 62c076e978deb278832d437406c3947e00c10a86 (patch) | |
tree | 97e532a6bce2ed179e8e0375d6c300d6e763b2fe /mail/fetchmail | |
parent | 7795078a1a451e7a28e192420efc639829517438 (diff) | |
download | freebsd-ports-gnome-62c076e978deb278832d437406c3947e00c10a86.tar.gz freebsd-ports-gnome-62c076e978deb278832d437406c3947e00c10a86.tar.zst freebsd-ports-gnome-62c076e978deb278832d437406c3947e00c10a86.zip |
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]
Diffstat (limited to 'mail/fetchmail')
-rw-r--r-- | mail/fetchmail/Makefile | 11 | ||||
-rw-r--r-- | mail/fetchmail/files/fetchmail.in | 35 |
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" |