aboutsummaryrefslogtreecommitdiff
path: root/www/xshttpd-devel/Makefile
blob: c3a5d81cebf11f887959984cbf0b0e4495d805fc (plain) (blame)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# New ports collection makefile for:	xshttpd
# Date created:				29 June 2005
# Whom:					Ed Schouten <ed@fxq.nl>
#
# $FreeBSD$
#

PORTNAME=	xshttpd
DISTVERSION=	3.3g01
CATEGORIES=	www
MASTER_SITES=	ftp://ftp.stack.nl/pub/xs-httpd/release/ \
	ftp://mud.stack.nl/pub/xs-httpd/release/
DISTNAME=	${PORTNAME}-${DISTVERSION:S/.//}

MAINTAINER=	johans@stack.nl
COMMENT=	A webserver with CGI as own user and SSL suport

RUN_DEPENDS=	run-mailcap:${PORTSDIR}/misc/mime-support

CONFLICTS+=	apache-[0-9]*

MAN1=		clearxs.1 gfxcount.1 httpd.1 httpdc.1 imagemap.1 \
		readxs.1 xsindex.1 xspasswd.1
MAN5=		httpd.conf.5 xsauth.5 xsscripts.5
USE_RC_SUBR=	xshttpd.sh

GNU_CONFIGURE=	yes
USE_REINPLACE=	yes
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}

OPTIONS=	SSL "Enable https support" On \
		LDAP "Enable ldap support" Off \
		PCRE "Enable pcre rewriting support" Off \
		PERSISTENT_PERL "Enable persistent perl interpreter" Off

# By default XS-HTTPD stores its data in ${PREFIX}/lib/httpd
DATADIR=	${PREFIX}/www
PLIST_SUB=	WWWDIR=${DATADIR}
CONFIGURE_ARGS+=--with-rootdir=${DATADIR}

.include <bsd.port.pre.mk>

.if !defined(WITHOUT_SSL)
.include <${PORTSDIR}/Mk/bsd.openssl.mk>
#USE_OPENSSL=	yes
CONFIGURE_ARGS+=--with-ssl
.else
CONFIGURE_ARGS+=--without-ssl
.endif

.if defined(WITH_LDAP)
USE_OPENLDAP=	yes
CONFIGURE_ARGS+=--with-ldap=${LOCALBASE}
.else
CONFIGURE_ARGS+=--without-ldap
.endif

.if defined(WITH_PERSISTENT_PERL)
USE_PERL5=	yes
CONFIGURE_ARGS+=--with-perl
.else
CONFIGURE_ARGS+=--without-perl
.endif

.if defined(WITH_PCRE)
LIB_DEPENDS+=	pcre.0:${PORTSDIR}/devel/pcre
CONFIGURE_ARGS+=--with-pcre=yes
.else
CONFIGURE_ARGS+=--with-pcre=no
.endif

post-patch:
.for i in man/httpd.1 man/httpd.conf.5 config/httpd.conf.sample \
	contrib/SSL-Makefile contrib/logrotate.sh
	@${REINPLACE_CMD} \
		-e 's|/wwwsys|${DATADIR}|g' \
		-e 's|/usr/local/lib/httpd|${DATADIR}|g' \
		-e 's|nobody|${WWWOWN}|g' \
		-e 's|nogroup|${WWWGRP}|g' \
		${WRKSRC}/$i
.endfor
	@${REINPLACE_CMD} -e 's|\(MIMETYPESFILE\ "\).*|\1${LOCALBASE}/etc/mime.types"|' \
		${WRKSRC}/src/confuser.h

post-install:
	@${RM} ${DATADIR}/mime.types

.include <bsd.port.post.mk>