aboutsummaryrefslogtreecommitdiff
path: root/security/openvas/Makefile
blob: 28bdff0363c9be7d21daebb15b738083463acc08 (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
PORTNAME=	openvas
DISTVERSION=	23.0.1
DISTVERSIONPREFIX=	v
CATEGORIES=	security

MAINTAINER=	acm@FreeBSD.org
COMMENT=	Open vulnerability assessment scanner
WWW=		https://github.com/greenbone/openvas

LICENSE=	GPLv2+

BUILD_DEPENDS=	flex:textproc/flex
LIB_DEPENDS=	libgvm_base.so:security/gvm-libs \
		libgcrypt.so:security/libgcrypt \
		libgpg-error.so:security/libgpg-error \
		libpcap.so.1:net/libpcap \
		libksba.so:security/libksba \
		libgpgme.so:security/gpgme \
		libssh.so:security/libssh \
		libgnutls.so:security/gnutls \
		libnetsnmp.so:net-mgmt/net-snmp \
		libjson-glib-1.0.so:devel/json-glib
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}impacket>=0:net/py-impacket@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}greenbone-feed-sync>0:security/py-greenbone-feed-sync@${PY_FLAVOR} \
		redis-server:databases/redis \
		snmpget:net-mgmt/net-snmp \
		rsync:net/rsync \
		nmap:security/nmap

USES=		bison cmake gnome pkgconfig python ssl
USE_GITHUB=	yes
GH_ACCOUNT=	greenbone
GH_PROJECT=	${PORTNAME}-scanner
USE_GNOME=	glib20

CMAKE_ARGS+=	-DINSTALL_OLD_SYNC_SCRIPT=OFF

USERS=		gvm
GROUPS=		${USERS}

.include <bsd.port.pre.mk>

.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400079 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 ))
CFLAGS+=	-Wno-error=strict-prototypes -Wno-error=unused-but-set-variable -Wno-error=invalid-utf8
.endif

# The struct this error is about is only ever accessed using bcopy() and memset(),
# so the unaligned structure doesn't matter.  Disable the error, but keep it as a
# warning so we can see where it is.
CFLAGS_armv6=	-Wno-error=unaligned-access
CFLAGS_armv7=	-Wno-error=unaligned-access

post-patch:
	@${REINPLACE_CMD} -e 's|#include <bsd/unistd.h>||g' ${WRKSRC}/src/nasl_plugins.c
	@${REINPLACE_CMD} -e 's|#include <bsd/unistd.h>|#include <unistd.h>|g' ${WRKSRC}//src/pluginload.c
	@${REINPLACE_CMD} -e 's|vendor_version_get ()|vendor_version_get (void)|g' ${WRKSRC}/misc/vendorversion.c

post-install:
	@${MKDIR} ${STAGEDIR}/var/run/ospd

.include <bsd.port.post.mk>