aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-08-13 22:35:47 +0000
committerJohn Marino <marino@FreeBSD.org>2014-08-13 22:35:47 +0000
commit198a9a58044759bd20d157bcfed1c20244a22eb3 (patch)
tree543cd096ac2ec2f51d18dbac8b9884c3862a2083
parente2c977d933a68c5999801f01a334ca80b0b80306 (diff)
downloadports-198a9a58044759bd20d157bcfed1c20244a22eb3.tar.gz
ports-198a9a58044759bd20d157bcfed1c20244a22eb3.zip
Notes
-rw-r--r--www/autoindex2/Makefile35
-rw-r--r--www/autoindex2/pkg-plist13
2 files changed, 20 insertions, 28 deletions
diff --git a/www/autoindex2/Makefile b/www/autoindex2/Makefile
index 07a059f5e578..79edc7a09052 100644
--- a/www/autoindex2/Makefile
+++ b/www/autoindex2/Makefile
@@ -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 <bsd.port.mk>
diff --git a/www/autoindex2/pkg-plist b/www/autoindex2/pkg-plist
index 9f1a4c9745c1..c6f6c1245a48 100644
--- a/www/autoindex2/pkg-plist
+++ b/www/autoindex2/pkg-plist
@@ -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