]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blobdiff - suricata/suricata.nm
hyperscan: Build only on x86
[people/pmueller/ipfire-3.x.git] / suricata / suricata.nm
index 69c863287d1b96fa9f9fb05cc0999dc34a3e4df5..4825612e247e1ea90449abaf83bcb3f4b97900f5 100644 (file)
@@ -4,8 +4,8 @@
 ###############################################################################
 
 name       = suricata
-version    = 1.2.1
-release    = 2
+version    = 4.0.6
+release    = 3
 
 groups     = Networking/IDS
 url        = http://www.openinfosecfoundation.org/
@@ -29,23 +29,33 @@ build
                libnet-devel
                libpcap-devel
                libyaml-devel
+               libhtp-devel >= 0.5.20
                pcre-devel
                pkg-config
-               zlib-devel>=1.2.5-2
+               zlib-devel >= 1.2.5-2
        end
 
        configure_options += \
                --enable-gccprotect \
                --enable-nfqueue \
                --disable-gccmarch-native \
-               --disable-static
+               --disable-static \
+               --enable-non-bundled-htp \
+               --with-libhtp-includes=%{includedir}/htp \
+               --with-libhtp-libraries=%{libdir}
+
+       # Enable hyperscan only on x86
+       if "%{DISTRO_PLATFORM}" == "x86"
+               requires += hyperscan-devel
+               configure_options += --enable-hyperscan
+       end
 
        install_cmds
-               mkdir -pv %{BUILDROOT}/etc
-               mkdir -pv %{BUILDROOT}/etc/suricata
-               mkdir -pv %{BUILDROOT}/etc/suricata/rules
-               cp -vf %{DIR_SOURCE}/%{name}.conf %{BUILDROOT}/etc/suricata
-               mkdir -pv %{BUILDROOT}/var/log/suricata
+               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
@@ -57,25 +67,25 @@ packages
                prerquires = systemd-units
 
                configfiles
-                       /etc/suricata/suricata.conf
+                       %{sysconfdir}/suricata/suricata.conf
                end
 
                script postin
-                       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+                       systemctl daemon-reload >/dev/null 2>&1 || :
                end
 
                script preun
-                       /bin/systemctl --no-reload disable suricata.service >/dev/null 2>&1 || :
-                       /bin/systemctl stop suricata.service >/dev/null 2>&1 || :
+                       systemctl --no-reload disable suricata.service >/dev/null 2>&1 || :
+                       systemctl stop suricata.service >/dev/null 2>&1 || :
                end
 
                script postun
-                       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+                       systemctl daemon-reload >/dev/null 2>&1 || :
                end
 
                script postup
-                       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-                       /bin/systemctl try-restart suricata.service >/dev/null 2>&1 || :
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+                       systemctl try-restart suricata.service >/dev/null 2>&1 || :
                end
 
        end