diff options
author | clement <clement@FreeBSD.org> | 2004-01-13 23:59:50 +0800 |
---|---|---|
committer | clement <clement@FreeBSD.org> | 2004-01-13 23:59:50 +0800 |
commit | 84b8f2b46782ffbec1e1bc1327d8c98dac9f526a (patch) | |
tree | 2098824cdbec9ba8623e8fc44e4a7154538245cf | |
parent | 4711b959b3b08d276fb6fa620f40a2bf69986859 (diff) | |
download | freebsd-ports-gnome-84b8f2b46782ffbec1e1bc1327d8c98dac9f526a.tar.gz freebsd-ports-gnome-84b8f2b46782ffbec1e1bc1327d8c98dac9f526a.tar.zst freebsd-ports-gnome-84b8f2b46782ffbec1e1bc1327d8c98dac9f526a.zip |
- fix *squirrelmail ports.
- add slaveport-target
- fix INDEX build
- add forgotten file
Approved by: erwin (mentor)
-rw-r--r-- | japanese/squirrelmail/Makefile | 2 | ||||
-rw-r--r-- | mail/squirrelmail/Makefile | 18 | ||||
-rw-r--r-- | mail/squirrelmail/pkg-deinstall | 43 |
3 files changed, 57 insertions, 6 deletions
diff --git a/japanese/squirrelmail/Makefile b/japanese/squirrelmail/Makefile index b5dbef1af148..783e7859e1fa 100644 --- a/japanese/squirrelmail/Makefile +++ b/japanese/squirrelmail/Makefile @@ -22,7 +22,7 @@ PATCHVERSION= 20031109 MASTERDIR= ${.CURDIR}/../../mail/squirrelmail MD5_FILE= ${.CURDIR}/distinfo -post-patch: +slaveport-post-patch: @${FIND} ${WRKSRC} -name '*.orig' -delete .include "${MASTERDIR}/Makefile" diff --git a/mail/squirrelmail/Makefile b/mail/squirrelmail/Makefile index 075c18a5df72..c7136f84e9c6 100644 --- a/mail/squirrelmail/Makefile +++ b/mail/squirrelmail/Makefile @@ -38,22 +38,30 @@ PKGMESSAGE= ${WRKDIR}/pkg-message PLIST_SUB+= PORTVERSION=${PORTVERSION} \ SQUIRRELDIR="${SQUIRRELDIR:S,^${PREFIX}/,,}" +.if !defined(MASTERDIR) +MASTERDIR= ${.CURDIR} +.endif + pre-everything:: @${ECHO_CMD} "SquirrelMail is installed into ${SQUIRRELDIR}" @${ECHO_CMD} "To use the old location ${PREFIX}/squirrelmail define" @${ECHO_CMD} "WITHOUT_WWWDIR when patching or installing" @${ECHO_CMD} -post-patch: +.if !target(slaveport-post-patch) +slaveport-post-patch: +.endif + +post-patch: slaveport-post-patch .ifndef PATCH_DEBUG - @${RM} ${WRKSRC}/config/config_default.php.orig + @${RM} -f ${WRKSRC}/config/config_default.php.orig .endif @${SED} -e "s;%%SQUIRRELDIR%%;${SQUIRRELDIR};g" \ - ${.CURDIR}/pkg-install > ${PKGINSTALL} + ${MASTERDIR}/pkg-install > ${PKGINSTALL} @${SED} -e "s;%%SQUIRRELDIR%%;${SQUIRRELDIR};g" \ - ${.CURDIR}/pkg-deinstall > ${PKGDEINSTALL} + ${MASTERDIR}/pkg-deinstall > ${PKGDEINSTALL} @${SED} -e "s;%%SQUIRRELDIR%%;${SQUIRRELDIR};g" \ - ${.CURDIR}/pkg-message > ${PKGMESSAGE} + ${MASTERDIR}/pkg-message > ${PKGMESSAGE} # Rearrange the documentation do-build: diff --git a/mail/squirrelmail/pkg-deinstall b/mail/squirrelmail/pkg-deinstall new file mode 100644 index 000000000000..b0738c370e2c --- /dev/null +++ b/mail/squirrelmail/pkg-deinstall @@ -0,0 +1,43 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +#set -vx + +PKG_BATCH=${BATCH:=NO} + +PKG_PREFIX=${PKG_PREFIX:=/usr/local} + +SQUIRRELDIR=%%SQUIRRELDIR%% + +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 +} + +case $2 in + DEINSTALL) + cd ${PKG_PREFIX} + checkfile /var/spool/squirrelmail/prefs/default_pref \ + ${SQUIRRELDIR}/data/default_pref + ;; + POST-DEINSTALL) + if [ "${PKG_BATCH}" = "NO" ]; then + echo "If you are no longer going to use SquirrelMail" + echo "you should remove the /var/spool/squirrelmail" + echo "directory with:" + echo + echo " rm -rf /var/spool/squirrelmail" + fi + ;; + +esac |