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