summaryrefslogtreecommitdiff
path: root/mail/squirrelmail/Makefile
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-01-20 23:56:59 +0000
committerjoerg <joerg@pkgsrc.org>2006-01-20 23:56:59 +0000
commit7185e37247d908d2de6ed5b8e434ee13fdba1a49 (patch)
treec8fe7343d048c5531b0fd4f5d872e5d8a428f7ab /mail/squirrelmail/Makefile
parent338850bba17c8387a47daf9dcfad80bb13948b8a (diff)
downloadpkgsrc-7185e37247d908d2de6ed5b8e434ee13fdba1a49.tar.gz
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 (limited to 'mail/squirrelmail/Makefile')
-rw-r--r--mail/squirrelmail/Makefile36
1 files changed, 17 insertions, 19 deletions
diff --git a/mail/squirrelmail/Makefile b/mail/squirrelmail/Makefile
index 34a6f48085d..6e216c19be4 100644
--- a/mail/squirrelmail/Makefile
+++ b/mail/squirrelmail/Makefile
@@ -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 @@ COMMENT= PHP webmail package
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= ${DATADIR}
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}/