summaryrefslogtreecommitdiff
path: root/security/ap-modsecurity2/Makefile
blob: df462d5fc7efa730b567a245254315ddd0392f6f (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
# $NetBSD: Makefile,v 1.35 2017/04/30 01:21:59 ryoon Exp $

DISTNAME=	modsecurity-apache_2.7.7
PKGNAME=	${APACHE_PKG_PREFIX}-${DISTNAME:S/apache_//}
PKGREVISION=	7
CATEGORIES=	www security
MASTER_SITES=	https://www.modsecurity.org/tarball/${PKGVERSION_NOREV}/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.modsecurity.org/
COMMENT=	Intrusion detection and prevention engine for web applications
LICENSE=	apache-2.0

APACHE_MODULE=		yes
PKG_APACHE_ACCEPTED=	apache22 apache24
USE_APR=		yes
USE_LANGUAGES=		c++ c

.include "../../mk/apache.mk"
.include "options.mk"

GNU_CONFIGURE=			YES
USE_TOOLS+=			pax
USE_LIBTOOL=			yes
BUILD_DIRS=			apache2
LUA_VERSIONS_INCOMPATIBLE=	52

CONFIGURE_ARGS+=	--with-apxs=${APXS}
CONFIGURE_ARGS+=	--with-pcre=${BUILDLINK_PREFIX.pcre}
CONFIGURE_ARGS+=	--with-libxml=${BUILDLINK_PREFIX.libxml2}
CONFIGURE_ARGS+=	--with-lua=${BUILDLINK_PREFIX.lua}
CONFIGURE_ARGS+=	--with-apr=${BUILDLINK_PREFIX.apr}
CONFIGURE_ARGS+=	--with-apu=${BUILDLINK_PREFIX.apr-util}

INSTALLATION_DIRS+=	lib/httpd

EGDIR=			share/examples/ap-modsecurity
DOCDIR=			share/doc/ap-modsecurity
INSTALLATION_DIRS+=	${EGDIR} ${DOCDIR}

CONF_FILES=		${PREFIX}/${EGDIR}/modsecurity.conf-recommended \
			${PKG_SYSCONFDIR}/httpd/modsecurity.conf

post-install:
	${RM} -f ${DESTDIR}${PREFIX}/lib/mod_security2.so
	${INSTALL_DATA} ${WRKSRC}/modsecurity.conf-recommended \
			${DESTDIR}${PREFIX}/${EGDIR}
	cd ${WRKSRC}/doc && \
		pax -rw . ${DESTDIR}${PREFIX}/${DOCDIR}

.include "../../textproc/libxml2/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
.include "../../lang/lua/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"