aboutsummaryrefslogtreecommitdiff
path: root/security/libprelude/Makefile
blob: 682b5add84ccb41c9cc0351d0ef7c7d3c383f8a3 (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
# Created by: Clement Laforet <sheepkiller@cultdeadsheep.org>
# $FreeBSD$

PORTNAME=	libprelude
PORTVERSION=	1.0.1
PORTREVISION=	4
CATEGORIES=	security
MASTER_SITES=	https://www.prelude-ids.org/attachments/download/241/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Framework library for Prelude NIDS

LIB_DEPENDS=	libgmp.so:${PORTSDIR}/math/gmp \
		libgnutls.so:${PORTSDIR}/security/gnutls \
		libgcrypt.so:${PORTSDIR}/security/libgcrypt \
		libgpg-error.so:${PORTSDIR}/security/libgpg-error \
		libnettle.so:${PORTSDIR}/security/nettle \
		libp11-kit.so:${PORTSDIR}/security/p11-kit

OPTIONS_DEFINE=	PERL PYTHON DOCS

USE_AUTOTOOLS=	libtool libltdl
CONFIGURE_ARGS=	--localstatedir=/var \
		--enable-gtk-doc=no \
		--with-html-dir=${PREFIX}/share/doc
USES=	pathfix pkgconfig gettext iconv charsetfix gmake
USE_LDCONFIG=	yes

CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

MAN1=		prelude-admin.1
PORTDOCS=	*

NO_STAGE=	yes
.include <bsd.port.options.mk>

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

.if ${PORT_OPTIONS:MPYTHON}
USE_PYTHON=	yes
CONFIGURE_ARGS+=--with-python
PLIST_SUB+=	PYTHON="" PYTHON_VER="${PYTHON_VER}" VERSION="${PORTVERSION}"
.else
CONFIGURE_ARGS+=--without-python
PLIST_SUB+=	PYTHON="@comment "
.endif

.include <bsd.port.pre.mk>

.if ${ARCH} == "sparc64"
BROKEN=		Does not compile
.endif

post-patch:
	@${REINPLACE_CMD} -e \
		'/^install-data-am:/s|install-data-local||' ${WRKSRC}/docs/api/Makefile.in
	@${REINPLACE_CMD} '\,gnutls/extra\.h,d' \
		${WRKSRC}/prelude-admin/prelude-admin.c \
		${WRKSRC}/prelude-admin/server.c

post-install:
	${INSTALL_MAN} ${WRKSRC}/docs/manpages/*.1 ${MAN1PREFIX}/man/man1
.for f in client.conf global.conf idmef-client.conf tls.conf
	${INSTALL_DATA} ${WRKSRC}/${f} \
		${PREFIX}/etc/prelude/default/${f}-dist
.if !exists(${PREFIX}/etc/prelude/default/${f})
	(cd ${PREFIX}/etc/prelude/default && ${CP} -p ${f}-dist ${f})
.endif
.endfor
.if ${PORT_OPTIONS:MPERL}
	-@${RM} -f ${PREFIX}/lib/perl5/${PERL_VER}/${PERL_ARCH}/perllocal.pod
.endif
.if ${PORT_OPTIONS:MDOCS}
	@${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/docs/api/html/* ${DOCSDIR}
.endif

.include <bsd.port.post.mk>