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