summaryrefslogtreecommitdiff
path: root/mail/squirrelmail/Makefile
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2010-03-04 16:00:37 +0000
committertaca <taca@pkgsrc.org>2010-03-04 16:00:37 +0000
commit409c1bc28d4bc45e95338bb72555c7fd1c2eaa11 (patch)
treee4dabda31401e3349d9e2442154e810d1dacd0c1 /mail/squirrelmail/Makefile
parent42b44efbe683e999267f7c18d6cc0138f7a62620 (diff)
downloadpkgsrc-409c1bc28d4bc45e95338bb72555c7fd1c2eaa11.tar.gz
Overhaul squirrelmail package:
* Add DESTDIR support. * Add more changes from squirrelmail's repositry including secure token support, hoping early release of real 1.4.20. Bump PKGREVISION.
Diffstat (limited to 'mail/squirrelmail/Makefile')
-rw-r--r--mail/squirrelmail/Makefile52
1 files changed, 28 insertions, 24 deletions
diff --git a/mail/squirrelmail/Makefile b/mail/squirrelmail/Makefile
index 6a4fa70c9fe..86698499f5b 100644
--- a/mail/squirrelmail/Makefile
+++ b/mail/squirrelmail/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.111 2010/02/05 17:40:51 wiz Exp $
+# $NetBSD: Makefile,v 1.112 2010/03/04 16:00:37 taca Exp $
DISTNAME= squirrelmail-1.4.20-RC2
PKGNAME= ${DISTNAME:S/-RC2/rc2/}
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= mail www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=squirrelmail/}
EXTRACT_SUFX= .tar.bz2
@@ -19,9 +19,11 @@ CONFLICTS+= ja-squirrelmail-[0-9]*
DEPENDS+= ${PHP_PKG_PREFIX}-gettext>=4.3.3:../../devel/php-gettext
+PKG_DESTDIR_SUPPORT= user-destdir
+
USE_LANGUAGES= # empty
NO_BUILD= yes
-USE_TOOLS+= perl:run
+USE_TOOLS+= pax perl:run
REPLACE_PERL+= config/conf.pl
PKG_GROUPS_VARS+= APACHE_GROUP
@@ -33,14 +35,14 @@ BUILD_DEFS+= VARBASE
PKG_SYSCONFSUBDIR?= httpd
MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
-EGDIR= ${PREFIX}/share/examples/squirrelmail
-SMDIR= ${PREFIX}/share/squirrelmail
+EGDIR= share/examples/squirrelmail
+SMDIR= share/squirrelmail
DATADIR= ${VARBASE}/spool/squirrelmail
ATTACHMENTS_DIR= ${DATADIR}/attachments
USER_PREFS_DIR= ${DATADIR}/data
-MESSAGE_SUBST+= SMDIR=${SMDIR}
-FILES_SUBST+= SMDIR=${SMDIR}
+MESSAGE_SUBST+= SMDIR=${PREFIX}/${SMDIR}
+FILES_SUBST+= SMDIR=${PREFIX}/${SMDIR}
CONF_FILES= ${SMDIR}/config/config_default.php \
${SMDIR}/config/config.php
@@ -48,11 +50,13 @@ CONF_FILES+= ${SMDIR}/data/default_pref \
${DATADIR}/data/default_pref
CONF_FILES+= ${EGDIR}/squirrelmail.conf \
${PKG_SYSCONFDIR}/squirrelmail.conf
+CONF_FILES+= ${USER_PREFS_DIR}/.htaccess ${DATADIR}/data/.htaccess
+CONF_FILES+= ${USER_PREFS_DIR}/index.php ${DATADIR}/data/index.php
REQD_DIRS+= ${SMDIR} ${SMDIR}/config
-OWN_DIRS= ${DATADIR}
-OWN_DIRS_PERMS= ${ATTACHMENTS_DIR} ${ROOT_USER} ${APACHE_GROUP} 730
+OWN_DIRS+= ${DATADIR}
+OWN_DIRS_PERMS+= ${ATTACHMENTS_DIR} ${REAL_ROOT_USER} ${APACHE_GROUP} 730
OWN_DIRS_PERMS+= ${USER_PREFS_DIR} ${APACHE_USER} ${APACHE_GROUP} 755
SUBST_CLASSES+= paths
@@ -61,32 +65,32 @@ SUBST_FILES.paths+= 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,@SMDIR@,${SMDIR},g'
-SUBST_STAGE.paths= post-patch
+SUBST_SED.paths+= -e 's,@SMDIR@,${PREFIX}/${SMDIR},g'
+SUBST_STAGE.paths= pre-configure
INSTALLATION_DIRS= ${PKGMANDIR}/man8
INSTALLATION_DIRS+= share/examples/squirrelmail
INSTALLATION_DIRS+= share/squirrelmail
post-extract:
- cp ${FILESDIR}/squirrelmail.conf.dist \
+ ${CP} ${FILESDIR}/squirrelmail.conf.dist \
${WRKDIR}/squirrelmail.conf.dist
+ ${CP} -p ${WRKSRC}/contrib/conf.pl.8 ${WRKDIR}/squirrelmail-conf.pl.8
-pre-configure:
- find ${WRKSRC} \( -name '*.orig*' -o -name '.cvsignore' \) \
+pre-install:
+ ${FIND} ${WRKSRC} \( -name '*.orig*' -o -name '.cvsignore' \) \
-exec rm -f {} \;
+ ${FIND} ${WRKSRC} -type d -exec chmod ${PKGDIRMODE} {} \;
+ ${FIND} ${WRKSRC} -type f -exec chmod ${SHAREMODE} {} \;
+ ${CHMOD} 0555 ${WRKSRC}/config/conf.pl
+ ${RM} -f ${WRKSRC}/contrib/conf.pl.8
do-install:
- ${INSTALL_DATA} ${WRKDIR}/squirrelmail.conf.dist ${EGDIR}/squirrelmail.conf
- cp -R ${WRKSRC}/* ${SMDIR}
- chown -R ${SHAREOWN}:${SHAREGRP} ${SMDIR}
- find ${SMDIR} -type d -exec chmod ${PKGDIRMODE} {} \;
- find ${SMDIR} -type f -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}/
- mv ${PREFIX}/share/squirrelmail/contrib/conf.pl.8 \
- ${PREFIX}/${PKGMANDIR}/man8/squirrelmail-conf.pl.8
+ ${INSTALL_DATA} ${WRKDIR}/squirrelmail.conf.dist \
+ ${DESTDIR}${PREFIX}/${EGDIR}/squirrelmail.conf
+ cd ${WRKSRC}; pax -rw -pp . ${DESTDIR}${PREFIX}/${SMDIR}
+ ${INSTALL_DATA} ${WRKDIR}/squirrelmail-conf.pl.8 \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
.include "../../lang/php/phpversion.mk"
.include "../../mk/bsd.pkg.mk"