]> git.pld-linux.org Git - packages/emergingthreats.git/blob - emergingthreats.spec
- adapter (kill dozen trailing spaces, people should stop copying stuff with mouse)
[packages/emergingthreats.git] / emergingthreats.spec
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/
10 Requires:       sed >= 4.0
11 Requires:       snort >= 2.9.0
12 Provides:       snort-rules
13 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14
15 %define         _sysconfdir     /etc/snort
16
17 %description
18 Emerging Threats open rules for Snort IDS/IPS.
19
20 %prep
21 %setup -qn rules
22
23 %install
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
30
31 %clean
32 rm -rf $RPM_BUILD_ROOT
33
34 %post
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
41
42 %postun
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
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
51 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/emerging.conf
52 %attr(640,root,snort) %{_sysconfdir}/rules/*
This page took 0.128918 seconds and 4 git commands to generate.