After a recent discussion on freebsd-ports, I have modified the Horde ports, so that

they now do not overwrite existing configuration files. Rather than backing up the
old ones and allowing the user to merge the files by hand, config files are left
untouched.

Submitted by:	Shaun Amott <shaun@inerd.com>
This commit is contained in:
Marc G. Fournier 2006-04-15 16:11:25 +00:00
parent bf25f04445
commit 5a18218c20
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=159610
36 changed files with 261 additions and 126 deletions

View File

@ -40,7 +40,7 @@ LKRONOLITHDIR?= ${LHORDEDIR}/kronolith
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
SUB_FILES= pkg-message pkg-deinstall
SUB_FILES= pkg-message pkg-install pkg-deinstall
SUB_LIST= KRONOLITHDIR=${KRONOLITHDIR}
PLIST_SUB= KRONOLITHDIR=${LKRONOLITHDIR} HORDE_INC=${HORDE_INC:S|^${LOCALBASE}/||}
@ -68,11 +68,7 @@ do-install:
@${CP} -Rp ${WRKSRC}/${REP} ${KRONOLITHDIR}
.endfor
@${CP} -p ${WRKSRC}/*.php ${KRONOLITHDIR}
.for FILE in ${CONFFILE}
@if [ ! -f ${CONFDIR}/${FILE} ]; then \
${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
fi
.endfor
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${KRONOLITHDIR}
@${CHMOD} -R o-rwx ${CONFDIR}
@${INSTALL_DATA} ${WRKDIR}/httpd-kronolith.conf ${HORDE_INC}
@ -85,6 +81,7 @@ do-install:
.endif
post-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}

View File

@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%KRONOLITHDIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
0) # original config file, will be deleted by pkg-plist
0) # original config file, delete it
rm -f $cf
;;
1) # config file has been updated, must be backuped
cp -p $cf $cf.previous
echo "===> Backing-up..."
echo "---> $cf has been saved ***"
echo "---> as $cf.previous ***"
1) # config file has been updated, leave it alone
;;
*) # not found?
;;

View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
if [ -z "${PACKAGE_BUILDING}" ]; then
# Copy over sample config files unless they already exist
for cf in `ls %%KRONOLITHDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
if [ ! -f $cf ]; then
cp -p $cf.dist $cf
fi
done
fi
;;
esac

View File

@ -13,11 +13,8 @@
%%KRONOLITHDIR%%/calendars.php
%%KRONOLITHDIR%%/config/.htaccess
%%KRONOLITHDIR%%/config/conf.xml
%%KRONOLITHDIR%%/config/keywords.php
%%KRONOLITHDIR%%/config/keywords.php.dist
%%KRONOLITHDIR%%/config/menu.php
%%KRONOLITHDIR%%/config/menu.php.dist
%%KRONOLITHDIR%%/config/prefs.php
%%KRONOLITHDIR%%/config/prefs.php.dist
%%KRONOLITHDIR%%/contacts.php
%%KRONOLITHDIR%%/data.php

View File

@ -30,7 +30,7 @@ USE_GETTEXT= yes
PLIST_SUB= MNEMODIR=${LMNEMODIR} HORDE_INC=${HORDE_INC:S|^${LOCALBASE}/||}
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
SUB_FILES= pkg-message pkg-deinstall
SUB_FILES= pkg-message pkg-install pkg-deinstall
SUB_LIST= MNEMODIR=${MNEMODIR}
REINPLACE_ARGS= -i ""
@ -66,11 +66,7 @@ do-install:
@${CP} -Rp ${WRKSRC}/${REP} ${MNEMODIR}
.endfor
@${CP} -p ${WRKSRC}/*.php ${MNEMODIR}
.for FILE in ${CONFFILE}
@if [ ! -f ${CONFDIR}/${FILE} ]; then \
${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
fi
.endfor
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${MNEMODIR}
@${CHMOD} -R o-rwx ${CONFDIR}
@${INSTALL_DATA} ${WRKDIR}/httpd-mnemo.conf ${HORDE_INC}
@ -83,6 +79,7 @@ do-install:
.endif
post-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}

View File

@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%MNEMODIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
0) # original config file, will be deleted by pkg-plist
0) # original config file, delete it
rm -f $cf
;;
1) # config file has been updated, must be backuped
cp -p $cf $cf.previous
echo "===> Backing-up..."
echo "---> $cf has been saved ***"
echo "---> as $cf.previous ***"
1) # config file has been updated, leave it alone
;;
*) # not found?
;;

View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
if [ -z "${PACKAGE_BUILDING}" ]; then
# Copy over sample config files unless they already exist
for cf in `ls %%MNEMODIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
if [ ! -f $cf ]; then
cp -p $cf.dist $cf
fi
done
fi
;;
esac

View File

@ -9,7 +9,6 @@
%%PORTDOCS%%%%DOCSDIR%%/UPGRADING
%%MNEMODIR%%/config/.htaccess
%%MNEMODIR%%/config/conf.xml
%%MNEMODIR%%/config/prefs.php
%%MNEMODIR%%/config/prefs.php.dist
%%MNEMODIR%%/data.php
%%MNEMODIR%%/index.php

View File

@ -31,7 +31,7 @@ USE_GETTEXT= yes
PLIST_SUB= NAGDIR=${LNAGDIR} HORDE_INC=${HORDE_INC:S|^${LOCALBASE}/||}
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
SUB_FILES= pkg-message pkg-deinstall
SUB_FILES= pkg-message pkg-install pkg-deinstall
SUB_LIST= NAGDIR=${NAGDIR}
REINPLACE_ARGS= -i ""
@ -67,11 +67,7 @@ do-install:
@${CP} -Rp ${WRKSRC}/${REP} ${NAGDIR}
.endfor
@${CP} -p ${WRKSRC}/*.php ${NAGDIR}
.for FILE in ${CONFFILE}
@if [ ! -f ${CONFDIR}/${FILE} ]; then \
${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
fi
.endfor
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${NAGDIR}
@${CHMOD} -R o-rwx ${CONFDIR}
@${INSTALL_DATA} ${WRKDIR}/httpd-nag.conf ${HORDE_INC}
@ -84,6 +80,7 @@ do-install:
.endif
post-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}

View File

@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%NAGDIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
0) # original config file, will be deleted by pkg-plist
0) # original config file, delete it
rm -f $cf
;;
1) # config file has been updated, must be backuped
cp -p $cf $cf.previous
echo "===> Backing-up..."
echo "---> $cf has been saved ***"
echo "---> as $cf.previous ***"
1) # config file has been updated, leave it alone
;;
*) # not found?
;;

View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
if [ -z "${PACKAGE_BUILDING}" ]; then
# Copy over sample config files unless they already exist
for cf in `ls %%NAGDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
if [ ! -f $cf ]; then
cp -p $cf.dist $cf
fi
done
fi
;;
esac

View File

@ -8,9 +8,7 @@
%%PORTDOCS%%%%DOCSDIR%%/UPGRADING
%%NAGDIR%%/config/.htaccess
%%NAGDIR%%/config/conf.xml
%%NAGDIR%%/config/menu.php
%%NAGDIR%%/config/menu.php.dist
%%NAGDIR%%/config/prefs.php
%%NAGDIR%%/config/prefs.php.dist
%%NAGDIR%%/data.php
%%NAGDIR%%/ics.php

View File

@ -40,7 +40,7 @@ LKRONOLITHDIR?= ${LHORDEDIR}/kronolith
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
SUB_FILES= pkg-message pkg-deinstall
SUB_FILES= pkg-message pkg-install pkg-deinstall
SUB_LIST= KRONOLITHDIR=${KRONOLITHDIR}
PLIST_SUB= KRONOLITHDIR=${LKRONOLITHDIR} HORDE_INC=${HORDE_INC:S|^${LOCALBASE}/||}
@ -68,11 +68,7 @@ do-install:
@${CP} -Rp ${WRKSRC}/${REP} ${KRONOLITHDIR}
.endfor
@${CP} -p ${WRKSRC}/*.php ${KRONOLITHDIR}
.for FILE in ${CONFFILE}
@if [ ! -f ${CONFDIR}/${FILE} ]; then \
${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
fi
.endfor
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${KRONOLITHDIR}
@${CHMOD} -R o-rwx ${CONFDIR}
@${INSTALL_DATA} ${WRKDIR}/httpd-kronolith.conf ${HORDE_INC}
@ -85,6 +81,7 @@ do-install:
.endif
post-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}

View File

@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%KRONOLITHDIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
0) # original config file, will be deleted by pkg-plist
0) # original config file, delete it
rm -f $cf
;;
1) # config file has been updated, must be backuped
cp -p $cf $cf.previous
echo "===> Backing-up..."
echo "---> $cf has been saved ***"
echo "---> as $cf.previous ***"
1) # config file has been updated, leave it alone
;;
*) # not found?
;;

View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
if [ -z "${PACKAGE_BUILDING}" ]; then
# Copy over sample config files unless they already exist
for cf in `ls %%KRONOLITHDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
if [ ! -f $cf ]; then
cp -p $cf.dist $cf
fi
done
fi
;;
esac

View File

@ -13,11 +13,8 @@
%%KRONOLITHDIR%%/calendars.php
%%KRONOLITHDIR%%/config/.htaccess
%%KRONOLITHDIR%%/config/conf.xml
%%KRONOLITHDIR%%/config/keywords.php
%%KRONOLITHDIR%%/config/keywords.php.dist
%%KRONOLITHDIR%%/config/menu.php
%%KRONOLITHDIR%%/config/menu.php.dist
%%KRONOLITHDIR%%/config/prefs.php
%%KRONOLITHDIR%%/config/prefs.php.dist
%%KRONOLITHDIR%%/contacts.php
%%KRONOLITHDIR%%/data.php

View File

@ -30,7 +30,7 @@ USE_GETTEXT= yes
PLIST_SUB= MNEMODIR=${LMNEMODIR} HORDE_INC=${HORDE_INC:S|^${LOCALBASE}/||}
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
SUB_FILES= pkg-message pkg-deinstall
SUB_FILES= pkg-message pkg-install pkg-deinstall
SUB_LIST= MNEMODIR=${MNEMODIR}
REINPLACE_ARGS= -i ""
@ -66,11 +66,7 @@ do-install:
@${CP} -Rp ${WRKSRC}/${REP} ${MNEMODIR}
.endfor
@${CP} -p ${WRKSRC}/*.php ${MNEMODIR}
.for FILE in ${CONFFILE}
@if [ ! -f ${CONFDIR}/${FILE} ]; then \
${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
fi
.endfor
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${MNEMODIR}
@${CHMOD} -R o-rwx ${CONFDIR}
@${INSTALL_DATA} ${WRKDIR}/httpd-mnemo.conf ${HORDE_INC}
@ -83,6 +79,7 @@ do-install:
.endif
post-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}

View File

@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%MNEMODIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
0) # original config file, will be deleted by pkg-plist
0) # original config file, delete it
rm -f $cf
;;
1) # config file has been updated, must be backuped
cp -p $cf $cf.previous
echo "===> Backing-up..."
echo "---> $cf has been saved ***"
echo "---> as $cf.previous ***"
1) # config file has been updated, leave it alone
;;
*) # not found?
;;

View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
if [ -z "${PACKAGE_BUILDING}" ]; then
# Copy over sample config files unless they already exist
for cf in `ls %%MNEMODIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
if [ ! -f $cf ]; then
cp -p $cf.dist $cf
fi
done
fi
;;
esac

View File

@ -9,7 +9,6 @@
%%PORTDOCS%%%%DOCSDIR%%/UPGRADING
%%MNEMODIR%%/config/.htaccess
%%MNEMODIR%%/config/conf.xml
%%MNEMODIR%%/config/prefs.php
%%MNEMODIR%%/config/prefs.php.dist
%%MNEMODIR%%/data.php
%%MNEMODIR%%/index.php

View File

@ -31,7 +31,7 @@ USE_GETTEXT= yes
PLIST_SUB= NAGDIR=${LNAGDIR} HORDE_INC=${HORDE_INC:S|^${LOCALBASE}/||}
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
SUB_FILES= pkg-message pkg-deinstall
SUB_FILES= pkg-message pkg-install pkg-deinstall
SUB_LIST= NAGDIR=${NAGDIR}
REINPLACE_ARGS= -i ""
@ -67,11 +67,7 @@ do-install:
@${CP} -Rp ${WRKSRC}/${REP} ${NAGDIR}
.endfor
@${CP} -p ${WRKSRC}/*.php ${NAGDIR}
.for FILE in ${CONFFILE}
@if [ ! -f ${CONFDIR}/${FILE} ]; then \
${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
fi
.endfor
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${NAGDIR}
@${CHMOD} -R o-rwx ${CONFDIR}
@${INSTALL_DATA} ${WRKDIR}/httpd-nag.conf ${HORDE_INC}
@ -84,6 +80,7 @@ do-install:
.endif
post-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}

View File

@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%NAGDIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
0) # original config file, will be deleted by pkg-plist
0) # original config file, delete it
rm -f $cf
;;
1) # config file has been updated, must be backuped
cp -p $cf $cf.previous
echo "===> Backing-up..."
echo "---> $cf has been saved ***"
echo "---> as $cf.previous ***"
1) # config file has been updated, leave it alone
;;
*) # not found?
;;

View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
if [ -z "${PACKAGE_BUILDING}" ]; then
# Copy over sample config files unless they already exist
for cf in `ls %%NAGDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
if [ ! -f $cf ]; then
cp -p $cf.dist $cf
fi
done
fi
;;
esac

View File

@ -8,9 +8,7 @@
%%PORTDOCS%%%%DOCSDIR%%/UPGRADING
%%NAGDIR%%/config/.htaccess
%%NAGDIR%%/config/conf.xml
%%NAGDIR%%/config/menu.php
%%NAGDIR%%/config/menu.php.dist
%%NAGDIR%%/config/prefs.php
%%NAGDIR%%/config/prefs.php.dist
%%NAGDIR%%/data.php
%%NAGDIR%%/ics.php

View File

@ -40,7 +40,7 @@ LKRONOLITHDIR?= ${LHORDEDIR}/kronolith
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
SUB_FILES= pkg-message pkg-deinstall
SUB_FILES= pkg-message pkg-install pkg-deinstall
SUB_LIST= KRONOLITHDIR=${KRONOLITHDIR}
PLIST_SUB= KRONOLITHDIR=${LKRONOLITHDIR} HORDE_INC=${HORDE_INC:S|^${LOCALBASE}/||}
@ -68,11 +68,7 @@ do-install:
@${CP} -Rp ${WRKSRC}/${REP} ${KRONOLITHDIR}
.endfor
@${CP} -p ${WRKSRC}/*.php ${KRONOLITHDIR}
.for FILE in ${CONFFILE}
@if [ ! -f ${CONFDIR}/${FILE} ]; then \
${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
fi
.endfor
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${KRONOLITHDIR}
@${CHMOD} -R o-rwx ${CONFDIR}
@${INSTALL_DATA} ${WRKDIR}/httpd-kronolith.conf ${HORDE_INC}
@ -85,6 +81,7 @@ do-install:
.endif
post-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}

View File

@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%KRONOLITHDIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
0) # original config file, will be deleted by pkg-plist
0) # original config file, delete it
rm -f $cf
;;
1) # config file has been updated, must be backuped
cp -p $cf $cf.previous
echo "===> Backing-up..."
echo "---> $cf has been saved ***"
echo "---> as $cf.previous ***"
1) # config file has been updated, leave it alone
;;
*) # not found?
;;

View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
if [ -z "${PACKAGE_BUILDING}" ]; then
# Copy over sample config files unless they already exist
for cf in `ls %%KRONOLITHDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
if [ ! -f $cf ]; then
cp -p $cf.dist $cf
fi
done
fi
;;
esac

View File

@ -13,11 +13,8 @@
%%KRONOLITHDIR%%/calendars.php
%%KRONOLITHDIR%%/config/.htaccess
%%KRONOLITHDIR%%/config/conf.xml
%%KRONOLITHDIR%%/config/keywords.php
%%KRONOLITHDIR%%/config/keywords.php.dist
%%KRONOLITHDIR%%/config/menu.php
%%KRONOLITHDIR%%/config/menu.php.dist
%%KRONOLITHDIR%%/config/prefs.php
%%KRONOLITHDIR%%/config/prefs.php.dist
%%KRONOLITHDIR%%/contacts.php
%%KRONOLITHDIR%%/data.php

View File

@ -30,7 +30,7 @@ USE_GETTEXT= yes
PLIST_SUB= MNEMODIR=${LMNEMODIR} HORDE_INC=${HORDE_INC:S|^${LOCALBASE}/||}
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
SUB_FILES= pkg-message pkg-deinstall
SUB_FILES= pkg-message pkg-install pkg-deinstall
SUB_LIST= MNEMODIR=${MNEMODIR}
REINPLACE_ARGS= -i ""
@ -66,11 +66,7 @@ do-install:
@${CP} -Rp ${WRKSRC}/${REP} ${MNEMODIR}
.endfor
@${CP} -p ${WRKSRC}/*.php ${MNEMODIR}
.for FILE in ${CONFFILE}
@if [ ! -f ${CONFDIR}/${FILE} ]; then \
${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
fi
.endfor
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${MNEMODIR}
@${CHMOD} -R o-rwx ${CONFDIR}
@${INSTALL_DATA} ${WRKDIR}/httpd-mnemo.conf ${HORDE_INC}
@ -83,6 +79,7 @@ do-install:
.endif
post-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}

View File

@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%MNEMODIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
0) # original config file, will be deleted by pkg-plist
0) # original config file, delete it
rm -f $cf
;;
1) # config file has been updated, must be backuped
cp -p $cf $cf.previous
echo "===> Backing-up..."
echo "---> $cf has been saved ***"
echo "---> as $cf.previous ***"
1) # config file has been updated, leave it alone
;;
*) # not found?
;;

View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
if [ -z "${PACKAGE_BUILDING}" ]; then
# Copy over sample config files unless they already exist
for cf in `ls %%MNEMODIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
if [ ! -f $cf ]; then
cp -p $cf.dist $cf
fi
done
fi
;;
esac

View File

@ -9,7 +9,6 @@
%%PORTDOCS%%%%DOCSDIR%%/UPGRADING
%%MNEMODIR%%/config/.htaccess
%%MNEMODIR%%/config/conf.xml
%%MNEMODIR%%/config/prefs.php
%%MNEMODIR%%/config/prefs.php.dist
%%MNEMODIR%%/data.php
%%MNEMODIR%%/index.php

View File

@ -31,7 +31,7 @@ USE_GETTEXT= yes
PLIST_SUB= NAGDIR=${LNAGDIR} HORDE_INC=${HORDE_INC:S|^${LOCALBASE}/||}
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
SUB_FILES= pkg-message pkg-deinstall
SUB_FILES= pkg-message pkg-install pkg-deinstall
SUB_LIST= NAGDIR=${NAGDIR}
REINPLACE_ARGS= -i ""
@ -67,11 +67,7 @@ do-install:
@${CP} -Rp ${WRKSRC}/${REP} ${NAGDIR}
.endfor
@${CP} -p ${WRKSRC}/*.php ${NAGDIR}
.for FILE in ${CONFFILE}
@if [ ! -f ${CONFDIR}/${FILE} ]; then \
${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
fi
.endfor
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${NAGDIR}
@${CHMOD} -R o-rwx ${CONFDIR}
@${INSTALL_DATA} ${WRKDIR}/httpd-nag.conf ${HORDE_INC}
@ -84,6 +80,7 @@ do-install:
.endif
post-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}

View File

@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%NAGDIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
0) # original config file, will be deleted by pkg-plist
0) # original config file, delete it
rm -f $cf
;;
1) # config file has been updated, must be backuped
cp -p $cf $cf.previous
echo "===> Backing-up..."
echo "---> $cf has been saved ***"
echo "---> as $cf.previous ***"
1) # config file has been updated, leave it alone
;;
*) # not found?
;;

View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
if [ -z "${PACKAGE_BUILDING}" ]; then
# Copy over sample config files unless they already exist
for cf in `ls %%NAGDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
if [ ! -f $cf ]; then
cp -p $cf.dist $cf
fi
done
fi
;;
esac

View File

@ -8,9 +8,7 @@
%%PORTDOCS%%%%DOCSDIR%%/UPGRADING
%%NAGDIR%%/config/.htaccess
%%NAGDIR%%/config/conf.xml
%%NAGDIR%%/config/menu.php
%%NAGDIR%%/config/menu.php.dist
%%NAGDIR%%/config/prefs.php
%%NAGDIR%%/config/prefs.php.dist
%%NAGDIR%%/data.php
%%NAGDIR%%/ics.php