pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/squirrelmail Use SUBST framework. Replace some "f...
details: https://anonhg.NetBSD.org/pkgsrc/rev/850c32148c6c
branches: trunk
changeset: 506717:850c32148c6c
user: joerg <joerg%pkgsrc.org@localhost>
date: Fri Jan 20 23:56:59 2006 +0000
description:
Use SUBST framework. Replace some "find foo | xargs bar" with
"find foo -exec bar {} \;" while here, the former is faster, but can't
cope with all quoting issues and is also more likely to hit argument
length limits. CONFLICT to ja-squirrelmail.
diffstat:
mail/squirrelmail/Makefile | 36 +++++++++++++++++-------------------
1 files changed, 17 insertions(+), 19 deletions(-)
diffs (64 lines):
diff -r 39aeaa26c886 -r 850c32148c6c mail/squirrelmail/Makefile
--- a/mail/squirrelmail/Makefile Fri Jan 20 23:55:02 2006 +0000
+++ b/mail/squirrelmail/Makefile Fri Jan 20 23:56:59 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.64 2005/12/29 06:21:53 jlam Exp $
+# $NetBSD: Makefile,v 1.65 2006/01/20 23:56:59 joerg Exp $
DISTNAME= squirrelmail-1.4.5
PKGREVISION= 3
@@ -13,6 +13,7 @@
CONFLICTS= sq-attachment-handlers-[0-9]*
CONFLICTS+= sq-squirrelspell-[0-9]*
CONFLICTS+= ja-squirrelspell-[0-9]*
+CONFLICTS+= ja-squirrelmail-[0-9]*
DEPENDS+= php-gettext>=4.3.3:../../devel/php-gettext
@@ -45,31 +46,28 @@
OWN_DIRS_PERMS= ${ATTACHMENTS_DIR} ${ROOT_USER} ${APACHE_GROUP} 730
OWN_DIRS_PERMS+= ${USER_PREFS_DIR} ${APACHE_USER} ${APACHE_GROUP} 755
+SUBST_CLASSES+= paths
+SUBST_FILES.paths= ${WRKDIR}/squirrelmail.conf.dist config/config_default.php
+SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
+SUBST_SED.paths+= -e 's,@ATTACHMENTS_DIR@,${ATTACHMENTS_DIR},g'
+SUBST_SED.paths+= -e 's,@USER_PREFS_DIR@,${USER_PREFS_DIR},g'
+SUBST_SED.paths+= -e 's,@SMDIRDIR@,${SMDIR},g'
+SUBST_STAGE.paths= post-patch
+
+post-extract:
+ ${CP} ${FILESDIR}/squirrelmail.conf.dist ${WRKDIR}/squirrelmail.conf.dist
+
pre-configure:
- cd ${WRKSRC}; \
- for file in config/config_default.php; do \
- ${SED} -e "s|@ATTACHMENTS_DIR@|${ATTACHMENTS_DIR}|g" \
- -e "s|@USER_PREFS_DIR@|${USER_PREFS_DIR}|g" \
- $${file} > $${file}.fixed; \
- ${MV} -f $${file}.fixed $${file}; \
- done; \
- cd ${WRKSRC}; \
- ${FIND} . \( -name "*.orig*" -o -name ".cvsignore" \) -print \
- | ${XARGS} ${RM} -f
-
-pre-install:
- @${SED} ${FILES_SUBST_SED} ${FILESDIR}/squirrelmail.conf.dist \
- > ${WRKDIR}/squirrelmail.conf.dist
+ ${FIND} ${WRKSRC} \( -name "*.orig*" -o -name ".cvsignore" \) -exec ${RM} -f {} \;
do-install:
${INSTALL_DATA_DIR} ${EGDIR}
${INSTALL_DATA_DIR} ${SMDIR}
- cd ${WRKDIR}; ${INSTALL_DATA} squirrelmail.conf.dist \
- ${EGDIR}/squirrelmail.conf
+ ${INSTALL_DATA} ${WRKDIR}/squirrelmail.conf.dist ${EGDIR}/squirrelmail.conf
${CP} -R ${WRKSRC}/* ${SMDIR}
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${SMDIR}
- ${FIND} ${SMDIR} -type d -print | ${XARGS} ${CHMOD} ${PKGDIRMODE}
- ${FIND} ${SMDIR} -type f -print | ${XARGS} ${CHMOD} ${SHAREMODE}
+ ${FIND} ${SMDIR} -type d -print -exec ${CHMOD} ${PKGDIRMODE} {} \;
+ ${FIND} ${SMDIR} -type f -print -exec ${CHMOD} ${SHAREMODE} {} \;
${CHMOD} a+x ${SMDIR}/config/conf.pl
${INSTALL_DATA} ${WRKSRC}/data/index.php ${USER_PREFS_DIR}/
${INSTALL_DATA} ${WRKSRC}/data/.htaccess ${USER_PREFS_DIR}/
Home |
Main Index |
Thread Index |
Old Index