Utilize EXAMPLESDIR.

This commit is contained in:
Hajimu UMEMOTO 2004-07-19 12:22:38 +00:00
parent f7afd26d09
commit 5aab4401f9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=114200
12 changed files with 81 additions and 69 deletions

View file

@ -215,6 +215,9 @@ DOCS= altnamespace anoncvs bugs changes faq feedback index \
mailing-list man notes os overview questions readme sieve \
sieve-protocol specs
CONFS= cmu-frontend.conf prefork.conf cmu-backend.conf normal.conf \
small.conf
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PKGINSTALL= ${WRKDIR}/pkg-install
@ -230,8 +233,12 @@ RC_SCRIPTS_SUB= PREFIX=${PREFIX} \
post-patch:
@${SED} -e "s|%%CYRUS_USER%%|${CYRUS_USER}|g" \
-e "s|%%PREFIX%%|${PREFIX}|g" \
-e "s|%%EXAMPLESDIR%%|${EXAMPLESDIR}|g" \
${.CURDIR}/pkg-install > ${PKGINSTALL}
@${SED} -e "s|%%CYRUS_USER%%|${CYRUS_USER}|g" \
-e "s|%%PREFIX%%|${PREFIX}|g" \
-e "s|%%EXAMPLESDIR%%|${EXAMPLESDIR}|g" \
${.CURDIR}/pkg-deinstall > ${PKGDEINSTALL}
@${REINPLACE_CMD} -e "s|/etc/|${PREFIX}/etc/|" \
-e "s|%%CYRUS_USER%%|${CYRUS_USER}|g" \
@ -288,10 +295,14 @@ post-install:
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/imapd.sh > ${PREFIX}/etc/rc.d/imapd.sh
@${CHMOD} 755 ${PREFIX}/etc/rc.d/imapd.sh
@${INSTALL_DATA} ${FILESDIR}/imapd.conf \
${PREFIX}/etc/imapd.conf.dist
@${INSTALL_DATA} ${WRKSRC}/master/conf/normal.conf \
${PREFIX}/etc/cyrus.conf.dist
@${MKDIR} ${EXAMPLESDIR}
@${INSTALL_DATA} ${FILESDIR}/imapd.conf ${EXAMPLESDIR}
.for f in ${CONFS}
@${INSTALL_DATA} ${WRKSRC}/master/conf/${f} ${EXAMPLESDIR}
@${ECHO_CMD} ${EXAMPLESDIR:S,^${PREFIX}/,,}/${f} >>${TMPPLIST}
.endfor
@${ECHO_CMD} @dirrm ${EXAMPLESDIR:S,^${PREFIX}/,,} \
>>${TMPPLIST}
@${INSTALL_SCRIPT} ${WRKSRC}/tools/mkimap \
${PREFIX}/cyrus/bin/mkimap
@${INSTALL_SCRIPT} ${WRKSRC}/tools/masssievec \

View file

@ -7,13 +7,12 @@
#set -vx
PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%}
CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}
checkfile() {
diff -bBqw $1 $1.dist >/dev/null 2>&1
diff -bBqw $1 $2 >/dev/null 2>&1
case $? in
0) # config file exists, but is the same
rm $1
@ -52,8 +51,8 @@ modify_cyrus_user() {
case $2 in
DEINSTALL)
cd ${PKG_PREFIX}
checkfile ${PKG_PREIFX}/etc/imapd.conf
checkfile ${PKG_PREIFX}/etc/cyrus.conf
checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf
checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf
;;
POST-DEINSTALL)
modify_cyrus_user

View file

@ -3,9 +3,8 @@
#set -vx
PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%}
CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}
#
@ -28,7 +27,7 @@ modify_cyrus_user() {
checkfile() {
diff -bBqw $1 $1.dist >/dev/null 2>&1
diff -bBqw $1 $2 >/dev/null 2>&1
case $? in
0) # config file exists, but is the same
;;
@ -37,7 +36,7 @@ checkfile() {
echo " of the port. See $1.dist for details.";
;;
*) # no config file exists, copy it
install -c -m 644 $1.dist $1
install -c -m 644 $2 $1
;;
esac
}
@ -49,8 +48,8 @@ case $2 in
POST-INSTALL)
modify_cyrus_user
cd ${PKG_PREFIX}
checkfile ${PKG_PREFIX}/etc/imapd.conf
checkfile ${PKG_PREFIX}/etc/cyrus.conf
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

View file

@ -45,12 +45,6 @@ cyrus/bin/smmapd
cyrus/bin/squatter
cyrus/bin/timsieved
cyrus/bin/tls_prune
@unexec if cmp -s %D/etc/cyrus.conf %D/etc/cyrus.conf.dist; then rm -f %D/etc/cyrus.conf; fi
etc/cyrus.conf.dist
@exec [ -f %B/cyrus.conf ] || cp %B/%f %B/cyrus.conf
@unexec if cmp -s %D/etc/imapd.conf %D/etc/imapd.conf.dist; then rm -f %D/etc/imapd.conf; fi
etc/imapd.conf.dist
@exec [ -f %B/imapd.conf ] || cp %B/%f %B/imapd.conf
etc/rc.d/imapd.sh
include/cyrus/acl.h
include/cyrus/assert.h
@ -97,6 +91,7 @@ lib/libcyrus.a
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/.packlist
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/managesieve.bs
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/managesieve.so
%%EXAMPLESDIR%%/imapd.conf
@dirrm cyrus/bin
@dirrm include/cyrus
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/Cyrus/IMAP

View file

@ -215,6 +215,9 @@ DOCS= altnamespace anoncvs bugs changes faq feedback index \
mailing-list man notes os overview questions readme sieve \
sieve-protocol specs
CONFS= cmu-frontend.conf prefork.conf cmu-backend.conf normal.conf \
small.conf
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PKGINSTALL= ${WRKDIR}/pkg-install
@ -230,8 +233,12 @@ RC_SCRIPTS_SUB= PREFIX=${PREFIX} \
post-patch:
@${SED} -e "s|%%CYRUS_USER%%|${CYRUS_USER}|g" \
-e "s|%%PREFIX%%|${PREFIX}|g" \
-e "s|%%EXAMPLESDIR%%|${EXAMPLESDIR}|g" \
${.CURDIR}/pkg-install > ${PKGINSTALL}
@${SED} -e "s|%%CYRUS_USER%%|${CYRUS_USER}|g" \
-e "s|%%PREFIX%%|${PREFIX}|g" \
-e "s|%%EXAMPLESDIR%%|${EXAMPLESDIR}|g" \
${.CURDIR}/pkg-deinstall > ${PKGDEINSTALL}
@${REINPLACE_CMD} -e "s|/etc/|${PREFIX}/etc/|" \
-e "s|%%CYRUS_USER%%|${CYRUS_USER}|g" \
@ -288,10 +295,14 @@ post-install:
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/imapd.sh > ${PREFIX}/etc/rc.d/imapd.sh
@${CHMOD} 755 ${PREFIX}/etc/rc.d/imapd.sh
@${INSTALL_DATA} ${FILESDIR}/imapd.conf \
${PREFIX}/etc/imapd.conf.dist
@${INSTALL_DATA} ${WRKSRC}/master/conf/normal.conf \
${PREFIX}/etc/cyrus.conf.dist
@${MKDIR} ${EXAMPLESDIR}
@${INSTALL_DATA} ${FILESDIR}/imapd.conf ${EXAMPLESDIR}
.for f in ${CONFS}
@${INSTALL_DATA} ${WRKSRC}/master/conf/${f} ${EXAMPLESDIR}
@${ECHO_CMD} ${EXAMPLESDIR:S,^${PREFIX}/,,}/${f} >>${TMPPLIST}
.endfor
@${ECHO_CMD} @dirrm ${EXAMPLESDIR:S,^${PREFIX}/,,} \
>>${TMPPLIST}
@${INSTALL_SCRIPT} ${WRKSRC}/tools/mkimap \
${PREFIX}/cyrus/bin/mkimap
@${INSTALL_SCRIPT} ${WRKSRC}/tools/masssievec \

View file

@ -7,13 +7,12 @@
#set -vx
PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%}
CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}
checkfile() {
diff -bBqw $1 $1.dist >/dev/null 2>&1
diff -bBqw $1 $2 >/dev/null 2>&1
case $? in
0) # config file exists, but is the same
rm $1
@ -52,8 +51,8 @@ modify_cyrus_user() {
case $2 in
DEINSTALL)
cd ${PKG_PREFIX}
checkfile ${PKG_PREIFX}/etc/imapd.conf
checkfile ${PKG_PREIFX}/etc/cyrus.conf
checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf
checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf
;;
POST-DEINSTALL)
modify_cyrus_user

View file

@ -3,9 +3,8 @@
#set -vx
PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%}
CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}
#
@ -28,7 +27,7 @@ modify_cyrus_user() {
checkfile() {
diff -bBqw $1 $1.dist >/dev/null 2>&1
diff -bBqw $1 $2 >/dev/null 2>&1
case $? in
0) # config file exists, but is the same
;;
@ -37,7 +36,7 @@ checkfile() {
echo " of the port. See $1.dist for details.";
;;
*) # no config file exists, copy it
install -c -m 644 $1.dist $1
install -c -m 644 $2 $1
;;
esac
}
@ -49,8 +48,8 @@ case $2 in
POST-INSTALL)
modify_cyrus_user
cd ${PKG_PREFIX}
checkfile ${PKG_PREFIX}/etc/imapd.conf
checkfile ${PKG_PREFIX}/etc/cyrus.conf
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

View file

@ -45,12 +45,6 @@ cyrus/bin/smmapd
cyrus/bin/squatter
cyrus/bin/timsieved
cyrus/bin/tls_prune
@unexec if cmp -s %D/etc/cyrus.conf %D/etc/cyrus.conf.dist; then rm -f %D/etc/cyrus.conf; fi
etc/cyrus.conf.dist
@exec [ -f %B/cyrus.conf ] || cp %B/%f %B/cyrus.conf
@unexec if cmp -s %D/etc/imapd.conf %D/etc/imapd.conf.dist; then rm -f %D/etc/imapd.conf; fi
etc/imapd.conf.dist
@exec [ -f %B/imapd.conf ] || cp %B/%f %B/imapd.conf
etc/rc.d/imapd.sh
include/cyrus/acl.h
include/cyrus/assert.h
@ -97,6 +91,7 @@ lib/libcyrus.a
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/.packlist
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/managesieve.bs
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/managesieve.so
%%EXAMPLESDIR%%/imapd.conf
@dirrm cyrus/bin
@dirrm include/cyrus
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/Cyrus/IMAP

View file

@ -215,6 +215,9 @@ DOCS= altnamespace anoncvs bugs changes faq feedback index \
mailing-list man notes os overview questions readme sieve \
sieve-protocol specs
CONFS= cmu-frontend.conf prefork.conf cmu-backend.conf normal.conf \
small.conf
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PKGINSTALL= ${WRKDIR}/pkg-install
@ -230,8 +233,12 @@ RC_SCRIPTS_SUB= PREFIX=${PREFIX} \
post-patch:
@${SED} -e "s|%%CYRUS_USER%%|${CYRUS_USER}|g" \
-e "s|%%PREFIX%%|${PREFIX}|g" \
-e "s|%%EXAMPLESDIR%%|${EXAMPLESDIR}|g" \
${.CURDIR}/pkg-install > ${PKGINSTALL}
@${SED} -e "s|%%CYRUS_USER%%|${CYRUS_USER}|g" \
-e "s|%%PREFIX%%|${PREFIX}|g" \
-e "s|%%EXAMPLESDIR%%|${EXAMPLESDIR}|g" \
${.CURDIR}/pkg-deinstall > ${PKGDEINSTALL}
@${REINPLACE_CMD} -e "s|/etc/|${PREFIX}/etc/|" \
-e "s|%%CYRUS_USER%%|${CYRUS_USER}|g" \
@ -288,10 +295,14 @@ post-install:
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/imapd.sh > ${PREFIX}/etc/rc.d/imapd.sh
@${CHMOD} 755 ${PREFIX}/etc/rc.d/imapd.sh
@${INSTALL_DATA} ${FILESDIR}/imapd.conf \
${PREFIX}/etc/imapd.conf.dist
@${INSTALL_DATA} ${WRKSRC}/master/conf/normal.conf \
${PREFIX}/etc/cyrus.conf.dist
@${MKDIR} ${EXAMPLESDIR}
@${INSTALL_DATA} ${FILESDIR}/imapd.conf ${EXAMPLESDIR}
.for f in ${CONFS}
@${INSTALL_DATA} ${WRKSRC}/master/conf/${f} ${EXAMPLESDIR}
@${ECHO_CMD} ${EXAMPLESDIR:S,^${PREFIX}/,,}/${f} >>${TMPPLIST}
.endfor
@${ECHO_CMD} @dirrm ${EXAMPLESDIR:S,^${PREFIX}/,,} \
>>${TMPPLIST}
@${INSTALL_SCRIPT} ${WRKSRC}/tools/mkimap \
${PREFIX}/cyrus/bin/mkimap
@${INSTALL_SCRIPT} ${WRKSRC}/tools/masssievec \

View file

@ -7,13 +7,12 @@
#set -vx
PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%}
CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}
checkfile() {
diff -bBqw $1 $1.dist >/dev/null 2>&1
diff -bBqw $1 $2 >/dev/null 2>&1
case $? in
0) # config file exists, but is the same
rm $1
@ -52,8 +51,8 @@ modify_cyrus_user() {
case $2 in
DEINSTALL)
cd ${PKG_PREFIX}
checkfile ${PKG_PREIFX}/etc/imapd.conf
checkfile ${PKG_PREIFX}/etc/cyrus.conf
checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf
checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf
;;
POST-DEINSTALL)
modify_cyrus_user

View file

@ -3,9 +3,8 @@
#set -vx
PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%}
CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}
#
@ -28,7 +27,7 @@ modify_cyrus_user() {
checkfile() {
diff -bBqw $1 $1.dist >/dev/null 2>&1
diff -bBqw $1 $2 >/dev/null 2>&1
case $? in
0) # config file exists, but is the same
;;
@ -37,7 +36,7 @@ checkfile() {
echo " of the port. See $1.dist for details.";
;;
*) # no config file exists, copy it
install -c -m 644 $1.dist $1
install -c -m 644 $2 $1
;;
esac
}
@ -49,8 +48,8 @@ case $2 in
POST-INSTALL)
modify_cyrus_user
cd ${PKG_PREFIX}
checkfile ${PKG_PREFIX}/etc/imapd.conf
checkfile ${PKG_PREFIX}/etc/cyrus.conf
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

View file

@ -45,12 +45,6 @@ cyrus/bin/smmapd
cyrus/bin/squatter
cyrus/bin/timsieved
cyrus/bin/tls_prune
@unexec if cmp -s %D/etc/cyrus.conf %D/etc/cyrus.conf.dist; then rm -f %D/etc/cyrus.conf; fi
etc/cyrus.conf.dist
@exec [ -f %B/cyrus.conf ] || cp %B/%f %B/cyrus.conf
@unexec if cmp -s %D/etc/imapd.conf %D/etc/imapd.conf.dist; then rm -f %D/etc/imapd.conf; fi
etc/imapd.conf.dist
@exec [ -f %B/imapd.conf ] || cp %B/%f %B/imapd.conf
etc/rc.d/imapd.sh
include/cyrus/acl.h
include/cyrus/assert.h
@ -97,6 +91,7 @@ lib/libcyrus.a
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/.packlist
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/managesieve.bs
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/managesieve.so
%%EXAMPLESDIR%%/imapd.conf
@dirrm cyrus/bin
@dirrm include/cyrus
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/Cyrus/IMAP