aboutsummaryrefslogtreecommitdiffstats
path: root/mail/openwebmail
diff options
context:
space:
mode:
authorleeym <leeym@FreeBSD.org>2005-05-13 23:15:31 +0800
committerleeym <leeym@FreeBSD.org>2005-05-13 23:15:31 +0800
commit09c4ad5f3c7d75dd0d62b7b7a2e6dffb8ab0cbda (patch)
treed1a157f5ac12b2b5c6e04d32eac9d05c0a99a2bf /mail/openwebmail
parent0410d34ab17e6539cc5ef6440781a75a1b32316e (diff)
downloadfreebsd-ports-gnome-09c4ad5f3c7d75dd0d62b7b7a2e6dffb8ab0cbda.tar.gz
freebsd-ports-gnome-09c4ad5f3c7d75dd0d62b7b7a2e6dffb8ab0cbda.tar.zst
freebsd-ports-gnome-09c4ad5f3c7d75dd0d62b7b7a2e6dffb8ab0cbda.zip
- keep public addressbook and calendar if they are modified
Noticed by: tim@dnes.mlc.edu.tw
Diffstat (limited to 'mail/openwebmail')
-rw-r--r--mail/openwebmail/Makefile5
-rw-r--r--mail/openwebmail/pkg-deinstall6
-rw-r--r--mail/openwebmail/pkg-install8
3 files changed, 19 insertions, 0 deletions
diff --git a/mail/openwebmail/Makefile b/mail/openwebmail/Makefile
index fdd2eefe6903..3b93be31fb83 100644
--- a/mail/openwebmail/Makefile
+++ b/mail/openwebmail/Makefile
@@ -136,6 +136,11 @@ RUN_DEPENDS+= ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget-devel
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Compress/Zlib.pm:${PORTSDIR}/archivers/p5-Compress-Zlib
.endif
+post-extract:
+.for x in addressbooks/global calendar.book
+ @${RM} ${WRKSRC}/cgi-bin/openwebmail/etc/${x}
+.endfor
+
post-patch:
.if defined(DISABLE_SPEEDYCGI)
@${ECHO_MSG} ""
diff --git a/mail/openwebmail/pkg-deinstall b/mail/openwebmail/pkg-deinstall
index 895d43b968bc..a63d9953a511 100644
--- a/mail/openwebmail/pkg-deinstall
+++ b/mail/openwebmail/pkg-deinstall
@@ -3,4 +3,10 @@ if [ "$2" != "DEINSTALL" ]; then
exit 0
fi
+for x in addressbooks/global calendar.book; do
+ if [ ! -s "${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/${x}" ]; then
+ rm ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/${x}
+ fi
+done
+
rm -fr ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/sessions/*
diff --git a/mail/openwebmail/pkg-install b/mail/openwebmail/pkg-install
index fc74006d6cea..6d9a1f5a24b3 100644
--- a/mail/openwebmail/pkg-install
+++ b/mail/openwebmail/pkg-install
@@ -8,4 +8,12 @@ chmod 0770 ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/sessions
mkdir -p ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/users
chmod 0700 ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/users
chmod 4755 ${PKG_PREFIX}/www/cgi-bin/openwebmail/openwebmail*pl
+
+for x in addressbooks/global calendar.book; do
+ if [ ! -s "${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/${x}" ]; then
+ touch ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/${x}
+ chmod 0666 ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/${x}
+ fi
+done
+
${PKG_PREFIX}/www/cgi-bin/openwebmail/openwebmail-tool.pl --init --no