Date: Fri, 8 Jun 2007 16:53:08 +0200 (CEST) From: Jan Srzednicki <w@wrzask.pl> To: FreeBSD-gnats-submit@FreeBSD.org Cc: r@robakdesign.com Subject: ports/113480: [PATCH] www/hastymail: fix path for the config file, don't install cruft Message-ID: <20070608145308.D36D217110@oak.pl> Resent-Message-ID: <200706081500.l58F0AHl096734@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 113480 >Category: ports >Synopsis: [PATCH] www/hastymail: fix path for the config file, don't install cruft >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jun 08 15:00:09 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Jan Srzednicki >Release: FreeBSD 6.2-STABLE i386 >Organization: >Environment: System: FreeBSD oak.pl 6.2-STABLE FreeBSD 6.2-STABLE #11: Tue Jun 5 12:04:54 CEST >Description: I have fixed the port, so it does not install cruft CVS directories (and other cruft stuff as well). The sample config file is installed to the correct path, which now defaults do $PREFIX/etc (this required patching lib/constant.php, which has the path hardcoded). Minor fixes: add '-d' option to pax to make it not traverse directories, some style cleanups. Added file(s): - files/patch-lib-constant.php Port maintainer (r@robakdesign.com) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- hastymail-1.5_2.patch begins here --- diff -ruN --exclude=CVS /usr/ports/www/hastymail/Makefile /srv/home/winfried/tmp/ports/hastymail/Makefile --- /usr/ports/www/hastymail/Makefile Sat May 19 11:06:16 2007 +++ /srv/home/winfried/tmp/ports/hastymail/Makefile Fri Jun 8 16:47:31 2007 @@ -7,7 +7,7 @@ PORTNAME= hastymail PORTVERSION= 1.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} MASTER_SITE_SUBDIR= hastymail @@ -27,16 +27,30 @@ .include <bsd.port.pre.mk> +# Don't install automatically CVS directories, patched files and the default config file. +FIND_SKIP_OPTS= -not -name hastymail.conf-example -not -name '*.orig' \ + -not -name '*.bak' -not -path '*/CVS/*' -not -name CVS + +post-patch: + @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," \ + ${WRKSRC}/lib/constant.php + pre-install: - @${FIND} -s -d ${WRKSRC}/ -type f | ${SED} "s?${WRKSRC}?${INSTALL_DIR}?g" >${PLIST} - @${FIND} -s -d ${WRKSRC}/ -type d | ${SED} "s?${WRKSRC}?@dirrm ${INSTALL_DIR}?g" >> ${PLIST} + @${FIND} -s -d ${WRKSRC}/ -type f ${FIND_SKIP_OPTS} | \ + ${SED} "s?${WRKSRC}?${INSTALL_DIR}?g" >${PLIST} + @${FIND} -s -d ${WRKSRC}/ -type d ${FIND_SKIP_OPTS} | \ + ${SED} "s?${WRKSRC}?@dirrm ${INSTALL_DIR}?g" >> ${PLIST} + @${ECHO_CMD} etc/hastymail.conf.sample >> ${PLIST} do-install: - @${MKDIR} ${PREFIX}/${INSTALL_DIR} - @cd ${WRKSRC} && ${FIND} . | ${PAX} -rw ${PREFIX}/${INSTALL_DIR} - @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${INSTALL_DIR} + @${MKDIR} ${PREFIX}/${INSTALL_DIR} + @cd ${WRKSRC} && ${FIND} . ${FIND_SKIP_OPTS} | \ + ${PAX} -rwd ${PREFIX}/${INSTALL_DIR} + @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${INSTALL_DIR} + @${INSTALL_DATA} ${WRKSRC}/hastymail.conf-example \ + ${PREFIX}/etc/hastymail.conf.sample post-install: - @${CAT} ${PKGMESSAGE} + @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff -ruN --exclude=CVS /usr/ports/www/hastymail/files/patch-lib-constant.php /srv/home/winfried/tmp/ports/hastymail/files/patch-lib-constant.php --- /usr/ports/www/hastymail/files/patch-lib-constant.php Thu Jan 1 01:00:00 1970 +++ /srv/home/winfried/tmp/ports/hastymail/files/patch-lib-constant.php Fri Jun 8 16:36:03 2007 @@ -0,0 +1,11 @@ +--- lib/constant.php.orig Fri Jun 8 15:15:54 2007 ++++ lib/constant.php Fri Jun 8 15:16:10 2007 +@@ -24,7 +24,7 @@ + */ + + /* absolute path to the configuration file */ +-$config_file = '/etc/hastymail.conf'; ++$config_file = '%%PREFIX%%/etc/hastymail.conf'; + + /* hastymail version */ + $version = '1.5'; diff -ruN --exclude=CVS /usr/ports/www/hastymail/files/pkg-message.in /srv/home/winfried/tmp/ports/hastymail/files/pkg-message.in --- /usr/ports/www/hastymail/files/pkg-message.in Sat Nov 18 23:55:43 2006 +++ /srv/home/winfried/tmp/ports/hastymail/files/pkg-message.in Fri Jun 8 15:36:15 2007 @@ -1,12 +1,13 @@ ****************************************************** You have successfully installed Hastymail webmail client. -Dont forget to move config file to proper directory and -to change that variable in hastymail/lib/constant.php +Don't forget to edit your own config file. A sample config +has been installed in: -$config_file = '/etc/hastymail.conf'; +%%PREFIX%%/etc/hastymail.conf.sample -as needed. After that, follow the instructions in INSTALL -file to configure Hastymail finally. +The proper config file path is: + +%%PREFIX%%/etc/hastymail.conf ****************************************************** --- hastymail-1.5_2.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070608145308.D36D217110>