From owner-svn-ports-head@FreeBSD.ORG Wed Aug 13 22:35:48 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30C87CA9; Wed, 13 Aug 2014 22:35:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D3542911; Wed, 13 Aug 2014 22:35:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7DMZlGE083577; Wed, 13 Aug 2014 22:35:47 GMT (envelope-from marino@FreeBSD.org) Received: (from marino@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7DMZlBW083572; Wed, 13 Aug 2014 22:35:47 GMT (envelope-from marino@FreeBSD.org) Message-Id: <201408132235.s7DMZlBW083572@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marino set sender to marino@FreeBSD.org using -f From: John Marino Date: Wed, 13 Aug 2014 22:35:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r364817 - head/www/autoindex2 X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2014 22:35:48 -0000 Author: marino Date: Wed Aug 13 22:35:47 2014 New Revision: 364817 URL: http://svnweb.freebsd.org/changeset/ports/364817 QAT: https://qat.redports.org/buildarchive/r364817/ Log: Stage www/autoindex2 The original port had several issues with it beyond staging. For example, the INSTALLDIR mechanism didn't work because the PLIST_SUB was hardcoded for WWWDIR. All sorts of CHMOD'ing was going on because COPYTREE_SHARE hadn't been used. The config.php was installed directly and therefore overwritten and/or removed each time the port was de/reinstalled. The prefetch didn't work because it checked if INSTALLDIR was defined, but the makefile always defines it. The whole thing had to be reworked, so very little of provided patch actually got used. PR: 190009 Submitted by: Joe (thralling.com) Approved by: Nobody, maintainer was reset Lotsa TLC: marino Modified: head/www/autoindex2/Makefile head/www/autoindex2/pkg-plist Modified: head/www/autoindex2/Makefile ============================================================================== --- head/www/autoindex2/Makefile Wed Aug 13 22:07:33 2014 (r364816) +++ head/www/autoindex2/Makefile Wed Aug 13 22:35:47 2014 (r364817) @@ -3,47 +3,30 @@ PORTNAME= AutoIndex PORTVERSION= 2.2.4 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= SF/${PORTNAME:tl}/${PORTNAME}%20PHP%20Script%202.x/${PORTNAME}%20PHP%20${PORTVERSION} MAINTAINER= ports@FreeBSD.org -COMMENT= PHP 5.x script that makes a table that lists the files in a directory +COMMENT= PHP 5.x script that put a directory listing into a table WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} USES= dos2unix USE_PHP= session -DEFAULT_PHP_VER= 5 +DEFAULT_VERSIONS= php=5 CONFLICTS= AutoIndex-1* LATEST_LINK= AutoIndex2 NO_BUILD= yes -PLIST_SUB+= INSTALLDIR=${WWWDIR:S,^${PREFIX}/,,} - -NO_STAGE= yes -pre-fetch: -.if !defined(INSTALLDIR) - @${ECHO_MSG} "" - @${ECHO_MSG} "Define INSTALLDIR to override default of '${WWWDIR}'." - @${ECHO_MSG} "" -.endif - INSTALLDIR?= ${WWWDIR} +PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} \ + INSTALLDIR=${INSTALLDIR:S,^${PREFIX}/,,} do-install: - @${MKDIR} ${INSTALLDIR} - @${CP} -R ${WRKSRC}/* ${INSTALLDIR} - @${CP} -p ${WRKSRC}/.htpasswd.autoindex ${INSTALLDIR}/.htpasswd.autoindex-dist - @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${INSTALLDIR} - @${CHMOD} -R 644 ${INSTALLDIR}/* ${INSTALLDIR}/.htpasswd.autoindex-dist - @${CHMOD} 755 ${INSTALLDIR}/classes ${INSTALLDIR}/index_icons ${INSTALLDIR}/languages ${INSTALLDIR}/templates - @${CHMOD} 755 ${INSTALLDIR}/index_icons/* ${INSTALLDIR}/templates/default ${INSTALLDIR}/templates/simple_image_gallery - @${CHMOD} 664 ${INSTALLDIR}/config.php - @${ECHO_CMD} "" - -post-install: -.if !defined(BATCH) - @${CAT} ${PKGMESSAGE} -.endif + @${MKDIR} ${STAGEDIR}${INSTALLDIR} + cd ${WRKSRC} && ${MV} config.php config.php.sample + cd ${WRKSRC} && ${MV} .htpasswd.autoindex .htpasswd.autoindex.sample + cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${INSTALLDIR} .include Modified: head/www/autoindex2/pkg-plist ============================================================================== --- head/www/autoindex2/pkg-plist Wed Aug 13 22:07:33 2014 (r364816) +++ head/www/autoindex2/pkg-plist Wed Aug 13 22:35:47 2014 (r364817) @@ -1,5 +1,12 @@ -%%INSTALLDIR%%/.htpasswd.autoindex-dist -%%INSTALLDIR%%/config.php +@owner %%WWWOWN%% +@group %%WWWGRP%% +@mode 644 +%%INSTALLDIR%%/.htpasswd.autoindex.sample +@mode 664 +@unexec if cmp -s %D/%%INSTALLDIR%%/config.php.sample %D/%%INSTALLDIR%%/config.php; then rm -f %D/%%INSTALLDIR%%/config.php; fi +%%INSTALLDIR%%/config.php.sample +@exec if [ ! -f %D/%%INSTALLDIR%%/config.php ] ; then cp -p %D/%F %B/config.php; fi +@mode %%INSTALLDIR%%/hidden_files %%INSTALLDIR%%/change_log.html %%INSTALLDIR%%/index.php @@ -223,6 +230,8 @@ %%INSTALLDIR%%/templates/simple_image_gallery/table_footer.tpl %%INSTALLDIR%%/templates/simple_image_gallery/table_header.tpl %%INSTALLDIR%%/templates/readme.html +@owner +@group @dirrm %%INSTALLDIR%%/classes @dirrm %%INSTALLDIR%%/index_icons/apache @dirrm %%INSTALLDIR%%/index_icons/kde