summaryrefslogtreecommitdiff
path: root/package/snort/Makefile
blob: 73cde0a4d2cdb7253d214d4d09b4e8b07b825ce0 (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
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include ${ADK_TOPDIR}/rules.mk

PKG_NAME:=		snort
PKG_VERSION:=		2.9.14.1
PKG_RELEASE:=		1
PKG_HASH:=		2472989da3aace000d1ea5931ece68f8e5cc0c511e272d65182113a2481e822d
PKG_DESCR:=		flexible network intrusion detection system
PKG_SECTION:=		net/security
PKG_DEPENDS:=		libnet libpcap libpcre libtirpc daq
PKG_BUILDDEP:=		libnet libpcap pcre libtirpc daq
PKG_URL:=		http://www.snort.org/
PKG_SITES:=		https://www.snort.org/downloads/snort/
PKG_NOPARALLEL:=	1

DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.gz

PKG_LIBC_DEPENDS:=	uclibc-ng glibc

include ${ADK_TOPDIR}/mk/package.mk

$(eval $(call PKG_template,SNORT,snort,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

AUTOTOOL_STYLE:=	autoreconf
TARGET_CPPFLAGS+=	-I$(STAGING_TARGET_DIR)/usr/include/tirpc
TARGET_LDFLAGS+=	-ltirpc
CONFIGURE_ENV+=		have_inaddr_none=yes
CONFIGURE_ARGS+=	--disable-static-daq \
			--disable-open-appid \
			--with-libpcap-includes="${STAGING_TARGET_DIR}/usr/include" \
			--with-libpcap-libraries="${STAGING_TARGET_DIR}/usr/lib" \
			--with-libpcre-includes="${STAGING_TARGET_DIR}/usr/include" \
			--with-libpcre-libraries="${STAGING_TARGET_DIR}/usr/lib" \
			--with-dnet-includes="${STAGING_TARGET_DIR}/usr/include" \ 
			--with-dnet-libraries="${STAGING_TARGET_DIR}/usr/lib" 

snort-install:
	${INSTALL_DIR} ${IDIR_SNORT}/usr/bin
	${INSTALL_DIR} ${IDIR_SNORT}/etc/snort
	${INSTALL_DATA} ${WRKBUILD}/etc/snort.conf ${IDIR_SNORT}/etc/snort
	${INSTALL_DATA} ${WRKBUILD}/etc/classification.config \
		${IDIR_SNORT}/etc/snort
	${INSTALL_DATA} ${WRKBUILD}/etc/gen-msg.map \
		${IDIR_SNORT}/etc/snort
	${INSTALL_DATA} ${WRKBUILD}/etc/reference.config \
		${IDIR_SNORT}/etc/snort
	${INSTALL_DATA} ${WRKBUILD}/etc/threshold.conf \
		${IDIR_SNORT}/etc/snort
	${INSTALL_DATA} ${WRKBUILD}/etc/unicode.map \
		${IDIR_SNORT}/etc/snort
	${INSTALL_BIN} ${WRKINST}/usr/bin/snort ${IDIR_SNORT}/usr/bin

include ${ADK_TOPDIR}/mk/pkg-bottom.mk