]> git.pld-linux.org Git - packages/portsentry.git/blob - portsentry.spec
- added some ghost files in %{_sysconfdir}
[packages/portsentry.git] / portsentry.spec
1 Summary:        Port scan detection and active defense
2 Summary(pl):    Program wykrywaj±cy skanowanie portów i umo¿liwiaj±cy obronê
3 Name:           portsentry
4 Version:        1.1
5 Release:        10
6 License:        distributable (see LICENSE)
7 Group:          Applications/Networking
8 Source0:        http://www.psionic.com/downloads/%{name}-%{version}.tar.gz
9 # Source0-md5:  782839446b7eca554bb1880ef0882670
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 Patch0:         %{name}-logging-pld.patch
13 Patch1:         %{name}-ignore.csh.patch
14 URL:            http://www.psionic.com/products/
15 PreReq:         rc-scripts
16 PreReq:         /bin/awk
17 PreReq:         /bin/csh
18 PreReq:         iproute2
19 PreReq:         textutils
20 Requires(post,preun):   /sbin/chkconfig
21 Requires(post,preun):   fileutils
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _sysconfdir     /etc/portsentry
25
26 %description
27 PortSentry is part of the Abacus Project suite of tools. The Abacus
28 Project is an initiative to release low-maintenance, generic, and
29 reliable host based intrusion detection software to the Internet
30 community.
31
32 %description -l pl
33 PortSentry jest czê¶ci± zestawu narzêdzi Projektu Abacus. Projekt
34 Abacus ma na celu stworzenie ogólnego, pewnego i wymagaj±cego
35 niewielkiej obs³ugi oprogramowania do wykrywania prób skanowania
36 portów dla internetowej spo³eczno¶ci.
37
38 %prep
39 %setup  -q
40 %patch0 -p1
41 %patch1 -p1
42
43 %build
44 %{__sed} -i -e 's@\/etc\/hosts.deny@\/etc\/tcpd\/hosts.deny@' portsentry_config.h
45 %{__make} linux \
46         CFLAGS="%{rpmcflags} -Wall"
47
48 %install
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT{%{_bindir},/etc/{rc.d/init.d,sysconfig}}
51
52 %{__make} install \
53         INSTALLDIR=$RPM_BUILD_ROOT/etc
54
55 install ignore.csh $RPM_BUILD_ROOT%{_bindir}
56 install portsentry $RPM_BUILD_ROOT%{_bindir}
57
58 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/portsentry
59 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/portsentry
60
61 touch $RPM_BUILD_ROOT%{_sysconfdir}/{portsentry.blocked.{audp,atcp,stcp,sudp,tcp,udp},portsentry.history}
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %post
67 %{_bindir}/ignore.csh
68 /sbin/chkconfig --add portsentry
69 ls --color=none /var/lock/subsys/portsentry* >/dev/null 2>&1
70 if [ $? -eq "0" ]; then
71         /etc/rc.d/init.d/portsentry restart >&2
72 else
73         echo "Run \"/etc/rc.d/init.d/portsentry start\" to start portsentry daemon."
74 fi
75
76 %preun
77 if [ "$1" = "0" ]; then
78         ls --color=none /var/lock/subsys/portsentry* >/dev/null 2>&1
79         if [ $? -eq "0" ]; then
80                 /etc/rc.d/init.d/portsentry stop >&2
81         fi
82         /sbin/chkconfig --del portsentry
83 fi
84
85 %files
86 %defattr(644,root,root,755)
87 %doc README* CHANGES CREDITS LICENSE
88 %attr(750,root,root) %dir %{_sysconfdir}
89 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/portsentry.conf
90 %attr(640,root,root) %config(noreplace,missingok) %verify(not md5 size mtime) %{_sysconfdir}/portsentry.ignore
91 %attr(640,root,root) %ghost %{_sysconfdir}/portsentry.history
92 %attr(640,root,root) %ghost %{_sysconfdir}/portsentry.blocked*
93 %attr(640,root,root) %config %verify(not md5 size mtime) /etc/sysconfig/*
94 %attr(754,root,root) /etc/rc.d/init.d/*
95 %attr(755,root,root) %{_bindir}/*
This page took 0.084871 seconds and 3 git commands to generate.