summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorjoerg <joerg>2006-01-05 22:46:12 +0000
committerjoerg <joerg>2006-01-05 22:46:12 +0000
commit53b52a69ef5b0b16cb178ae547ec000c70aa62bf (patch)
tree1634850447671bd45f0e9fa343f4c26f919550ed /www
parentc430c6048861b73ba5397a34dc967cb0b338721e (diff)
downloadpkgsrc-53b52a69ef5b0b16cb178ae547ec000c70aa62bf.tar.gz
Use SUBST framework.
Diffstat (limited to 'www')
-rw-r--r--www/thttpd/Makefile18
1 files changed, 10 insertions, 8 deletions
diff --git a/www/thttpd/Makefile b/www/thttpd/Makefile
index 6086745dfd9..ab3293e8e1b 100644
--- a/www/thttpd/Makefile
+++ b/www/thttpd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.37 2005/12/29 06:22:24 jlam Exp $
+# $NetBSD: Makefile,v 1.38 2006/01/05 22:46:12 joerg Exp $
DISTNAME= thttpd-2.25b
PKGREVISION= 5
@@ -32,6 +32,14 @@ RCD_SCRIPTS= thttpd
INSTALLATION_DIRS= share/thttpd
+SUBST_CLASSES+= paths
+SUBST_FILES.paths= thttpd.conf
+SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
+SUBST_STAGE.paths= post-patch
+
+post-extract:
+ ${CP} ${FILESDIR}/thttpd.conf ${WRKSRC}
+
pre-configure:
${MV} ${WRKSRC}/extras/htpasswd.1 ${WRKSRC}/extras/thtpasswd.1
${MV} ${WRKSRC}/extras/htpasswd.c ${WRKSRC}/extras/thtpasswd.c
@@ -44,14 +52,8 @@ pre-configure:
${SED} -e "s/LOG_DAEMON/${THTTPD_LOG_FACILITY}/" ${WRKSRC}/config.h.bak \
> ${WRKSRC}/config.h
-post-build:
- @for FILE in thttpd.conf; do \
- ${SED} ${FILES_SUBST_SED} \
- ${FILESDIR}/$${FILE} > ${WRKDIR}/$${FILE}; \
- done
-
post-install:
- ${INSTALL_DATA} ${WRKDIR}/thttpd.conf ${PREFIX}/share/examples
+ ${INSTALL_DATA} ${WRKSRC}/thttpd.conf ${PREFIX}/share/examples
${INSTALL_DATA} ${WRKSRC}/index.html ${PREFIX}/share/thttpd
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/sitedrivenby.gif ${PREFIX}/share/thttpd