Date: Fri, 18 Mar 2016 11:39:19 +0000 (UTC) From: Hajimu UMEMOTO <ume@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r411341 - in head/mail: cyrus-imapd23 cyrus-imapd23/files cyrus-imapd24 cyrus-imapd24/files cyrus-imapd25 cyrus-imapd25/files Message-ID: <201603181139.u2IBdJRI012198@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ume Date: Fri Mar 18 11:39:18 2016 New Revision: 411341 URL: https://svnweb.freebsd.org/changeset/ports/411341 Log: - Don't install garbage into DOCSDIR. - Rework handling of conf files. Modified: head/mail/cyrus-imapd23/Makefile head/mail/cyrus-imapd23/files/pkg-deinstall.in head/mail/cyrus-imapd23/files/pkg-install.in (contents, props changed) head/mail/cyrus-imapd23/pkg-plist head/mail/cyrus-imapd24/Makefile head/mail/cyrus-imapd24/files/pkg-deinstall.in head/mail/cyrus-imapd24/files/pkg-install.in (contents, props changed) head/mail/cyrus-imapd24/pkg-plist head/mail/cyrus-imapd25/Makefile head/mail/cyrus-imapd25/files/pkg-deinstall.in head/mail/cyrus-imapd25/files/pkg-install.in (contents, props changed) head/mail/cyrus-imapd25/pkg-plist Modified: head/mail/cyrus-imapd23/Makefile ============================================================================== --- head/mail/cyrus-imapd23/Makefile Fri Mar 18 11:36:19 2016 (r411340) +++ head/mail/cyrus-imapd23/Makefile Fri Mar 18 11:39:18 2016 (r411341) @@ -2,7 +2,7 @@ PORTNAME= cyrus-imapd PORTVERSION= 2.3.19 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= mail ipv6 MASTER_SITES= ftp://ftp.cyrusimap.org/cyrus-imapd/ PKGNAMESUFFIX= 23 @@ -107,7 +107,6 @@ DRAC_USE= AUTOTOOLS=autoconf,autoheader MANDIRS= ${CYRUS_PREFIX}/man PORTDOCS= * -PORTEXAMPLES= * SUB_FILES= pkg-message pkg-install pkg-deinstall cyrus-imapd-man.conf @@ -132,6 +131,9 @@ CYRUS_PERL_MAN1=cyradm CYRUS_PERL_MAN3=Cyrus::IMAP Cyrus::IMAP::Admin Cyrus::IMAP::IMSP \ Cyrus::IMAP::Shell Cyrus::SIEVE::managesieve +CONFS= cmu-backend.conf cmu-frontend.conf normal.conf prefork.conf \ + small.conf + .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MBDB} @@ -157,8 +159,11 @@ post-patch-DRAC-on: @${RM} -rf ${WRKSRC}/autom4te.cache post-install: + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${FILESDIR}/imapd.conf \ ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/master/conf/normal.conf \ + ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_SCRIPT} ${WRKSRC}/tools/mkimap \ ${STAGEDIR}${CYRUS_PREFIX}/bin/mkimap ${INSTALL_SCRIPT} ${WRKSRC}/tools/masssievec \ @@ -182,18 +187,18 @@ post-install: post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} \ - "! ( -name Makefile.dist -o -name Makefile -o -name .cvsignore )" + "! ( -name Makefile.dist -o -name Makefile \ + -o -name .cvsignore -o -name htmlstrip.c )" # There are already files in EXAMPLESDIR at that point, so no # need to create it. post-install-EXAMPLES-on: - cd ${WRKSRC}/master/conf && ${COPYTREE_SHARE} . \ - ${STAGEDIR}${EXAMPLESDIR} - -post-install-EXAMPLES-off: - ${INSTALL_DATA} ${WRKSRC}/master/conf/normal.conf \ +.for f in ${CONFS} +.if ${f} != normal.conf + @${INSTALL_DATA} ${WRKSRC}/master/conf/${f} \ ${STAGEDIR}${EXAMPLESDIR} - @${ECHO_CMD} ${EXAMPLESDIR}/imapd.conf >> ${TMPPLIST} - @${ECHO_CMD} ${EXAMPLESDIR}/normal.conf >> ${TMPPLIST} + @${ECHO_CMD} ${EXAMPLESDIR:S,^${PREFIX}/,,}/${f} >>${TMPPLIST} +.endif +.endfor .include <bsd.port.mk> Modified: head/mail/cyrus-imapd23/files/pkg-deinstall.in ============================================================================== --- head/mail/cyrus-imapd23/files/pkg-deinstall.in Fri Mar 18 11:36:19 2016 (r411340) +++ head/mail/cyrus-imapd23/files/pkg-deinstall.in Fri Mar 18 11:39:18 2016 (r411341) @@ -1,29 +1,13 @@ #!/bin/sh # -# $FreeBSD$ -# +# $FreeBSD$ # Created by: hetzels@westbend.net #set -vx PKG_BATCH=${BATCH:=NO} -PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%} -EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%} CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%} -checkfile() { - diff -bBqw $1 $2 >/dev/null 2>&1 - case $? in - 0) # config file exists, but is the same - rm $1 - ;; - 1) # config file exists and differs - ;; - *) # no config file exists - ;; - esac -} - # # Modify the 'cyrus' user created from the cyrus-sasl port # @@ -49,9 +33,6 @@ modify_cyrus_user() { case $2 in DEINSTALL) - cd ${PKG_PREFIX} - checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf - checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf ;; POST-DEINSTALL) modify_cyrus_user Modified: head/mail/cyrus-imapd23/files/pkg-install.in ============================================================================== --- head/mail/cyrus-imapd23/files/pkg-install.in Fri Mar 18 11:36:19 2016 (r411340) +++ head/mail/cyrus-imapd23/files/pkg-install.in Fri Mar 18 11:39:18 2016 (r411341) @@ -1,10 +1,11 @@ #!/bin/sh +# +# $FreeBSD$ #set -vx PKG_BATCH=${BATCH:=NO} PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%} -EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%} CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%} # @@ -24,31 +25,12 @@ modify_cyrus_user() { fi } - -checkfile() { - diff -bBqw $1 $2 >/dev/null 2>&1 - case $? in - 0) # config file exists, but is the same - ;; - 1) # config file exists and differs - echo "** Make sure $1 is in sync with this version"; - echo " of the port. See $1.dist for details."; - ;; - *) # no config file exists, copy it - install -c -m 644 $2 $1 - ;; - esac -} - case $2 in PRE-INSTALL) ;; POST-INSTALL) modify_cyrus_user - cd ${PKG_PREFIX} - checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf - checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf if grep 'sieve' /etc/services; then echo else Modified: head/mail/cyrus-imapd23/pkg-plist ============================================================================== --- head/mail/cyrus-imapd23/pkg-plist Fri Mar 18 11:36:19 2016 (r411340) +++ head/mail/cyrus-imapd23/pkg-plist Fri Mar 18 11:39:18 2016 (r411341) @@ -103,3 +103,5 @@ lib/libcyrus_min.a %%SITE_ARCH%%/Cyrus/SIEVE/managesieve.pm %%SITE_ARCH%%/auto/Cyrus/IMAP/IMAP.so %%SITE_ARCH%%/auto/Cyrus/SIEVE/managesieve/managesieve.so +@sample %%EXAMPLESDIR%%/imapd.conf etc/imapd.conf +@sample %%EXAMPLESDIR%%/normal.conf etc/cyrus.conf Modified: head/mail/cyrus-imapd24/Makefile ============================================================================== --- head/mail/cyrus-imapd24/Makefile Fri Mar 18 11:36:19 2016 (r411340) +++ head/mail/cyrus-imapd24/Makefile Fri Mar 18 11:39:18 2016 (r411341) @@ -2,7 +2,7 @@ PORTNAME= cyrus-imapd PORTVERSION= 2.4.18 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail ipv6 MASTER_SITES= ftp://ftp.cyrusimap.org/cyrus-imapd/ \ http://cyrusimap.org/releases/ @@ -116,7 +116,6 @@ DRAC_USE= AUTOTOOLS=autoconf,autoheader MANDIRS= ${CYRUS_PREFIX}/man PORTDOCS= * -PORTEXAMPLES= * SUB_FILES= pkg-message pkg-install pkg-deinstall cyrus-imapd-man.conf @@ -141,6 +140,9 @@ CYRUS_PERL_MAN1=cyradm CYRUS_PERL_MAN3=Cyrus::IMAP Cyrus::IMAP::Admin Cyrus::IMAP::IMSP \ Cyrus::IMAP::Shell Cyrus::SIEVE::managesieve +CONFS= cmu-backend.conf cmu-frontend.conf normal.conf prefork.conf \ + small.conf + .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MBDB} @@ -171,8 +173,11 @@ post-patch-DRAC-on: @${RM} -rf ${WRKSRC}/autom4te.cache post-install: + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${FILESDIR}/imapd.conf \ ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/master/conf/normal.conf \ + ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_SCRIPT} ${WRKSRC}/tools/mkimap \ ${STAGEDIR}${CYRUS_PREFIX}/bin/mkimap ${INSTALL_SCRIPT} ${WRKSRC}/tools/masssievec \ @@ -196,18 +201,18 @@ post-install: post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} \ - "! ( -name Makefile.dist -o -name Makefile -o -name .cvsignore )" + "! ( -name Makefile.dist -o -name Makefile \ + -o -name .cvsignore -o -name htmlstrip.c )" -# there are already files in examplesdir at that point, so no +# there are already files in EXAMPLESDIR at that point, so no # need to create it. post-install-EXAMPLES-on: - cd ${WRKSRC}/master/conf && ${COPYTREE_SHARE} . \ - ${STAGEDIR}${EXAMPLESDIR} - -post-install-EXAMPLES-off: - ${INSTALL_DATA} ${WRKSRC}/master/conf/normal.conf \ +.for f in ${CONFS} +.if ${f} != normal.conf + @${INSTALL_DATA} ${WRKSRC}/master/conf/${f} \ ${STAGEDIR}${EXAMPLESDIR} - @${ECHO_CMD} ${EXAMPLESDIR}/imapd.conf >> ${TMPPLIST} - @${ECHO_CMD} ${EXAMPLESDIR}/normal.conf >> ${TMPPLIST} + @${ECHO_CMD} ${EXAMPLESDIR:S,^${PREFIX}/,,}/${f} >>${TMPPLIST} +.endif +.endfor .include <bsd.port.mk> Modified: head/mail/cyrus-imapd24/files/pkg-deinstall.in ============================================================================== --- head/mail/cyrus-imapd24/files/pkg-deinstall.in Fri Mar 18 11:36:19 2016 (r411340) +++ head/mail/cyrus-imapd24/files/pkg-deinstall.in Fri Mar 18 11:39:18 2016 (r411341) @@ -1,29 +1,13 @@ #!/bin/sh # -# $FreeBSD$ -# +# $FreeBSD$ # Created by: hetzels@westbend.net #set -vx PKG_BATCH=${BATCH:=NO} -PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%} -EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%} CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%} -checkfile() { - diff -bBqw $1 $2 >/dev/null 2>&1 - case $? in - 0) # config file exists, but is the same - rm $1 - ;; - 1) # config file exists and differs - ;; - *) # no config file exists - ;; - esac -} - # # Modify the 'cyrus' user created from the cyrus-sasl port # @@ -49,9 +33,6 @@ modify_cyrus_user() { case $2 in DEINSTALL) - cd ${PKG_PREFIX} - checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf - checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf ;; POST-DEINSTALL) modify_cyrus_user Modified: head/mail/cyrus-imapd24/files/pkg-install.in ============================================================================== --- head/mail/cyrus-imapd24/files/pkg-install.in Fri Mar 18 11:36:19 2016 (r411340) +++ head/mail/cyrus-imapd24/files/pkg-install.in Fri Mar 18 11:39:18 2016 (r411341) @@ -1,10 +1,11 @@ #!/bin/sh +# +# $FreeBSD$ #set -vx PKG_BATCH=${BATCH:=NO} PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%} -EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%} CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%} # @@ -24,31 +25,12 @@ modify_cyrus_user() { fi } - -checkfile() { - diff -bBqw $1 $2 >/dev/null 2>&1 - case $? in - 0) # config file exists, but is the same - ;; - 1) # config file exists and differs - echo "** Make sure $1 is in sync with this version"; - echo " of the port. See $1.dist for details."; - ;; - *) # no config file exists, copy it - install -c -m 644 $2 $1 - ;; - esac -} - case $2 in PRE-INSTALL) ;; POST-INSTALL) modify_cyrus_user - cd ${PKG_PREFIX} - checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf - checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf if grep 'sieve' /etc/services; then echo else Modified: head/mail/cyrus-imapd24/pkg-plist ============================================================================== --- head/mail/cyrus-imapd24/pkg-plist Fri Mar 18 11:36:19 2016 (r411340) +++ head/mail/cyrus-imapd24/pkg-plist Fri Mar 18 11:39:18 2016 (r411341) @@ -105,3 +105,5 @@ lib/libcyrus_min.a %%SITE_ARCH%%/Cyrus/SIEVE/managesieve.pm %%SITE_ARCH%%/auto/Cyrus/IMAP/IMAP.so %%SITE_ARCH%%/auto/Cyrus/SIEVE/managesieve/managesieve.so +@sample %%EXAMPLESDIR%%/imapd.conf etc/imapd.conf +@sample %%EXAMPLESDIR%%/normal.conf etc/cyrus.conf Modified: head/mail/cyrus-imapd25/Makefile ============================================================================== --- head/mail/cyrus-imapd25/Makefile Fri Mar 18 11:36:19 2016 (r411340) +++ head/mail/cyrus-imapd25/Makefile Fri Mar 18 11:39:18 2016 (r411341) @@ -2,7 +2,7 @@ PORTNAME= cyrus-imapd PORTVERSION= 2.5.7 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= mail ipv6 MASTER_SITES= ftp://ftp.cyrusimap.org/cyrus-imapd/ \ http://cyrusimap.org/releases/ @@ -113,7 +113,6 @@ GSSAPI_MIT_CONFIGURE_ON= --enable-gssapi MANDIRS= ${CYRUS_PREFIX}/man PORTDOCS= * -PORTEXAMPLES= * SUB_FILES= pkg-message pkg-install pkg-deinstall cyrus-imapd-man.conf @@ -139,6 +138,9 @@ CYRUS_PERL_MAN3=Cyrus::Annotator::Daemon Cyrus::IMAP Cyrus::IMAP::Admin Cyrus::IMAP::IMSP \ Cyrus::IMAP::Shell Cyrus::SIEVE::managesieve +CONFS= cmu-backend.conf cmu-frontend.conf normal.conf prefork.conf \ + small.conf + .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MBDB} @@ -200,6 +202,8 @@ post-install: ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${FILESDIR}/imapd.conf \ ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/master/conf/normal.conf \ + ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_SCRIPT} ${WRKSRC}/tools/mkimap \ ${STAGEDIR}${CYRUS_PREFIX}/bin/mkimap ${INSTALL_SCRIPT} ${WRKSRC}/tools/masssievec \ @@ -223,18 +227,19 @@ post-install: post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} \ - "! ( -name Makefile.dist -o -name Makefile -o -name .gitignore )" + "! ( -name Makefile.dist -o -name Makefile \ + -o -name .gitignore -o -name htmlstrip.Po \ + -o -name htmlstrip.c )" -# there are already files in examplesdir at that point, so no +# there are already files in EXAMPLESDIR at that point, so no # need to create it. post-install-EXAMPLES-on: - cd ${WRKSRC}/master/conf && ${COPYTREE_SHARE} . \ - ${STAGEDIR}${EXAMPLESDIR} - -post-install-EXAMPLES-off: - ${INSTALL_DATA} ${WRKSRC}/master/conf/normal.conf \ +.for f in ${CONFS} +.if ${f} != normal.conf + @${INSTALL_DATA} ${WRKSRC}/master/conf/${f} \ ${STAGEDIR}${EXAMPLESDIR} - @${ECHO_CMD} ${EXAMPLESDIR}/imapd.conf >> ${TMPPLIST} - @${ECHO_CMD} ${EXAMPLESDIR}/normal.conf >> ${TMPPLIST} + @${ECHO_CMD} ${EXAMPLESDIR:S,^${PREFIX}/,,}/${f} >>${TMPPLIST} +.endif +.endfor .include <bsd.port.mk> Modified: head/mail/cyrus-imapd25/files/pkg-deinstall.in ============================================================================== --- head/mail/cyrus-imapd25/files/pkg-deinstall.in Fri Mar 18 11:36:19 2016 (r411340) +++ head/mail/cyrus-imapd25/files/pkg-deinstall.in Fri Mar 18 11:39:18 2016 (r411341) @@ -1,29 +1,13 @@ #!/bin/sh # -# $FreeBSD$ -# +# $FreeBSD$ # Created by: hetzels@westbend.net #set -vx PKG_BATCH=${BATCH:=NO} -PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%} -EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%} CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%} -checkfile() { - diff -bBqw $1 $2 >/dev/null 2>&1 - case $? in - 0) # config file exists, but is the same - rm $1 - ;; - 1) # config file exists and differs - ;; - *) # no config file exists - ;; - esac -} - # # Modify the 'cyrus' user created from the cyrus-sasl port # @@ -49,9 +33,6 @@ modify_cyrus_user() { case $2 in DEINSTALL) - cd ${PKG_PREFIX} - checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf - checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf ;; POST-DEINSTALL) modify_cyrus_user Modified: head/mail/cyrus-imapd25/files/pkg-install.in ============================================================================== --- head/mail/cyrus-imapd25/files/pkg-install.in Fri Mar 18 11:36:19 2016 (r411340) +++ head/mail/cyrus-imapd25/files/pkg-install.in Fri Mar 18 11:39:18 2016 (r411341) @@ -1,10 +1,11 @@ #!/bin/sh +# +# $FreeBSD$ #set -vx PKG_BATCH=${BATCH:=NO} PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%} -EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%} CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%} # @@ -24,31 +25,12 @@ modify_cyrus_user() { fi } - -checkfile() { - diff -bBqw $1 $2 >/dev/null 2>&1 - case $? in - 0) # config file exists, but is the same - ;; - 1) # config file exists and differs - echo "** Make sure $1 is in sync with this version"; - echo " of the port. See $1.dist for details."; - ;; - *) # no config file exists, copy it - install -c -m 644 $2 $1 - ;; - esac -} - case $2 in PRE-INSTALL) ;; POST-INSTALL) modify_cyrus_user - cd ${PKG_PREFIX} - checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf - checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf if grep 'sieve' /etc/services; then echo else Modified: head/mail/cyrus-imapd25/pkg-plist ============================================================================== --- head/mail/cyrus-imapd25/pkg-plist Fri Mar 18 11:36:19 2016 (r411340) +++ head/mail/cyrus-imapd25/pkg-plist Fri Mar 18 11:39:18 2016 (r411341) @@ -137,3 +137,5 @@ lib/libcyrus_sieve.so.0.0.0 libdata/pkgconfig/libcyrus.pc libdata/pkgconfig/libcyrus_min.pc libdata/pkgconfig/libcyrus_sieve.pc +@sample %%EXAMPLESDIR%%/imapd.conf etc/imapd.conf +@sample %%EXAMPLESDIR%%/normal.conf etc/cyrus.conf
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603181139.u2IBdJRI012198>