]>
Commit | Line | Data |
---|---|---|
c6c409aa | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
c6c409aa SS |
4 | ############################################################################### |
5 | ||
9ecbd3d5 | 6 | name = suricata |
e6c76881 | 7 | version = 4.0.6 |
899a8a2f | 8 | release = 3 |
802ea3af MT |
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 | |
f5a18d67 | 25 | file-devel |
802ea3af MT |
26 | libcap-ng-devel |
27 | libnfnetlink-devel | |
28 | libnetfilter_queue-devel | |
29 | libnet-devel | |
30 | libpcap-devel | |
31 | libyaml-devel | |
c8e7f1a7 | 32 | libhtp-devel >= 0.5.20 |
802ea3af MT |
33 | pcre-devel |
34 | pkg-config | |
d9b6f3b5 | 35 | zlib-devel >= 1.2.5-2 |
802ea3af MT |
36 | end |
37 | ||
38 | configure_options += \ | |
39 | --enable-gccprotect \ | |
40 | --enable-nfqueue \ | |
ee9ea526 | 41 | --disable-gccmarch-native \ |
1c47d86a SS |
42 | --disable-static \ |
43 | --enable-non-bundled-htp \ | |
44 | --with-libhtp-includes=%{includedir}/htp \ | |
45 | --with-libhtp-libraries=%{libdir} | |
272bae8f | 46 | |
899a8a2f MT |
47 | # Enable hyperscan only on x86 |
48 | if "%{DISTRO_PLATFORM}" == "x86" | |
49 | requires += hyperscan-devel | |
50 | configure_options += --enable-hyperscan | |
51 | end | |
52 | ||
272bae8f | 53 | install_cmds |
fdf22456 KB |
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 | |
272bae8f CS |
59 | end |
60 | ||
802ea3af MT |
61 | end |
62 | ||
63 | ||
64 | packages | |
65 | package %{name} | |
74e6b01b CS |
66 | |
67 | prerquires = systemd-units | |
68 | ||
69 | configfiles | |
d9b6f3b5 | 70 | %{sysconfdir}/suricata/suricata.conf |
74e6b01b CS |
71 | end |
72 | ||
73 | script postin | |
fdf22456 | 74 | systemctl daemon-reload >/dev/null 2>&1 || : |
74e6b01b CS |
75 | end |
76 | ||
77 | script preun | |
fdf22456 KB |
78 | systemctl --no-reload disable suricata.service >/dev/null 2>&1 || : |
79 | systemctl stop suricata.service >/dev/null 2>&1 || : | |
74e6b01b CS |
80 | end |
81 | ||
82 | script postun | |
fdf22456 | 83 | systemctl daemon-reload >/dev/null 2>&1 || : |
74e6b01b CS |
84 | end |
85 | ||
86 | script postup | |
fdf22456 KB |
87 | systemctl daemon-reload >/dev/null 2>&1 || : |
88 | systemctl try-restart suricata.service >/dev/null 2>&1 || : | |
74e6b01b CS |
89 | end |
90 | ||
802ea3af | 91 | end |
1f9bc2f0 | 92 | |
802ea3af MT |
93 | package %{name}-devel |
94 | template DEVEL | |
95 | end | |
1f9bc2f0 MT |
96 | |
97 | package %{name}-debuginfo | |
98 | template DEBUGINFO | |
99 | end | |
802ea3af | 100 | end |