]>
Commit | Line | Data |
---|---|---|
8e0abce9 | 1 | Summary: Emerging Threats open rules for Snort IDS/IPS |
2 | Name: emergingthreats | |
3 | Version: 6947 | |
4 | Release: 1 | |
5 | License: GNU GPLv2 and BSD | |
6 | Group: Networking | |
7 | Source0: http://rules.emergingthreats.net/open/snort-2.9.0/emerging.rules.tar.gz | |
8 | # Source0-md5: 38db422a5b87375c25b8714f42dc8670 | |
9 | URL: http://emergingthreats.net/ | |
f4936935 | 10 | Requires: sed >= 4.0 |
8e0abce9 | 11 | Requires: snort >= 2.9.0 |
8e0abce9 | 12 | Provides: snort-rules |
13 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
14 | ||
f4936935 ER |
15 | %define _sysconfdir /etc/snort |
16 | ||
8e0abce9 | 17 | %description |
18 | Emerging Threats open rules for Snort IDS/IPS. | |
19 | ||
20 | %prep | |
21 | %setup -qn rules | |
22 | ||
8e0abce9 | 23 | %install |
24 | rm -rf $RPM_BUILD_ROOT | |
f4936935 ER |
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 | |
8e0abce9 | 30 | |
31 | %clean | |
32 | rm -rf $RPM_BUILD_ROOT | |
33 | ||
8e0abce9 | 34 | %post |
f4936935 ER |
35 | if [ "$1" = "1" ]; then |
36 | if [ -f %{_sysconfdir}/snort.conf ]; then | |
37 | echo "include emerging.conf" >> %{_sysconfdir}/snort.conf | |
38 | fi | |
39 | fi | |
40 | %service -q snortd restart | |
8e0abce9 | 41 | |
42 | %postun | |
f4936935 ER |
43 | if [ "$1" = "0" ]; then |
44 | %{__sed} -i -re 's/^\s*include\s+emerging.conf.*$//' %{_sysconfdir}/snort.conf | |
45 | %service -q snortd restart | |
46 | fi | |
8e0abce9 | 47 | |
48 | %files | |
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 | |
f4936935 ER |
51 | %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/emerging.conf |
52 | %attr(640,root,snort) %{_sysconfdir}/rules/* |