1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

Add plist entries to create empty directories.

Add 'sharedindexupdate' srcipt.
Use 'exec' in shell scripts.

PR:		ports/93269
Submitted by:	Yarema <yds@CoolRat.org> (maintainer)
This commit is contained in:
Sam Lawrance 2006-02-14 12:00:05 +00:00
parent de968da4a0
commit 70c6cdd526
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=156001
4 changed files with 65 additions and 7 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= courier
PORTVERSION= 0.52.2
PORTREVISION= 1
CATEGORIES= mail ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier
@ -59,16 +60,15 @@ CALENDIR= /var/spool/calendar
MIMETYPES= ${LOCALBASE}/etc/mime.types
WITH_TRANSPORT= local esmtp dsn
USE_AUTOTOOLS= libtool:15
USE_BZIP2= yes
USE_SUBMAKE= yes
USE_PERL5= yes
USE_FAM= yes
USE_GETTEXT= yes
USE_GMAKE= yes
USE_OPENSSL= yes
USE_PERL5= yes
USE_REINPLACE= yes
USE_AUTOTOOLS= libtool:15
USE_FAM= yes
WANT_FAM_SYSTEM=fam
USE_SUBMAKE= yes
.if defined(WITH_RCORDER)
USE_RCORDER= courier.sh
@ -118,7 +118,7 @@ PLIST_SUB+= BINOWN="${BINOWN}" BINGRP="${BINGRP}" \
CACHEOWN="${CACHEOWN}" CACHEDIR="${CACHEDIR}" \
CALENDIR="${CALENDIR}" LOCALSTATEDIR="${LOCALSTATEDIR}"
SUB_LIST:= ${PLIST_SUB}
SUB_FILES+= pkg-install pkg-message crontab
SUB_FILES+= pkg-install pkg-message crontab sharedindexupdate
OPTIONS+=LDAP "LDAP-based mail aliasing support"
.if (exists(${LOCALBASE}/lib/libldap.a) && exists(${LOCALBASE}/lib/liblber.a)) || defined(WITH_LDAP)
@ -272,6 +272,8 @@ pre-patch:
@${CP} ${TEMPLATES}/config.guess ${TEMPLATES}/config.sub ${WRKSRC}
post-patch:
@${REINPLACE_CMD} -e 's|^PROG=\./|PROG=exec ./|g' \
${WRKSRC}/courier/module.*/courier.config
@${REINPLACE_CMD} -e 's|@datadir@|@sysconfdir@|g' \
${WRKSRC}/*/mk*cert.* \
${WRKSRC}/*/*/mk*cert.*
@ -321,7 +323,8 @@ post-build:
post-install:
@${LN} -f ${SYSCONFDIR}/maildrop ${SYSCONFDIR}/maildropfilter
@${INSTALL_DATA} /dev/null ${SYSCONFDIR}/locallowercase
@${INSTALL_DATA} ${WRKDIR}/crontab ${PREFIX}/etc/courier/
@${INSTALL_DATA} ${WRKDIR}/crontab ${SYSCONFDIR}/
@${INSTALL_SCRIPT} ${WRKDIR}/sharedindexupdate ${DATADIR}/
.for file in ${OWNER0}
@-${CHOWN} -Rh ${BINOWN}:${BINGRP} ${PREFIX}/${file}
.endfor

View File

@ -38,3 +38,11 @@
Documentation (if installed locally) is located in
%%DOCSDIR%%/ otherwise see
http://www.Courier-MTA.org/
If you are planning to serve shared maildirs, then
you should create a cron job that runs at regular
intervals (once every few hours is fine) that
executes the following script to update the
shared folder index:
%%PREFIX%%/share/courier/sharedindexupdate

View File

@ -0,0 +1,26 @@
#!/bin/sh
#
# $NetBSD: sharedindexupdate.sh,v 1.2 2005/02/18 22:12:50 jlam Exp $
# $FreeBSD: /tmp/pcvs/ports/mail/courier/files/sharedindexupdate.in,v 1.1 2006-02-14 12:00:05 lawrance Exp $
#
# This script updates the index of shared folders on the system and is
# only needed if Courier-IMAP or SqWebMail used to serve mail and shared
# folders are used. If so, then this script should be run regularly as a
# system process to ensure the shared folder index is kept up-to-date.
#
# The courier-authlib package must be separately installed to provide the
# "authenumerate" program used in this script.
prefix="%%PREFIX%%"
exec_prefix="${prefix}"
sysconfdir="${prefix}/etc/courier"
sbindir="${exec_prefix}/sbin"
rm -rf ${sysconfdir}/shared.tmp
mkdir ${sysconfdir}/shared.tmp || exit 1
test -x ${sbindir}/authenumerate || exit 1
${sbindir}/authenumerate > ${sysconfdir}/shared.tmp/.tmplist || exit 1
${sbindir}/sharedindexsplit ${sysconfdir}/shared.tmp 1 < ${sysconfdir}/shared.tmp/.tmplist || exit 1
rm -f ${sysconfdir}/shared.tmp/.tmplist
${sbindir}/sharedindexinstall

View File

@ -13,10 +13,12 @@
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %D/etc/courier/aliases
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/esmtpacceptmailfor.dir
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/esmtppercentrelay.dir
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %D/etc/courier/filters
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %D/etc/courier/filters/active
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/shared
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/shared.tmp
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/smtpaccess
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 -d %D/etc/courier/webadmin
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 -d %D/etc/courier/webadmin/added
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 -d %D/etc/courier/webadmin/removed
@unexec rm -f %D/etc/courier/*.dat 2>/dev/null || true
@ -495,6 +497,7 @@ share/courier/rootcerts/verisign-time-stamping-authority.pem
share/courier/rootcerts/visa-ecommerce-root.pem
share/courier/rootcerts/xramp-global-certification-authority.pem
@dirrm share/courier/rootcerts
share/courier/sharedindexupdate
share/courier/sqwebmail/cleancache.pl
share/courier/sqwebmail/html/en-us/CHARSET
share/courier/sqwebmail/html/en-us/ISPELLDICT
@ -733,5 +736,23 @@ share/courier/sqwebmail/webgpg
@exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/submit
@exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/submitmkdir
@exec chown %%MAILOWN%%:%%MAILGRP%% %D/sbin/showmodules
@exec chmod 0555 %D/libexec/courier
@exec chmod 0555 %D/libexec/courier/modules
@exec chmod 0555 %D/libexec/courier/modules/dsn
@exec chmod 0555 %D/libexec/courier/modules/esmtp
%%WITHFAX%%@exec chmod 0555 %D/libexec/courier/modules/fax
@exec chmod 0555 %D/libexec/courier/modules/local
%%WITHUUCP%%@exec chmod 0555 %D/libexec/courier/modules/uucp
@exec chmod 0555 %D/libexec/courier/webmail
@exec chmod 0555 %D/libexec/filters
@exec chmod 0555 %D/share/courier
@exec chmod 0555 %D/share/courier/couriermlm
@exec chmod 0555 %D/share/courier/courierwebadmin
%%WITHFAX%%@exec chmod 0555 %D/share/courier/faxmail
@exec chmod 0555 %D/share/courier/rootcerts
@exec chmod 0555 %D/share/courier/sqwebmail
@exec chmod 0555 %D/share/courier/sqwebmail/html
@exec chmod 0555 %D/share/courier/sqwebmail/html/en-us
@exec chmod 0555 %D/share/courier/sqwebmail/images
@unexec echo y | crontab -u %%CACHEOWN%% -r 2>/dev/null || true
@unexec rm -rf %%CALENDIR%% %%CACHEDIR%% 2>/dev/null || true