aboutsummaryrefslogtreecommitdiff
path: root/www/xshttpd-devel/Makefile
blob: 8b91ad20b98b9b920a6fc53868fb46ac10112690 (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
89
90
91
92
93
94
95
96
97
# Created by: Ed Schouten <ed@fxq.nl>
# $FreeBSD$

PORTNAME=	xshttpd
DISTVERSION=	3.7b27
PORTREVISION=	1
CATEGORIES=	www ipv6
MASTER_SITES=	ftp://ftp.stack.nl/pub/xs-httpd/release/ \
		ftp://mud.stack.nl/pub/xs-httpd/release/
PKGNAMESUFFIX=	-devel
DISTNAME=	${PORTNAME}-${DISTVERSION:S/.//}

MAINTAINER=	johans@FreeBSD.org
COMMENT=	Webserver with CGI as own user and SSL support

LICENSE=	BSD

RUN_DEPENDS=	run-mailcap:${PORTSDIR}/misc/mime-support \
		ppmtogif:${PORTSDIR}/graphics/netpbm
LIB_DEPENDS=	libpcre.so:${PORTSDIR}/devel/pcre

CONFLICTS_INSTALL=	xshttpd-[0-9]* publicfile-[0-9]*

USE_BZIP2=	yes
USE_OPENSSL=	yes
USE_RC_SUBR=	xshttpd
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--enable-hier=bsd

MAN1=		clearxs.1 gfxcount.1 httpd.1 httpdc.1 imagemap.1 \
		readxs.1 xschpass.1 xsindex.1 xspasswd.1
MAN5=		httpd.conf.5 xsauth.5 xsconf.5 xsscripts.5 xsredir.5
MAN7=		httpd_cgi.7 httpd_ssi.7

OPTIONS_DEFINE=	LDAP CURL M4_CONFIG PERSISTENT_PERL
M4_CONFIG_DESC=	Enable m4 configuration preprocessor
PERSISTENT_PERL_DESC=	Enable persistent Perl interpreter

PORTDOCS=	README ChangeLog

.include <bsd.port.options.mk>

# By default XS-HTTPD stores its data in ${PREFIX}/lib/httpd
WWWDIR?=	${PREFIX}/www/${PORTNAME}

.if ${PORT_OPTIONS:MLDAP}
USE_OPENLDAP=	yes
CONFIGURE_ARGS+=--with-ldap=${LOCALBASE}
PLIST_SUB+=	LDAP=""
.else
CONFIGURE_ARGS+=--without-ldap
PLIST_SUB+=	LDAP="@comment "
.endif

.if ${PORT_OPTIONS:MM4_CONFIG}
CONFIGURE_ARGS+=--with-preprocessor
.else
CONFIGURE_ARGS+=--without-preprocessor
.endif

.if ${PORT_OPTIONS:MPERSISTENT_PERL}
USES+=		perl5
CONFIGURE_ARGS+=--with-perl
PLIST_SUB+=	PERL=""
.else
CONFIGURE_ARGS+=--without-perl
PLIST_SUB+=	PERL="@comment "
.endif

.if ${PORT_OPTIONS:MCURL}
LIB_DEPENDS+=	libcurl.so:${PORTSDIR}/ftp/curl
CONFIGURE_ARGS+=--with-curl
.else
CONFIGURE_ARGS+=--without-curl
.endif

post-patch:
	@${REINPLACE_CMD} \
		-e 's|\(MIME_TYPES\).*|\1 "${LOCALBASE}/etc/mime.types"|' \
		-e 's|nobody|${WWWOWN}|' \
		-e 's|nogroup|${WWWGRP}|' \
		-e 's|httpd\.pid|xs&|' \
		${WRKSRC}/src/constants.h
	@${REINPLACE_CMD} -e 's|mime.types ||g' \
		${WRKSRC}/config/Makefile.in
# Fix parallel builds (-jX): all programs must depend on the library
	@${ECHO_CMD} '$$(bin_PROGRAMS) $$(phexec_PROGRAMS)' \
		'$$(noinst_PROGRAMS): $$(noinst_LIBRARIES)' \
			>> ${WRKSRC}/src/Makefile.in

post-install:
.if ${PORT_OPTIONS:MDOCS}
	@${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
.endif

.include <bsd.port.mk>