pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

suricata: add EGDIR and generate initial configuration files into it



Module Name:	pkgsrc-wip
Committed By:	kami <kisskamizeg%gmail.com@localhost>
Pushed By:	kami
Date:		Sun Sep 28 10:43:38 2025 +0200
Changeset:	9180f998571fe3310e0d85d275f838828f7d0403

Modified Files:
	suricata/Makefile
	suricata/PLIST

Log Message:
suricata: add EGDIR and generate initial configuration files into it

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9180f998571fe3310e0d85d275f838828f7d0403

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 suricata/Makefile | 21 ++++++++++++++++++---
 suricata/PLIST    | 10 ++++++++++
 2 files changed, 28 insertions(+), 3 deletions(-)

diffs:
diff --git a/suricata/Makefile b/suricata/Makefile
index 7d018fb958..cb9a562e7d 100644
--- a/suricata/Makefile
+++ b/suricata/Makefile
@@ -16,13 +16,15 @@ USE_LIBTOOL=		yes
 GNU_CONFIGURE=		yes
 USE_TOOLS+=		pkg-config
 
-#PKGCONFIG_OVERRIDE+=	rust/vendor/libz-sys/src/zlib-ng/zlib.pc.in
-#PKGCONFIG_OVERRIDE+=	rust/vendor/libz-sys/src/zlib/zlib.pc.in
-
 USE_LANGUAGES=		c c++
 
 LIBS.NetBSD+=		 -lm
 
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
+EGDIR=                  ${PREFIX}/share/examples/suricata
+INSTALLATION_DIRS+=     ${EGDIR}
+INSTALL_MAKE_FLAGS=     ${MAKE_FLAGS} sysconfdir=${EGDIR}
+
 PKG_OPTIONS_VAR=	PKG_OPTIONS.suricata
 PKG_SUPPORTED_OPTIONS=	enable-unittests enable-debug enable-profiling
 #PKG_SUGGESTED_OPTIONS=
@@ -43,6 +45,19 @@ CONFIGURE_ARGS+=	--enable-debug
 CONFIGURE_ARGS+=	--enable-profiling
 .endif
 
+#
+# Generate and place some initial configuration files into EGDIR!
+# 
+post-install:
+	cd ${WRKSRC} \
+	&& env ${INSTALL_ENV} ${MAKE_ENV} \
+		${MAKE_PROGRAM} install-conf \
+			&& ${MV} ${DESTDIR}${PREFIX}/etc/suricata/* ${DESTDIR}${EGDIR} \
+				&& find ${DESTDIR}{EGDIR} -type f -print | sort \
+					> ${WRKDIR}/PLIST_DYNAMIC
+# plist gen helper
+PLIST.SRC+=	${WRKDIR}/PLIST_DYNAMIC
+
 .include "../../devel/pcre2/buildlink3.mk"
 .include "../../textproc/libyaml/buildlink3.mk"
 .include "../../textproc/jansson/buildlink3.mk"
diff --git a/suricata/PLIST b/suricata/PLIST
index e0d93bbb0f..07e61fa4d8 100644
--- a/suricata/PLIST
+++ b/suricata/PLIST
@@ -57,6 +57,10 @@ share/doc/suricata/README
 share/doc/suricata/Setting_up_IPSinline_for_Linux.txt
 share/doc/suricata/TODO
 share/doc/suricata/Third_Party_Installation_Guides.txt
+share/examples/suricata/classification.config
+share/examples/suricata/reference.config
+share/examples/suricata/suricata.yaml
+share/examples/suricata/threshold.config
 share/suricata/classification.config
 share/suricata/reference.config
 share/suricata/rules/app-layer-events.rules
@@ -86,3 +90,9 @@ share/suricata/rules/ssh-events.rules
 share/suricata/rules/stream-events.rules
 share/suricata/rules/tls-events.rules
 share/suricata/rules/websocket-events.rules
+@pkgdir var/run/suricata
+@pkgdir var/log/suricata/files
+@pkgdir var/log/suricata/certs
+@pkgdir var/lib/suricata/data
+@pkgdir var/lib/suricata/cache/sgh
+@pkgdir etc/suricata


Home | Main Index | Thread Index | Old Index