1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# $NetBSD: Makefile,v 1.38 2006/01/05 22:46:12 joerg Exp $
DISTNAME= thttpd-2.25b
PKGREVISION= 5
CATEGORIES= www
MASTER_SITES= http://www.acme.com/software/thttpd/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
${NETBSD_LOGO}
DIST_SUBDIR= ${PKGNAME_NOREV}
MAINTAINER= mike@ethmoid.org
HOMEPAGE= http://www.acme.com/software/thttpd/
COMMENT= Tiny/turbo/throttling HTTP server
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
NETBSD_LOGO= sitedrivenby.gif
SITES_${NETBSD_LOGO}= http://www.NetBSD.org/images/logos/
GNU_CONFIGURE= yes
# Note: this pkg auto-detects IPv6 without regarding USE_INET6.
BUILD_DEFS+= USE_INET6
# thttpd syslogs at level LOG_DAEMON by default
# change this to your preferred syslog level
THTTPD_LOG_FACILITY?= LOG_DAEMON
BUILD_DEFS+= THTTPD_LOG_FACILITY
EGDIR= ${PREFIX}/share/examples
CONF_FILES= ${EGDIR}/thttpd.conf ${PKG_SYSCONFDIR}/thttpd.conf
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
for FILE in thttpd.8 extras/Makefile.in extras/thtpasswd.c; do \
${MV} -f ${WRKSRC}/$${FILE} ${WRKSRC}/$${FILE}.bak; \
${SED} -e "s,\.htpasswd,XXX,g;s,htpasswd,thtpasswd,g;s,XXX,.htpasswd,g" \
${WRKSRC}/$${FILE}.bak > ${WRKSRC}/$${FILE}; \
done
${MV} -f ${WRKSRC}/config.h ${WRKSRC}/config.h.bak
${SED} -e "s/LOG_DAEMON/${THTTPD_LOG_FACILITY}/" ${WRKSRC}/config.h.bak \
> ${WRKSRC}/config.h
post-install:
${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
.include "../../mk/bsd.pkg.mk"
|