]> git.pld-linux.org Git - packages/p0f.git/blob - p0f.spec
- updated to 3.09b
[packages/p0f.git] / p0f.spec
1 Summary:        Passive OS fingerprinting tool
2 Summary(pl.UTF-8):      Narzędzie do pasywnej daktyloskopii systemów operacyjnych
3 Name:           p0f
4 Version:        3.09b
5 Release:        1
6 License:        LGPL v2.1
7 Group:          Networking/Utilities
8 # Official releases:
9 Source0:        http://lcamtuf.coredump.cx/p0f3/releases/%{name}-%{version}.tgz
10 # Source0-md5:  bc863233dc2b440cae6ef5665cae34bb
11 # Devel:
12 #Source0:       http://lcamtuf.coredump.cx/p0f/%{name}-devel.tgz
13 Source1:        %{name}.init
14 Source2:        %{name}.sysconfig
15 Source3:        %{name}.logrotate
16 URL:            http://lcamtuf.coredump.cx/p0f3/
17 BuildRequires:  libpcap-devel
18 BuildRequires:  rpmbuild(macros) >= 1.268
19 Requires(post): fileutils
20 Requires(post,preun):   /sbin/chkconfig
21 Requires(postun):       /usr/sbin/groupdel
22 Requires(postun):       /usr/sbin/userdel
23 Requires(pre):  /bin/id
24 Requires(pre):  /usr/bin/getgid
25 Requires(pre):  /usr/sbin/groupadd
26 Requires(pre):  /usr/sbin/useradd
27 Requires:       rc-scripts
28 Provides:       group(p0f)
29 Provides:       user(p0f)
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 p0f performs passive OS fingerprinting technique based on information
34 coming from remote host when it establishes connection to our system.
35 Captured packets contains enough information to determine OS - and,
36 unlike active scanners (nmap, queSO) - it is done without sending
37 anything to this host.
38
39 %description -l pl.UTF-8
40 p0f przeprowadza pasywną daktyloskopię systemu operacyjnego bazując na
41 informacjach, które wysyła zdalny system kiedy ustanawia połączenie z
42 naszym. Wyłapane pakiety zawierają wystarczająco dużo informacji by
43 określić system operacyjny - i, w przeciwieństwie do aktywnych
44 skanerów (nmap, queSO) - jest to robione bez wysyłania czegokolwiek do
45 tego hosta.
46
47 %prep
48 %setup -q
49
50 %build
51 %{__make} \
52         CC="%{__cc}" \
53         CFLAGS="%{rpmcflags} -DFP_FILE=\"/usr/share/p0f/p0f.fp\"" \
54         LDFLAGS="%{rpmldflags}"
55
56 %{__make} -C tools \
57         CC="%{__cc}" \
58         CFLAGS="%{rpmcflags}" \
59         LDFLAGS="%{rpmldflags}"
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,/etc/logrotate.d,%{_sbindir},%{_datadir}/p0f}
64 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/p0f
65 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/p0f
66 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/p0f
67 install p0f tools/p0f-{client,sendsyn,sendsyn6} $RPM_BUILD_ROOT%{_sbindir}
68 install p0f.fp $RPM_BUILD_ROOT%{_datadir}/p0f
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %pre
74 %groupadd -g 164 p0f
75 %useradd -u 164 -c "p0f user" -g p0f p0f
76
77 %post
78 if [ ! -f /var/log/p0f ]; then
79         touch /var/log/p0f
80         chown root:root /var/log/p0f
81         chmod 600 /var/log/p0f
82 fi
83 /sbin/chkconfig --add p0f
84 %service p0f restart "p0f daemon"
85
86 %preun
87 if [ "$1" = "0" ]; then
88         %service p0f stop
89         /sbin/chkconfig --del p0f
90 fi
91
92 %postun
93 if [ "$1" = "0" ]; then
94         %userremove p0f
95         %groupremove p0f
96 fi
97
98 %files
99 %defattr(644,root,root,755)
100 %doc docs/{ChangeLog,existential-notes.txt,extra-sigs.txt,README,TODO} tools/README-TOOLS
101 %attr(754,root,root) /etc/rc.d/init.d/p0f
102 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/p0f
103 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/p0f
104 %attr(755,root,root) %{_sbindir}/p0f*
105 %{_datadir}/p0f
This page took 0.084173 seconds and 3 git commands to generate.