summaryrefslogtreecommitdiff
path: root/www/w3c-httpd/Makefile
blob: cf2f0b677b3fb44a4dc42461b6cda27eb607426f (plain)
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
# $NetBSD: Makefile,v 1.20 2006/06/20 22:32:57 minskim Exp $

DISTNAME=	w3c-httpd-3.0A
PKGREVISION=	1
CATEGORIES=	www
MASTER_SITES=	ftp://ftp.w3.org/pub/httpd/ \
		ftp://ftp-eu.w3.org/pub/httpd/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.w3.org/pub/WWW/Daemon/
COMMENT=	WWW server from the W3 Consortium (W3C)

WRKSRC=		${WRKDIR}
USE_TOOLS+=	csh

SUBST_CLASSES+=		strcasestr
SUBST_STAGE.strcasestr=	post-patch
SUBST_FILES.strcasestr=	Daemon/Implementation/HTWild.c \
	Library/Implementation/HTString.c \
	Library/Implementation/HTString.h \
	Library/Implementation/HTString.h
SUBST_SED.strcasestr=	-e 's,\([[:blank:]]\)\(strcasestr\),\1x\2,g'

EGDIR=			${PREFIX}/share/examples/w3c-httpd
INSTALLATION_DIRS=	bin sbin share/examples/w3c-httpd

.for f in all.conf caching.conf httpd.conf prot.conf proxy.conf
CONF_FILES+=	${EGDIR:Q}/${f:Q}	${PKG_SYSCONFDIR}/${f:Q}
.endfor

pre-configure:
.if !defined(MD5_PW)
	@${ECHO} ""
	@${ECHO} "Defaulting to DES encrypted passwords."
	@${ECHO} "Set the environment variable MD5_PW if you want MD5 encrypted passwords."
	@${ECHO} ""
.else
	@${ECHO} "CFLAGS += -DMD5_PW" >> ${WRKDIR:Q}/All/${OSNAME:Q}/Makefile.include
.endif

do-install:
	${INSTALL_DATA_DIR} ${PREFIX:Q}/etc/w3c-httpd ${PREFIX:Q}/share/w3c-httpd
	${CP} -R ${WRKSRC:Q}/server_root/icons ${PREFIX:Q}/share/w3c-httpd
	${CP} ${WRKSRC:Q}/server_root/config/*.conf ${EGDIR:Q}
	${INSTALL_PROGRAM} ${WRKSRC:Q}/Daemon/${OSNAME:Q}/httpd ${PREFIX:Q}/sbin/w3c-httpd
	${INSTALL_PROGRAM} ${WRKSRC:Q}/Daemon/${OSNAME:Q}/htadm ${PREFIX:Q}/bin
	${INSTALL_PROGRAM} ${WRKSRC:Q}/Daemon/${OSNAME:Q}/htimage ${PREFIX:Q}/sbin
	${INSTALL_PROGRAM} ${WRKSRC:Q}/Daemon/${OSNAME:Q}/cgiparse ${PREFIX:Q}/sbin
	${INSTALL_PROGRAM} ${WRKSRC:Q}/Daemon/${OSNAME:Q}/cgiutils ${PREFIX:Q}/sbin

.include "../../mk/bsd.pkg.mk"

.if (${OPSYS} == "FreeBSD") || (${OPSYS} == "DragonFly")
OSNAME=	freebsd
.else
#	covers OpenBSD too
OSNAME=	netbsd
.endif