2019-07-21 00:45:58 +02:00
|
|
|
# $NetBSD: Makefile,v 1.60 2019/07/20 22:46:41 wiz Exp $
|
1999-09-10 17:48:02 +02:00
|
|
|
#
|
2003-04-16 17:51:22 +02:00
|
|
|
|
2017-06-15 20:27:50 +02:00
|
|
|
DISTNAME= snort-2.9.9.0
|
2019-07-21 00:45:58 +02:00
|
|
|
PKGREVISION= 2
|
2007-02-17 20:08:05 +01:00
|
|
|
CATEGORIES= net security
|
2017-06-15 20:27:50 +02:00
|
|
|
MASTER_SITES= https://www.snort.org/downloads/archive/snort/
|
2003-04-16 17:51:22 +02:00
|
|
|
|
2009-07-17 20:00:13 +02:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2017-08-01 16:58:51 +02:00
|
|
|
HOMEPAGE= https://www.snort.org/
|
2007-02-17 20:08:05 +01:00
|
|
|
COMMENT= The Open Source Network Intrusion Detection System
|
2011-04-01 18:48:36 +02:00
|
|
|
LICENSE= gnu-gpl-v2
|
|
|
|
|
2017-06-15 20:27:50 +02:00
|
|
|
DEPENDS+= daq>=2.0.0:../../net/daq
|
|
|
|
|
2007-02-17 20:08:05 +01:00
|
|
|
CONFLICTS+= snort-mysql-[0-9]*
|
|
|
|
CONFLICTS+= snort-pgsql-[0-9]*
|
|
|
|
CONFLICTS+= snort-prelude-[0-9]*
|
2006-04-19 00:39:32 +02:00
|
|
|
|
2007-02-17 20:08:05 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
2006-04-19 00:39:32 +02:00
|
|
|
|
2007-02-17 20:08:05 +01:00
|
|
|
GNU_CONFIGURE= YES
|
|
|
|
USE_LIBTOOL= YES
|
|
|
|
PKG_SYSCONFSUBDIR= snort
|
|
|
|
RCD_SCRIPTS= snort
|
|
|
|
SNORT_USER?= snort
|
|
|
|
SNORT_GROUP?= snort
|
|
|
|
EGDIR= ${PREFIX}/share/examples/snort
|
|
|
|
PKG_GROUPS= ${SNORT_GROUP}
|
|
|
|
PKG_USERS= ${SNORT_USER}:${SNORT_GROUP}
|
2007-07-04 22:54:31 +02:00
|
|
|
PKG_GROUPS_VARS+= SNORT_GROUP
|
2017-06-15 20:27:50 +02:00
|
|
|
PKG_USERS_VARS= SNORT_USER
|
|
|
|
FILES_SUBST+= SNORT_USER=${SNORT_USER} SNORT_GROUP=${SNORT_GROUP}
|
2007-02-17 20:08:05 +01:00
|
|
|
BUILD_DEFS+= VARBASE
|
2008-08-03 21:30:16 +02:00
|
|
|
MAKE_JOBS_SAFE= NO
|
2007-02-17 20:08:05 +01:00
|
|
|
OWN_DIRS_PERMS= ${VARBASE}/log/snort ${SNORT_USER} ${SNORT_GROUP} 700
|
|
|
|
DOC_FILES= BUGS INSTALL NEWS PROBLEMS README TODO USAGE WISHLIST
|
2017-06-15 20:27:50 +02:00
|
|
|
OWN_DIRS= ${PKG_SYSCONFDIR} ${PKG_SYSCONFDIR}/rules
|
|
|
|
OWN_DIRS+= ${PKG_SYSCONFDIR}/so_rules ${PKG_SYSCONFDIR}/preproc_rules
|
|
|
|
OWN_DIRS+= ${PREFIX}/lib ${PREFIX}/lib/snort_dynamicrules
|
|
|
|
INSTALLATION_DIRS+= ${EGDIR}/rules
|
|
|
|
AUTO_MKDIRS= yes
|
|
|
|
|
|
|
|
CONF_FILES= ${EGDIR}/attribute_table.dtd \
|
|
|
|
${PKG_SYSCONFDIR}/attribute_table.dtd
|
2007-02-17 20:08:05 +01:00
|
|
|
CONF_FILES+= ${EGDIR}/classification.config \
|
|
|
|
${PKG_SYSCONFDIR}/classification.config
|
2017-06-15 20:27:50 +02:00
|
|
|
CONF_FILES+= ${EGDIR}/file_magic.conf \
|
|
|
|
${PKG_SYSCONFDIR}/file_magic.conf
|
2007-02-17 20:08:05 +01:00
|
|
|
CONF_FILES+= ${EGDIR}/gen-msg.map \
|
|
|
|
${PKG_SYSCONFDIR}/gen-msg.map
|
2017-06-15 20:27:50 +02:00
|
|
|
CONF_FILES+= ${EGDIR}/reference.config \
|
|
|
|
${PKG_SYSCONFDIR}/reference.config
|
|
|
|
CONF_FILES+= ${EGDIR}/snort.conf.default \
|
|
|
|
${PKG_SYSCONFDIR}/snort.conf
|
|
|
|
CONF_FILES+= ${EGDIR}/threshold.conf \
|
|
|
|
${PKG_SYSCONFDIR}/threshold.conf
|
2007-02-17 20:08:05 +01:00
|
|
|
CONF_FILES+= ${EGDIR}/generators \
|
|
|
|
${PKG_SYSCONFDIR}/generators
|
|
|
|
CONF_FILES+= ${EGDIR}/unicode.map \
|
|
|
|
${PKG_SYSCONFDIR}/unicode.map
|
2017-06-15 20:27:50 +02:00
|
|
|
CONF_FILES+= ${EGDIR}/rules/black_list.rules \
|
|
|
|
${PKG_SYSCONFDIR}/rules/black_list.rules
|
|
|
|
CONF_FILES+= ${EGDIR}/rules/white_list.rules \
|
|
|
|
${PKG_SYSCONFDIR}/rules/white_list.rules
|
2007-02-17 20:08:05 +01:00
|
|
|
|
|
|
|
SUBST_CLASSES+= paths
|
2018-07-04 15:40:07 +02:00
|
|
|
SUBST_STAGE.paths= pre-configure
|
2007-02-17 20:08:05 +01:00
|
|
|
SUBST_FILES.paths= etc/snort.conf src/snort.c
|
2017-06-15 20:27:50 +02:00
|
|
|
SUBST_SED.paths= -e "s|/usr/local|${PREFIX}|g"
|
|
|
|
SUBST_SED.paths+= -e "s|../rules|rules|g"
|
|
|
|
SUBST_SED.paths+= -e "s|../so_rules|so_rules|g"
|
|
|
|
SUBST_SED.paths+= -e "s|../preproc_rules|preproc_rules|g"
|
2007-02-17 20:08:05 +01:00
|
|
|
SUBST_MESSAGE.paths= Fixing paths.
|
|
|
|
|
2008-08-03 21:30:16 +02:00
|
|
|
SUBST_CLASSES+= installp
|
|
|
|
SUBST_STAGE.installp= post-extract
|
2017-06-15 20:27:50 +02:00
|
|
|
SUBST_FILES.installp= src/dynamic-preprocessors/Makefile.in
|
|
|
|
SUBST_SED.installp= -e "s|exec_prefix)|exec_prefix)/share/snort|g"
|
|
|
|
SUBST_MESSAGE.installp= Fixing preprocessors install path.
|
2007-02-17 20:08:05 +01:00
|
|
|
|
|
|
|
.include "options.mk"
|
|
|
|
|
2017-06-15 20:27:50 +02:00
|
|
|
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
|
|
|
|
CONFIGURE_ARGS+= --disable-static-daq
|
|
|
|
CONFIGURE_ARGS+= --enable-sourcefire
|
|
|
|
CONFIGURE_ARGS+= --with-daq-includes=${BUILDLINK_PREFIX.daq}/include
|
|
|
|
CONFIGURE_ARGS+= --with-daq-libraries=${BUILDLINK_PREFIX.daq}/lib
|
2007-02-17 20:08:05 +01:00
|
|
|
CONFIGURE_ARGS+= --with-libpcap-includes=${BUILDLINK_PREFIX.libpcap}/include
|
|
|
|
CONFIGURE_ARGS+= --with-libpcap-libraries=${BUILDLINK_PREFIX.libpcap}/lib
|
2017-06-15 20:27:50 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-so_with_static_lib
|
2007-02-17 20:08:05 +01:00
|
|
|
|
|
|
|
pre-build:
|
|
|
|
${CP} ${WRKSRC}/etc/snort.conf ${WRKSRC}/etc/snort.conf.default
|
|
|
|
|
2009-12-09 12:42:35 +01:00
|
|
|
INSTALLATION_DIRS+= ${EGDIR} share/doc/snort/schemas
|
2007-02-17 20:08:05 +01:00
|
|
|
|
2009-12-09 12:42:35 +01:00
|
|
|
post-install:
|
2007-02-17 20:08:05 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/etc/*.config \
|
|
|
|
${WRKSRC}/etc/*.map \
|
|
|
|
${WRKSRC}/etc/threshold.conf \
|
2017-06-15 20:27:50 +02:00
|
|
|
${WRKSRC}/etc/attribute_table.dtd \
|
|
|
|
${WRKSRC}/etc/file_magic.conf \
|
2009-12-09 12:42:35 +01:00
|
|
|
${WRKSRC}/etc/snort.conf.default ${DESTDIR}${EGDIR}/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/generators ${DESTDIR}${EGDIR}
|
2007-02-17 20:08:05 +01:00
|
|
|
|
2017-06-15 20:27:50 +02:00
|
|
|
.for i in ${DOC_FILES}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DESTDIR}${PREFIX}/share/doc/snort/
|
|
|
|
.endfor
|
2007-02-17 20:08:05 +01:00
|
|
|
|
2017-06-15 20:27:50 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/README.* \
|
|
|
|
${WRKSRC}/doc/*.tex \
|
|
|
|
${WRKSRC}/doc/*.pdf ${DESTDIR}${PREFIX}/share/doc/snort/
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/black_list.rules \
|
|
|
|
${FILESDIR}/white_list.rules ${DESTDIR}${EGDIR}/rules/
|
2009-12-09 12:42:35 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/snort.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
|
2007-02-17 20:08:05 +01:00
|
|
|
|
2017-06-15 20:27:50 +02:00
|
|
|
.include "../../net/daq/buildlink3.mk"
|
|
|
|
.include "../../net/libdnet/buildlink3.mk"
|
2007-02-17 20:08:05 +01:00
|
|
|
.include "../../net/libpcap/buildlink3.mk"
|
|
|
|
.include "../../devel/pcre/buildlink3.mk"
|
1999-09-10 17:48:02 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|