summaryrefslogtreecommitdiff
path: root/security/razorback-api/Makefile
blob: bd48e4db6bc6c1869b585853d7adc21d5a47a215 (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
# New ports collection makefile for:	razorback-api
# Date created:				2011/06/8
# Whom:					Tom Judge <tom@tomjudge.com>
#
# $FreeBSD$
#

PORTNAME=	api
PORTVERSION=	0.5.0
CATEGORIES=	security
MASTER_SITES=	SF/razorbacktm/API
PKGNAMEPREFIX=	razorback-
DIST_SUBDIR=	razorback

MAINTAINER=	tj@FreeBSD.org
COMMENT=	Framework for an intelligence driven security solution - API

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/LICENSE

LIB_DEPENDS=	config.10:${PORTSDIR}/devel/libconfig \
		uuid.1:${PORTSDIR}/misc/e2fsprogs-libuuid \
		curl.6:${PORTSDIR}/ftp/curl \
		json.0:${PORTSDIR}/devel/json-c

OPTIONS_DEFINE=	DEBUG ASSERT CNC_DEBUG STOMP_DEBUG

CNC_DEBUG_DESC=		Enable Command and Control Debug
STOMP_DEBUG_DESC=	Enable STOMP Debug

.include <bsd.port.options.mk>

USES=	pathfix
USE_AUTOTOOLS=	libtool
GNU_CONFIGURE=	yes
USE_LDCONFIG=	yes
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

.if !empty(PORT_OPTIONS:MDEBUG)
CONFIGURE_ARGS+=--enable-debug
.endif

.if !empty(PORT_OPTIONS:MASSERT)
CONFIGURE_ARGS+=--enable-assert
.endif

.if !empty(PORT_OPTIONS:MCNC_DEBUG)
CONFIGURE_ARGS+=--enable-cnc-debug
.endif

.if !empty(PORT_OPTIONS:MSTOMP_DEBUG)
CONFIGURE_ARGS+=--enable-stomp-debug
.endif

.if ${CC} == "clang" || ${CXX} == "clang++"
BROKEN=		does not build when compiled with clang
.endif

.include <bsd.port.pre.mk>

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

post-install:
	@if [ ! -f ${PREFIX}/etc/razorback/api.conf ]; then \
		${CP} -p ${PREFIX}/etc/razorback/api.conf.sample ${PREFIX}/etc/razorback/api.conf ; \
	fi
	@if [ ! -f ${PREFIX}/etc/razorback/magic ]; then \
		${CP} -p ${PREFIX}/etc/razorback/magic.sample ${PREFIX}/etc/razorback/magic ; \
	fi

.include <bsd.port.post.mk>