1 Summary: Emerging Threats open rules for Snort IDS/IPS
5 License: GNU GPLv2 and BSD
7 Source0: http://rules.emergingthreats.net/open/snort-2.9.0/emerging.rules.tar.gz
8 # Source0-md5: 38db422a5b87375c25b8714f42dc8670
9 URL: http://emergingthreats.net/
11 Requires: snort >= 2.9.0
13 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15 %define _sysconfdir /etc/snort
18 Emerging Threats open rules for Snort IDS/IPS.
24 rm -rf $RPM_BUILD_ROOT
25 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rules
26 cp -p emerging.conf $RPM_BUILD_ROOT%{_sysconfdir}
27 cp -p emerging-*.rules $RPM_BUILD_ROOT%{_sysconfdir}/rules
28 cp -p classification.config $RPM_BUILD_ROOT%{_sysconfdir}/rules
29 cp -p reference.config $RPM_BUILD_ROOT%{_sysconfdir}/rules
32 rm -rf $RPM_BUILD_ROOT
35 if [ "$1" = "1" ]; then
36 if [ -f %{_sysconfdir}/snort.conf ]; then
37 echo "include emerging.conf" >> %{_sysconfdir}/snort.conf
40 %service -q snortd restart
43 if [ "$1" = "0" ]; then
44 %{__sed} -i -re 's/^\s*include\s+emerging.conf.*$//' %{_sysconfdir}/snort.conf
45 %service -q snortd restart
49 %defattr(644,root,root,755)
50 %doc LICENSE BSD-License.txt snort-2.9.0-open.txt gpl-2.0.txt compromised-ips.txt rbn-ips.txt rbn-malvertisers-ips.txt
51 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/emerging.conf
52 %attr(640,root,snort) %{_sysconfdir}/rules/*