From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jun 8 15:00:11 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4877D16A46B for ; Fri, 8 Jun 2007 15:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 2BB4E13C465 for ; Fri, 8 Jun 2007 15:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l58F0Au2096735 for ; Fri, 8 Jun 2007 15:00:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l58F0AHl096734; Fri, 8 Jun 2007 15:00:10 GMT (envelope-from gnats) Resent-Date: Fri, 8 Jun 2007 15:00:10 GMT Resent-Message-Id: <200706081500.l58F0AHl096734@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jan Srzednicki Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8AF1816A400 for ; Fri, 8 Jun 2007 14:53:16 +0000 (UTC) (envelope-from winfried@oak.pl) Received: from mx.oak.pl (mx.oak.pl [217.96.108.251]) by mx1.freebsd.org (Postfix) with ESMTP id 0768213C483 for ; Fri, 8 Jun 2007 14:53:13 +0000 (UTC) (envelope-from winfried@oak.pl) Received: by oak.pl (Postfix, from userid 1002) id D36D217110; Fri, 8 Jun 2007 16:53:08 +0200 (CEST) Message-Id: <20070608145308.D36D217110@oak.pl> Date: Fri, 8 Jun 2007 16:53:08 +0200 (CEST) From: Jan Srzednicki To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: r@robakdesign.com Subject: ports/113480: [PATCH] www/hastymail: fix path for the config file, don't install cruft X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2007 15:00:11 -0000 >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 +# 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 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: