]> git.pld-linux.org Git - packages/dhcp_probe.git/blob - dhcp_probe.spec
- guignard-04_linux_32_or_64bits patch replaced by simple change to match Linux kerne...
[packages/dhcp_probe.git] / dhcp_probe.spec
1 Summary:        Tool for discovering DHCP and BootP servers
2 Summary(pl.UTF-8):      Narzędzie do znajdowania serwerów DHCP i BootP
3 Name:           dhcp_probe
4 Version:        1.3.0
5 Release:        3
6 License:        GPL v2+ and MIT
7 Group:          Applications/Networking
8 Source0:        https://www.net.princeton.edu/software/dhcp_probe/%{name}-%{version}.tar.gz
9 # Source0-md5:  8067e696fbd88120bdcc2ffef4b64da2
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 Source3:        dhcp_probe.target
13 Source4:        dhcp_probe@.service
14 Source5:        dhcp_probe-service-generator
15 Patch0:         dhcp_probe-guignard-03_implicit_point_conv_bootp.c.patch
16 Patch1:         dhcp_probe-guignard-04_linux_32_or_64bits.patch
17 Patch2:         dhcp_probe-virta-01-pcap-loop.patch
18 Patch3:         dhcp_probe-virta-02-keep-pcap.patch
19 Patch4:         dhcp_probe-virta-03-drop-privs.patch
20 URL:            https://www.net.princeton.edu/software/dhcp_probe/
21 BuildRequires:  libnet-devel >= 1:1.1.6
22 BuildRequires:  libpcap-devel
23 BuildRequires:  rpmbuild(macros) >= 1.647
24 Requires(post,preun):   /sbin/chkconfig
25 Requires(post,preun,postun):    systemd-units >= 38
26 Requires:       rc-scripts
27 Requires:       systemd-units >= 38
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 dchp_probe attempts to discover DHCP and BootP servers on
32 a directly-attached Ethernet network. A network administrator can use
33 this tool to locate unauthorized DHCP and BootP servers. 
34
35 %description -l pl.UTF-8
36 dhcp_probe próbuje wykryć serwery DHCP i BootP w bezpośrednio
37 podłączonej sieci Ethernet. Narzędzie jest przydatne dla
38 administratorów sieci do lokalizowania nieautoryzowanych serwerów DHCP
39 oraz BootP.
40
41 %prep
42 %setup -q
43 %patch0 -p0
44 %patch1 -p0
45 %patch2 -p0
46 %patch3 -p0
47 %patch4 -p0
48 cp -a extras/README README.extras
49
50 %build
51 %configure
52 %{__make}
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{systemdunitdir}} \
57         $RPM_BUILD_ROOT/lib/systemd/system-generators
58
59 %{__make} install \
60         DESTDIR=$RPM_BUILD_ROOT
61
62 install -p extras/dhcp_probe.cf.sample $RPM_BUILD_ROOT%{_sysconfdir}/dhcp_probe.cf
63 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp_probe
64 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dhcp_probe
65 install -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/dhcp_probe.target
66 install -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/dhcp_probe@.service
67 ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/dhcp_probe.service
68 install -p %{SOURCE5} $RPM_BUILD_ROOT/lib/systemd/system-generators/dhcp_probe-service-generator
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %post
74 /sbin/chkconfig --add %{name}
75 %service %{name} restart
76 %systemd_post %{name}.target
77
78 %preun
79 if [ "$1" = "0" ]; then
80         %service -q %{name} stop
81         /sbin/chkconfig --del %{name}
82 fi
83 %systemd_preun %{name}.target
84
85 %postun
86 %systemd_reload
87
88 %files
89 %defattr(644,root,root,755)
90 %doc AUTHORS COPYING ChangeLog INSTALL.dhcp_probe NEWS README* TODO extras/{dhcp_probe_notify*,mail-throttled}
91 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcp_probe.cf
92 %attr(755,root,root) %{_sbindir}/dhcp_probe
93 %attr(754,root,root) /etc/rc.d/init.d/dhcp_probe
94 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcp_probe
95 %attr(755,root,root) /lib/systemd/system-generators/dhcp_probe-service-generator
96 %{systemdunitdir}/dhcp_probe.service
97 %{systemdunitdir}/dhcp_probe.target
98 %{systemdunitdir}/dhcp_probe@.service
99 %{_mandir}/man5/dhcp_probe.cf.5*
100 %{_mandir}/man8/dhcp_probe.8*
This page took 0.070197 seconds and 4 git commands to generate.