]> git.ipfire.org Git - ipfire-3.x.git/blob - suricata/suricata.nm
git: Update to 2.23.0
[ipfire-3.x.git] / suricata / suricata.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = suricata
7 version = 4.0.6
8 release = 3
9
10 groups = Networking/IDS
11 url = http://www.openinfosecfoundation.org/
12 license = GPLv2
13 summary = Open Source Next Generation Intrusion Detection and Prevention Engine.
14
15 description
16 The suricata engine is not intended to just replace or emulate the
17 existing tools in the industry, but provides new ideas and
18 technologies.
19 end
20
21 source_dl = http://www.openinfosecfoundation.org/download/
22
23 build
24 requires
25 file-devel
26 libcap-ng-devel
27 libnfnetlink-devel
28 libnetfilter_queue-devel
29 libnet-devel
30 libpcap-devel
31 libyaml-devel
32 libhtp-devel >= 0.5.20
33 pcre-devel
34 pkg-config
35 zlib-devel >= 1.2.5-2
36 end
37
38 configure_options += \
39 --enable-gccprotect \
40 --enable-nfqueue \
41 --disable-gccmarch-native \
42 --disable-static \
43 --enable-non-bundled-htp \
44 --with-libhtp-includes=%{includedir}/htp \
45 --with-libhtp-libraries=%{libdir}
46
47 # Enable hyperscan only on x86
48 if "%{DISTRO_PLATFORM}" == "x86"
49 requires += hyperscan-devel
50 configure_options += --enable-hyperscan
51 end
52
53 install_cmds
54 mkdir -pv %{BUILDROOT}%{sysconfdir}
55 mkdir -pv %{BUILDROOT}%{sysconfdir}/suricata
56 mkdir -pv %{BUILDROOT}%{sysconfdir}/suricata/rules
57 cp -vf %{DIR_SOURCE}/%{name}.conf %{BUILDROOT}%{sysconfdir}/suricata
58 mkdir -pv %{BUILDROOT}%{localstatedir}/log/suricata
59 end
60
61 end
62
63
64 packages
65 package %{name}
66
67 prerquires = systemd-units
68
69 configfiles
70 %{sysconfdir}/suricata/suricata.conf
71 end
72
73 script postin
74 systemctl daemon-reload >/dev/null 2>&1 || :
75 end
76
77 script preun
78 systemctl --no-reload disable suricata.service >/dev/null 2>&1 || :
79 systemctl stop suricata.service >/dev/null 2>&1 || :
80 end
81
82 script postun
83 systemctl daemon-reload >/dev/null 2>&1 || :
84 end
85
86 script postup
87 systemctl daemon-reload >/dev/null 2>&1 || :
88 systemctl try-restart suricata.service >/dev/null 2>&1 || :
89 end
90
91 end
92
93 package %{name}-devel
94 template DEVEL
95 end
96
97 package %{name}-debuginfo
98 template DEBUGINFO
99 end
100 end