]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - suricata/suricata.nm
suricata: Update to 2.0.
[people/ms/ipfire-3.x.git] / suricata / suricata.nm
index 072f55f91878d2f5d9d95683654524f0da8c4a0f..13941669761ca9f6ff21cf7af3467ba4d02fe796 100644 (file)
@@ -4,7 +4,7 @@
 ###############################################################################
 
 name       = suricata
-version    = 1.1beta3
+version    = 2.0
 release    = 1
 
 groups     = Networking/IDS
@@ -22,29 +22,73 @@ source_dl  = http://www.openinfosecfoundation.org/download/
 
 build
        requires
+               file-devel
                libcap-ng-devel
                libnfnetlink-devel
                libnetfilter_queue-devel
                libnet-devel
                libpcap-devel
                libyaml-devel
+               libhtp-devel >= 0.5.5
                pcre-devel
                pkg-config
-               zlib-devel>=1.2.5-2
+               zlib-devel >= 1.2.5-2
        end
 
        configure_options += \
                --enable-gccprotect \
                --enable-nfqueue \
-               --disable-static
+               --disable-gccmarch-native \
+               --disable-static \
+               --enable-non-bundled-htp \
+               --with-libhtp-includes=%{includedir}/htp \
+               --with-libhtp-libraries=%{libdir}
+
+       install_cmds
+               mkdir -pv %{BUILDROOT}%{sysconfdir}
+               mkdir -pv %{BUILDROOT}%{sysconfdir}/suricata
+               mkdir -pv %{BUILDROOT}%{sysconfdir}/suricata/rules
+               cp -vf %{DIR_SOURCE}/%{name}.conf %{BUILDROOT}%{sysconfdir}/suricata
+               mkdir -pv %{BUILDROOT}%{localstatedir}/log/suricata
+       end
+
 end
 
 
 packages
        package %{name}
+
+               prerquires = systemd-units
+
+               configfiles
+                       %{sysconfdir}/suricata/suricata.conf
+               end
+
+               script postin
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script preun
+                       systemctl --no-reload disable suricata.service >/dev/null 2>&1 || :
+                       systemctl stop suricata.service >/dev/null 2>&1 || :
+               end
+
+               script postun
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script postup
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+                       systemctl try-restart suricata.service >/dev/null 2>&1 || :
+               end
+
        end
-       
+
        package %{name}-devel
                template DEVEL
        end
+
+       package %{name}-debuginfo
+               template DEBUGINFO
+       end
 end