]> git.pld-linux.org Git - packages/emergingthreats.git/blame - emergingthreats.spec
- adapter (kill dozen trailing spaces, people should stop copying stuff with mouse)
[packages/emergingthreats.git] / emergingthreats.spec
CommitLineData
8e0abce9 1Summary: Emerging Threats open rules for Snort IDS/IPS
2Name: emergingthreats
3Version: 6947
4Release: 1
5License: GNU GPLv2 and BSD
6Group: Networking
7Source0: http://rules.emergingthreats.net/open/snort-2.9.0/emerging.rules.tar.gz
8# Source0-md5: 38db422a5b87375c25b8714f42dc8670
9URL: http://emergingthreats.net/
f4936935 10Requires: sed >= 4.0
8e0abce9 11Requires: snort >= 2.9.0
8e0abce9 12Provides: snort-rules
13BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14
f4936935
ER
15%define _sysconfdir /etc/snort
16
8e0abce9 17%description
18Emerging Threats open rules for Snort IDS/IPS.
19
20%prep
21%setup -qn rules
22
8e0abce9 23%install
24rm -rf $RPM_BUILD_ROOT
f4936935
ER
25install -d $RPM_BUILD_ROOT%{_sysconfdir}/rules
26cp -p emerging.conf $RPM_BUILD_ROOT%{_sysconfdir}
27cp -p emerging-*.rules $RPM_BUILD_ROOT%{_sysconfdir}/rules
28cp -p classification.config $RPM_BUILD_ROOT%{_sysconfdir}/rules
29cp -p reference.config $RPM_BUILD_ROOT%{_sysconfdir}/rules
8e0abce9 30
31%clean
32rm -rf $RPM_BUILD_ROOT
33
8e0abce9 34%post
f4936935
ER
35if [ "$1" = "1" ]; then
36 if [ -f %{_sysconfdir}/snort.conf ]; then
37 echo "include emerging.conf" >> %{_sysconfdir}/snort.conf
38 fi
39fi
40%service -q snortd restart
8e0abce9 41
42%postun
f4936935
ER
43if [ "$1" = "0" ]; then
44 %{__sed} -i -re 's/^\s*include\s+emerging.conf.*$//' %{_sysconfdir}/snort.conf
45 %service -q snortd restart
46fi
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/*
This page took 0.060869 seconds and 4 git commands to generate.