summaryrefslogtreecommitdiff
path: root/www/hiawatha/Makefile
blob: 77969105a3205583693571f4ed35bcb7a2a3d180 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Created by: Hugo Leisink
# $FreeBSD$

PORTNAME=	hiawatha
PORTVERSION=	10.8.3
PORTREVISION=	2
CATEGORIES=	www
MASTER_SITES=	https://www.hiawatha-webserver.org/files/

MAINTAINER=	tobik@FreeBSD.org
COMMENT=	Advanced and secure webserver for Unix

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		cmake:insource compiler:c11
USE_RC_SUBR=	hiawatha

CMAKE_ARGS=	-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
		-DWEBROOT_DIR=${WWWDIR} \
		-DWORK_DIR=/var/db/${PORTNAME}
SUB_FILES=	pkg-message

OPTIONS_DEFINE=		CACHE CGIWRAPPER IPV6 LOADCHECK MBEDTLS MONITOR \
			RPROXY TOMAHAWK TOOLKIT XSLT
OPTIONS_DEFAULT=	CACHE CGIWRAPPER MBEDTLS RPROXY TOOLKIT XSLT
OPTIONS_SUB=		yes

CACHE_DESC=		Caching support
CGIWRAPPER_DESC=	Install cgi-wrapper(1) (needs setuid bit)
LOADCHECK_DESC=		Load check support (experimental)
MONITOR_DESC=		Hiawatha Monitor support
RPROXY_DESC=		Reverse proxy support
TOMAHAWK_DESC=		Tomahawk command shell support
TOOLKIT_DESC=		URL toolkit support
XSLT_DESC=		XSLT support

CACHE_CMAKE_BOOL=	ENABLE_CACHE
IPV6_CMAKE_BOOL=	ENABLE_IPV6
LOADCHECK_CMAKE_BOOL=	ENABLE_LOADCHECK
MBEDTLS_CMAKE_BOOL=	ENABLE_TLS USE_SYSTEM_MBEDTLS
MBEDTLS_LIB_DEPENDS=	libmbedtls.so:security/mbedtls
MBEDTLS_USES=		localbase:ldflags
MONITOR_CMAKE_BOOL=	ENABLE_MONITOR
RPROXY_CMAKE_BOOL=	ENABLE_RPROXY
TOMAHAWK_CMAKE_BOOL=	ENABLE_TOMAHAWK
TOOLKIT_CMAKE_BOOL=	ENABLE_TOOLKIT
XSLT_CMAKE_BOOL=	ENABLE_XSLT
XSLT_USES=		gnome
XSLT_USE=		GNOME=libxslt

post-patch:
	@${REINPLACE_CMD} -e 's|/usr/bin/ssi-cgi|${PREFIX}/bin/ssi-cgi|g' \
		-e 's|/usr/bin|${LOCALBASE}/bin|g' \
		${WRKSRC}/config/cgi-wrapper.conf \
		${WRKSRC}/config/hiawatha.conf.in
	@${REINPLACE_CMD} -e 's|/usr/sbin|${PREFIX}/sbin|g' \
		-e 's|/etc/hiawatha|${ETCDIR}|g' \
		${WRKSRC}/man/hiawatha.1.in \
		${WRKSRC}/man/cgi-wrapper.1.in

post-install:
.for f in hiawatha.conf mimetype.conf cgi-wrapper.conf toolkit.conf \
	error.xslt index.xslt
	${INSTALL_DATA} ${WRKSRC}/config/${f} \
		${STAGEDIR}${PREFIX}/etc/hiawatha/${f}.sample
.endfor
	@${MKDIR} ${STAGEDIR}${WWWDIR}
	${INSTALL_DATA} ${WRKSRC}/extra/index.html \
		${STAGEDIR}${WWWDIR}/index.html.sample

.include <bsd.port.mk>