diff options
author | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2001-12-20 12:18:57 +0000 |
---|---|---|
committer | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2001-12-20 12:18:57 +0000 |
commit | a260bf2b4fc6912abc4c995a690bb672d9ee8773 (patch) | |
tree | 9e92a610e4cbf8ca8d0a103c37b2fa82d214198c /security/cyrus-sasl | |
parent | 4731543b1d7b0ebb024e204af2b08b8fad83d880 (diff) | |
download | ports-a260bf2b4fc6912abc4c995a690bb672d9ee8773.tar.gz ports-a260bf2b4fc6912abc4c995a690bb672d9ee8773.zip |
Notes
Diffstat (limited to 'security/cyrus-sasl')
-rw-r--r-- | security/cyrus-sasl/Makefile | 14 | ||||
-rw-r--r-- | security/cyrus-sasl/pkg-deinstall | 4 | ||||
-rw-r--r-- | security/cyrus-sasl/pkg-install | 10 | ||||
-rw-r--r-- | security/cyrus-sasl/pkg-message | 8 | ||||
-rw-r--r-- | security/cyrus-sasl/pkg-plist | 14 | ||||
-rw-r--r-- | security/cyrus-sasl/scripts/configure.sasl | 5 |
6 files changed, 37 insertions, 18 deletions
diff --git a/security/cyrus-sasl/Makefile b/security/cyrus-sasl/Makefile index 6ac56b2108a0..6e6fbb7e8bff 100644 --- a/security/cyrus-sasl/Makefile +++ b/security/cyrus-sasl/Makefile @@ -107,6 +107,17 @@ PLIST_SUB= PREFIX=${PREFIX} \ pre-fetch: @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.sasl +# Fix sasldb name in pkg-install/deinstall scripts +post-patch: + @${SED} -e "/%%SASLDB%%/s##${SASLDB_NAME}#g" \ + ${.CURDIR}/pkg-install > ${PKGINSTALL} + @${SED} -e "/%%SASLDB%%/s##${SASLDB_NAME}#g" \ + ${.CURDIR}/pkg-deinstall > ${PKGDEINSTALL} + @${SED} -e "/%%SASLDB%%/s##${SASLDB_NAME}#g" \ + -e "/%%PREFIX%%/s##${PREFIX}#g" \ + -e "/%%DOCSDIR%%/s##${DOCSDIR}#g" \ + ${.CURDIR}/pkg-message > ${PKGMESSAGE} + pre-configure: @(cd ${WRKSRC} && ${AUTOHEADER}) @@ -119,8 +130,9 @@ post-install: > ${PREFIX}/etc/rc.d/pwcheck.sh @${CHMOD} 755 ${PREFIX}/etc/rc.d/pwcheck.sh ${INSTALL} -d -m 770 -o cyrus -g cyrus /var/pwcheck + @${LN} ${PREFIX}/sbin/pwcheck ${PREFIX}/sbin/pwcheck_pwnam .if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR}/html + @${MKDIR} ${DOCSDIR} .for file in ${DOCS} @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} .endfor diff --git a/security/cyrus-sasl/pkg-deinstall b/security/cyrus-sasl/pkg-deinstall index 2ee2b8bca882..9e18cc7e18ed 100644 --- a/security/cyrus-sasl/pkg-deinstall +++ b/security/cyrus-sasl/pkg-deinstall @@ -10,10 +10,12 @@ PKG_BATCH=${BATCH:=NO} PKG_PREFIX=${PKG_PREFIX:=/usr/local} +SASLDB_NAME=${PKG_PREFIX}/etc/%%SASLDB%% + # delete sasldb database delete_sasldb() { - [ -f %D/etc/sasldb.db -a ! -s %D/etc/sasldb.db ] && rm %D/etc/sasldb.db + [ -f ${SASLDB_NAME} -a ! -s ${SASLDB_NAME} ] && rm ${SASLDB_NAME} } # This should really be uninstalled by Sendmail diff --git a/security/cyrus-sasl/pkg-install b/security/cyrus-sasl/pkg-install index 816c8132ac4d..5bceae998de5 100644 --- a/security/cyrus-sasl/pkg-install +++ b/security/cyrus-sasl/pkg-install @@ -11,6 +11,8 @@ PKG_BATCH=${BATCH:=NO} PKG_PREFIX=${PKG_PREFIX:=/usr/local} +SASLDB_NAME=${PKG_PREFIX}/etc/%%SASLDB%% + # # create 'cyrus' user and group before installing # @@ -70,10 +72,10 @@ create_user() { } create_sasldb() { - if [ ! -f ${PGK_PREFIX}/etc/sasldb.db ]; then - touch ${PKG_PREFIX}/etc/sasldb.db - chown cyrus:mail ${PKG_PREFIX}/etc/sasldb.db - chmod 640 ${PKG_PREFIX}/etc/sasldb.db + if [ ! -f ${SASLDB_NAME} ]; then + touch ${SASLDB_NAME} + chown cyrus:mail ${SASLDB_NAME} + chmod 640 ${SASLDB_NAME} fi } diff --git a/security/cyrus-sasl/pkg-message b/security/cyrus-sasl/pkg-message index 1016d9655c5a..49423c13741d 100644 --- a/security/cyrus-sasl/pkg-message +++ b/security/cyrus-sasl/pkg-message @@ -1,14 +1,14 @@ -PREFIX/etc/cyrusdb.db now needs to be created +%%PREFIX%%/etc/%%SASLDB%% now needs to be created before applications that depend on SASL are used. su cyrus - PREFIX/sbin/saslpasswd -c userid + %%PREFIX%%/sbin/saslpasswd -c userid You will also need to start the pwcheck daemon: - PREFIX/etc/rc.d/pwcheck.sh start + %%PREFIX%%/etc/rc.d/pwcheck.sh start -Read the documentation in PREFIX/share/doc/SASL +Read the documentation in %%DOCSDIR%% How to enable SMTP AUTH with system Sendmail 8.11 - Sendmail.README diff --git a/security/cyrus-sasl/pkg-plist b/security/cyrus-sasl/pkg-plist index 8eeb026c7fee..2ec1121a3687 100644 --- a/security/cyrus-sasl/pkg-plist +++ b/security/cyrus-sasl/pkg-plist @@ -1,4 +1,4 @@ -@unexec [ -r /var/run/pwcheck.pid ] && %D/etc/rc.d/pwcheck.sh stop && echo " stopped." +@unexec if [ -f /var/run/pwcheck.pid ] ; then %D/etc/rc.d/pwcheck.sh stop ; echo " stopped." ; fi etc/rc.d/pwcheck.sh include/sasl/hmac-md5.h include/sasl/md5.h @@ -33,7 +33,9 @@ lib/sasl/libplain.so lib/sasl/libplain.so.1 sbin/sasldblistusers sbin/saslpasswd -sbin/pwcheck +sbin/pwcheck_pwnam +@exec ln %D/sbin/pwcheck_pwnam %D/sbin/pwcheck +@unexec rm -f %D/sbin/pwcheck %%PORTDOCS%%%%DOCSDIR%%/AUTHORS %%PORTDOCS%%%%DOCSDIR%%/COPYING %%PORTDOCS%%%%DOCSDIR%%/ChangeLog @@ -53,15 +55,11 @@ sbin/pwcheck %%PORTDOCS%%%%DOCSDIR%%/index.html %%PORTDOCS%%%%DOCSDIR%%/programming.html %%PORTDOCS%%%%DOCSDIR%%/sysadmin.html -%%PORTDOCS%%@dirrm %%DOCSDIR%%/html %%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrm lib/sasl -@mode ug=rwx,o= @cwd /var -@exec mkdir pwcheck -@exec chown cyrus:cyrus pwcheck -@exec chmod o= pwcheck +@exec install -d -m 770 -o cyrus -g cyrus %D/pwcheck @comment This file gets created by the pwcheck program -@unexec rm -f /var/pwcheck/pwcheck +@unexec rm -f %D/pwcheck/pwcheck @dirrm pwcheck @cwd %%PREFIX%% diff --git a/security/cyrus-sasl/scripts/configure.sasl b/security/cyrus-sasl/scripts/configure.sasl index 9af2b47675df..930c7acb3758 100644 --- a/security/cyrus-sasl/scripts/configure.sasl +++ b/security/cyrus-sasl/scripts/configure.sasl @@ -5,6 +5,8 @@ if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then exit fi +SASLDB_NAME=sasldb.db + tempfile=`mktemp -t checklist` if [ "${BATCH}" ]; then @@ -74,6 +76,7 @@ while [ "$1" ]; do \"DB3\") echo "LIB_DEPENDS+= db3.2:\${PORTSDIR}/databases/db3" echo "CONFIGURE_ARGS+=--with-dblib=berkeley" + SASLDB_NAME=sasldb ;; \"MySQL\") echo "LIB_DEPENDS+= mysqlclient.10:\${PORTSDIR}/databases/mysql323-client" @@ -92,3 +95,5 @@ while [ "$1" ]; do esac shift done + +echo "SASLDB_NAME= ${SASLDB_NAME}" |