pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mail/squirrelmail



Module Name:    pkgsrc
Committed By:   taca
Date:           Sun Jun 29 14:09:04 UTC 2025

Modified Files:
        pkgsrc/mail/squirrelmail: Makefile PLIST

Log Message:
mail/squirrelmail: clean up configuration files handling

Make proper handling of configuration files, especially do not overwrite
config_local.php.  Fix PR pkg/59482 (2).

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.149 -r1.150 pkgsrc/mail/squirrelmail/Makefile
cvs rdiff -u -r1.43 -r1.44 pkgsrc/mail/squirrelmail/PLIST

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mail/squirrelmail/Makefile
diff -u pkgsrc/mail/squirrelmail/Makefile:1.149 pkgsrc/mail/squirrelmail/Makefile:1.150
--- pkgsrc/mail/squirrelmail/Makefile:1.149     Wed Apr 16 15:02:23 2025
+++ pkgsrc/mail/squirrelmail/Makefile   Sun Jun 29 14:09:04 2025
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.149 2025/04/16 15:02:23 taca Exp $
+# $NetBSD: Makefile,v 1.150 2025/06/29 14:09:04 taca Exp $
 
 DISTNAME=      squirrelmail-webmail-1.4.23pre15037
 PKGNAME=       ${PHP_PKG_PREFIX}-${DISTNAME:S/-webmail//}
+PKGREVISION=   1
 CATEGORIES=    mail www
 MASTER_SITES=  ${MASTER_SITE_LOCAL}
 EXTRACT_SUFX=  .tar.xz
@@ -35,16 +36,21 @@ MESSAGE_SUBST+=             PKG_SYSCONFDIR=${PKG_SY
 ATTACHMENTS_DIR=       ${DATADIR}/attachments
 USER_PREFS_DIR=                ${DATADIR}/data
 
-CONF_FILES=            ${SMDIR}/config/config_default.php \
-                       ${SMDIR}/config/config.php
-CONF_FILES+=           ${SMDIR}/data/default_pref \
-                       ${DATADIR}/data/default_pref
+SM_CONF_FILES=         config.php config_local.php
+SM_DATA_FILES=         .htaccess default_pref index.php
+SM_USER_PREFS_FILES=   .htaccess index.php
+
 CONF_FILES+=           ${EGDIR}/squirrelmail.conf \
                        ${PKG_SYSCONFDIR}/squirrelmail.conf
-CONF_FILES+=           ${EGDIR}/data/.htaccess ${DATADIR}/data/.htaccess
-CONF_FILES+=           ${EGDIR}/data/index.php ${DATADIR}/data/index.php
-CONF_FILES+=           ${EGDIR}/data/.htaccess ${USER_PREFS_DIR}/.htaccess
-CONF_FILES+=           ${EGDIR}/data/index.php ${USER_PREFS_DIR}/index.php
+.for f in ${SM_CONF_FILES}
+CONF_FILES+=           ${EGDIR}/${f} ${SMDIR}/config/${f}
+.endfor
+.for f in ${SM_DATA_FILES}
+CONF_FILES+=           ${EGDIR}/data/${f} ${DATADIR}/data/${f}
+.endfor
+.for f in ${SM_USER_PREFS_FILES}
+CONF_FILES+=           ${EGDIR}/data/${f} ${USER_PREFS_DIR}/${f}
+.endfor
 
 REQD_DIRS+=            ${SMDIR} ${SMDIR}/config
 
@@ -61,7 +67,6 @@ SUBST_VARS.paths+=    USER_PREFS_DIR
 SUBST_SED.paths+=      -e 's,@SMDIR@,${PREFIX}/${SMDIR},g'
 SUBST_STAGE.paths=     pre-configure
 
-DATA_FILES=            .htaccess index.php
 INSTALLATION_DIRS=     ${PKGMANDIR}/man8 ${EGDIR}/data ${SMDIR}
 
 post-extract:
@@ -70,6 +75,11 @@ post-extract:
        ${CP} -p ${WRKSRC}/contrib/conf.pl.8 ${WRKDIR}/squirrelmail-conf.pl.8
 
 pre-install:
+       ${MV} ${WRKSRC}/config/config_default.php ${WRKDIR}/config.php
+       ${MV} ${WRKSRC}/config/config_local.php ${WRKDIR}
+.for f in ${SM_DATA_FILES}
+       ${MV} ${WRKSRC}/data/${f} ${WRKDIR}
+.endfor
        ${FIND} ${WRKSRC} \( -name '*.orig*' -o -name '.cvsignore' \) \
                -exec rm -f {} \;
        ${FIND} ${WRKSRC} -type d -exec chmod ${PKGDIRMODE} {} \;
@@ -80,8 +90,11 @@ pre-install:
 do-install:
        ${INSTALL_DATA} ${WRKDIR}/squirrelmail.conf.dist \
                ${DESTDIR}${PREFIX}/${EGDIR}/squirrelmail.conf
-.for f in ${DATA_FILES}
-       ${INSTALL_DATA} ${WRKSRC}/data/${f} ${DESTDIR}${PREFIX}/${EGDIR}/data
+.for f in ${SM_CONF_FILES}
+       ${INSTALL_DATA} ${WRKDIR}/${f} ${DESTDIR}${PREFIX}/${EGDIR}
+.endfor
+.for f in ${SM_DATA_FILES}
+       ${INSTALL_DATA} ${WRKDIR}/${f} ${DESTDIR}${PREFIX}/${EGDIR}/data
 .endfor
        cd ${WRKSRC}; pax -rw -pp . ${DESTDIR}${PREFIX}/${SMDIR}
        ${INSTALL_DATA} ${WRKDIR}/squirrelmail-conf.pl.8 \

Index: pkgsrc/mail/squirrelmail/PLIST
diff -u pkgsrc/mail/squirrelmail/PLIST:1.43 pkgsrc/mail/squirrelmail/PLIST:1.44
--- pkgsrc/mail/squirrelmail/PLIST:1.43 Mon Nov 13 15:59:03 2023
+++ pkgsrc/mail/squirrelmail/PLIST      Sun Jun 29 14:09:04 2025
@@ -1,6 +1,9 @@
-@comment $NetBSD: PLIST,v 1.43 2023/11/13 15:59:03 taca Exp $
+@comment $NetBSD: PLIST,v 1.44 2025/06/29 14:09:04 taca Exp $
 man/man8/squirrelmail-conf.pl.8
+${EGDIR}/config.php
+${EGDIR}/config_local.php
 ${EGDIR}/data/.htaccess
+${EGDIR}/data/default_pref
 ${EGDIR}/data/index.php
 ${EGDIR}/squirrelmail.conf
 ${SMDIR}/README
@@ -26,8 +29,6 @@ ${SMDIR}/class/mime/SMimeMessage.class.p
 ${SMDIR}/class/mime/index.php
 ${SMDIR}/config/.htaccess
 ${SMDIR}/config/conf.pl
-${SMDIR}/config/config_default.php
-${SMDIR}/config/config_local.php
 ${SMDIR}/config/index.php
 ${SMDIR}/configure
 ${SMDIR}/contrib/.htaccess
@@ -38,9 +39,6 @@ ${SMDIR}/contrib/RPM/squirrelmail.spec
 ${SMDIR}/contrib/decrypt_headers.php
 ${SMDIR}/contrib/squirrelmail.mailto.NT2KXP.reg
 ${SMDIR}/contrib/squirrelmail.mailto.Win9x.reg
-${SMDIR}/data/.htaccess
-${SMDIR}/data/default_pref
-${SMDIR}/data/index.php
 ${SMDIR}/doc/.htaccess
 ${SMDIR}/doc/AUTHORS
 ${SMDIR}/doc/COPYING



Home | Main Index | Thread Index | Old Index