1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-02 11:09:29 +00:00

- fix *squirrelmail ports.

- add slaveport-target
- fix INDEX build
- add forgotten file

Approved by:    erwin (mentor)
This commit is contained in:
Clement Laforet 2004-01-13 15:59:50 +00:00
parent 135f393f31
commit 78300b9f90
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=98079
3 changed files with 57 additions and 6 deletions

View File

@ -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"

View File

@ -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:

View File

@ -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