1 # $NetBSD: Makefile,v 1.42 2007/09/07 22:12:26 jlam Exp $
6 MASTER_SITES= http://www.acme.com/software/thttpd/
7 DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
9 DIST_SUBDIR= ${PKGNAME_NOREV}
11 MAINTAINER= pkgsrc-users@NetBSD.org
12 HOMEPAGE= http://www.acme.com/software/thttpd/
13 COMMENT= Tiny/turbo/throttling HTTP server
15 EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
17 NETBSD_LOGO= sitedrivenby.gif
18 SITES.${NETBSD_LOGO}= http://www.NetBSD.org/images/logos/
22 # Note: this pkg auto-detects IPv6.
23 BUILD_DEFS+= IPV6_READY
24 # thttpd syslogs at level LOG_DAEMON by default
25 # change this to your preferred syslog level
26 THTTPD_LOG_FACILITY?= LOG_DAEMON
27 BUILD_DEFS+= THTTPD_LOG_FACILITY
29 EGDIR= ${PREFIX}/share/examples
30 CONF_FILES= ${EGDIR}/thttpd.conf ${PKG_SYSCONFDIR}/thttpd.conf
33 PKG_DESTDIR_SUPPORT= user-destdir
34 INSTALLATION_DIRS= $(PKGMANDIR)/man1 share/thttpd
37 SUBST_FILES.paths= thttpd.conf
38 SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
39 SUBST_STAGE.paths= post-patch
44 ${CP} ${FILESDIR}/thttpd.conf ${WRKSRC}
47 ${MV} ${WRKSRC}/extras/htpasswd.1 ${WRKSRC}/extras/thtpasswd.1
48 ${MV} ${WRKSRC}/extras/htpasswd.c ${WRKSRC}/extras/thtpasswd.c
49 for FILE in thttpd.8 extras/Makefile.in extras/thtpasswd.c; do \
50 ${MV} -f ${WRKSRC}/$${FILE} ${WRKSRC}/$${FILE}.bak; \
51 ${SED} -e "s,\.htpasswd,XXX,g;s,htpasswd,thtpasswd,g;s,XXX,.htpasswd,g" \
52 ${WRKSRC}/$${FILE}.bak > ${WRKSRC}/$${FILE}; \
54 ${MV} -f ${WRKSRC}/config.h ${WRKSRC}/config.h.bak
55 ${SED} -e "s/LOG_DAEMON/${THTTPD_LOG_FACILITY}/" ${WRKSRC}/config.h.bak \
59 ${INSTALL_DATA} ${WRKSRC}/thttpd.conf ${DESTDIR}${PREFIX}/share/examples
60 ${INSTALL_DATA} ${WRKSRC}/index.html ${DESTDIR}${PREFIX}/share/thttpd
61 ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/sitedrivenby.gif ${DESTDIR}${PREFIX}/share/thttpd
63 .include "../../mk/bsd.pkg.mk"