aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorzi <zi@FreeBSD.org>2011-12-16 22:45:39 +0800
committerzi <zi@FreeBSD.org>2011-12-16 22:45:39 +0800
commit81da5dc21145eb6645ca17e4f316ddce45527e76 (patch)
tree7c4d9ad4066ca03a9985c50e191f7cdc772983f8 /security
parentb354bcedc7476a93211a1d70cef0ec8e43d0a6fe (diff)
downloadfreebsd-ports-gnome-81da5dc21145eb6645ca17e4f316ddce45527e76.tar.gz
freebsd-ports-gnome-81da5dc21145eb6645ca17e4f316ddce45527e76.tar.zst
freebsd-ports-gnome-81da5dc21145eb6645ca17e4f316ddce45527e76.zip
- Cleanup snortsam integration
Diffstat (limited to 'security')
-rw-r--r--security/snort/Makefile50
1 files changed, 21 insertions, 29 deletions
diff --git a/security/snort/Makefile b/security/snort/Makefile
index 3d67434eda2a..57dc2ea2faa9 100644
--- a/security/snort/Makefile
+++ b/security/snort/Makefile
@@ -176,34 +176,38 @@ CONFIGURE_ARGS+= --enable-react
.if defined(WITH_SNORTSAM)
USE_AUTOTOOLS+= automake
+USE_GNOME= pkgconfig
PATCH_SITES+= http://www.snortsam.net/files/snort-plugin/:snortsam
PATCHFILES+= snortsam-2.9.1.2.diff.gz:snortsam
.endif
post-patch:
-.if defined(NOPORTDOCS)
- @${REINPLACE_CMD} '/SUBDIRS = /s/doc//' ${WRKSRC}/Makefile.in
-.endif
-
-pre-configure:
- ${FIND} ${WRKSRC} -name 'Makefile.in' | ${XARGS} ${REINPLACE_CMD} -e 's|lib/snort_|lib/snort/|g'
- ${REINPLACE_CMD} "s,/etc/snort.conf,${CONFIG_DIR}/snort.conf," ${WRKSRC}/src/snort.c ${WRKSRC}/snort.8
- ${REINPLACE_CMD} -e 's|lib/snort_|lib/snort/|g' ${WRKSRC}/etc/snort.conf
- ${REINPLACE_CMD} -e 's|^dynamicdetection|#dynamicdetection|' ${WRKSRC}/etc/snort.conf
- ${REINPLACE_CMD} -e '/var HOME_NET/s/any/[YOU_NEED_TO_SET_HOME_NET_IN_snort.conf]/' ${WRKSRC}/etc/snort.conf
- ${REINPLACE_CMD} -e 's|libdir)/pkgconfig|prefix)/libdata/pkgconfig|' ${WRKSRC}/Makefile.in
- ${REINPLACE_CMD} -e 's|libdir)/pkgconfig|prefix)/libdata/pkgconfig|' \
+ @${FIND} ${WRKSRC} -name 'Makefile.in' | ${XARGS} ${REINPLACE_CMD} -e 's|lib/snort_|lib/snort/|g'
+ @${REINPLACE_CMD} "s,/etc/snort.conf,${CONFIG_DIR}/snort.conf," ${WRKSRC}/src/snort.c ${WRKSRC}/snort.8
+ @${REINPLACE_CMD} -e 's|lib/snort_|lib/snort/|g' ${WRKSRC}/etc/snort.conf
+ @${REINPLACE_CMD} -e 's|^dynamicdetection|#dynamicdetection|' ${WRKSRC}/etc/snort.conf
+ @${REINPLACE_CMD} -e '/var HOME_NET/s/any/[YOU_NEED_TO_SET_HOME_NET_IN_snort.conf]/' ${WRKSRC}/etc/snort.conf
+ @${REINPLACE_CMD} -e 's|libdir)/pkgconfig|prefix)/libdata/pkgconfig|' ${WRKSRC}/Makefile.in \
${WRKSRC}/src/dynamic-preprocessors/libs/Makefile.in
- ${REINPLACE_CMD} -e 's|libnet-config|${LIBNET_CONFIG}|g' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|libnet-config|${LIBNET_CONFIG}|g' ${WRKSRC}/configure
.if !defined(WITH_IPV6)
- ${REINPLACE_CMD} -e 's|^ipvar |var |' ${WRKSRC}/etc/snort.conf
- ${REINPLACE_CMD} -e '/normalize_ip6/s/^preprocessor/#preprocessor/' ${WRKSRC}/etc/snort.conf
- ${REINPLACE_CMD} -e '/normalize_icmp6/s/^preprocessor/#preprocessor/' ${WRKSRC}/etc/snort.conf
+ @${REINPLACE_CMD} -e 's|^ipvar |var |' ${WRKSRC}/etc/snort.conf
+ @${REINPLACE_CMD} -e '/normalize_ip6/s/^preprocessor/#preprocessor/' ${WRKSRC}/etc/snort.conf
+ @${REINPLACE_CMD} -e '/normalize_icmp6/s/^preprocessor/#preprocessor/' ${WRKSRC}/etc/snort.conf
.endif
.if defined(WITH_DECODERPRE)
- ${REINPLACE_CMD} -e '/^# include .PREPROC_RULE/s/# include/include/' ${WRKSRC}/etc/snort.conf
+ @${REINPLACE_CMD} -e '/^# include .PREPROC_RULE/s/# include/include/' ${WRKSRC}/etc/snort.conf
+.endif
+.if defined(NOPORTDOCS)
+ @${REINPLACE_CMD} '/SUBDIRS = /s/doc//' ${WRKSRC}/Makefile.in ${WRKSRC}/Makefile.am
.endif
+
+pre-configure:
.if defined(WITH_SNORTSAM)
+ @${FIND} ${WRKSRC} -name 'Makefile.am' | ${XARGS} ${REINPLACE_CMD} -e 's|lib/snort_|lib/snort/|g'
+ @${REINPLACE_CMD} -e 's|libdir)/pkgconfig|prefix)/libdata/pkgconfig|' ${WRKSRC}/Makefile.am \
+ ${WRKSRC}/src/dynamic-preprocessors/libs/Makefile.am
+ @${ECHO_MSG} "===> Rebuilding required files for snortsam patches"
@cd ${WRKSRC} && ${SH} ${WRKSRC}/autojunk.sh
.endif
@@ -216,18 +220,6 @@ pre-install:
.endif
post-install:
-.if defined(WITH_SNORTSAM)
- # mss: only doing this because snortsam patch/autojunk messes up paths
- # life is too short to figure out why.
- @${MKDIR} ${LOCALBASE}/lib/snort/dynamicrules
- @cd ${LOCALBASE}/lib && ${MKDIR} snort/dynamicrules && ${MKDIR} snort/dynamicengine && ${MKDIR} snort/dynamicpreprocessor
- @cd ${LOCALBASE}/lib && ${MV} snort_dynamicrules/* snort/dynamicrules
- @cd ${LOCALBASE}/lib && ${MV} snort_dynamicengine/* snort/dynamicengine
- @cd ${LOCALBASE}/lib && ${MV} snort_dynamicpreprocessor/* snort/dynamicpreprocessor
- @cd ${LOCALBASE}/lib && ${RMDIR} snort_dynamic*
- @${MKDIR} ${LOCALBASE}/libdata/pkgconfig/ && ${MV} ${LOCALBASE}/lib/pkgconfig/snort.pc ${LOCALBASE}/libdata/pkgconfig/snort.pc
- @${RMDIR} ${LOCALBASE}/lib/pkgconfig
-.endif
@${LIBTOOL} --finish ${LOCALBASE}/lib/snort/dynamicpreprocessor
[ -d ${CONFIG_DIR} ] || ${MKDIR} ${CONFIG_DIR}
[ -d ${EXAMPLESDIR} ] || ${MKDIR} ${EXAMPLESDIR}