2 Summary(pl): Serwer DHCP
7 Group: Networking/Daemons
8 Group(pl): Sieciowe/Serwery
9 Copyright: distributable
11 Source0: ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
13 Source2: dhcp-relay.init
14 Source3: dhcp-relay.sysconfig
15 Source4: dhcpd.conf.sample
16 Source5: dhcp.sysconfig
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 Prereq: /sbin/chkconfig
20 Requires: rc-scripts >= 0.2.0
23 DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
24 individual devices on an IP network to get their own network configuration
25 information (IP address, subnetmask, broadcast address, etc.) from a DHCP
26 server. The overall purpose of DHCP is to make it easier to administer a
30 Serwer DHCP (Dynamic Host Configuration Protocol).
34 Summary(pl): Klient DHCP
35 Group: Networking/Daemons
36 Group(de): Sieciowe/Serwery
40 Dynamic Host Configuration Protocol Client.
42 %description -l pl client
43 Klient DHCP (Dynamic Host Configuration Protocol).
46 Summary: DHCP Relay Agent
47 Summary(pl): Agent przekazywania informacji DHCP
48 Group: Networking/Daemons
49 Group(de): Sieciowe/Serwery
50 Requires: rc-scripts >= 0.2.0
53 Dynamic Host Configuration Protocol Relay Agent.
55 %description -l pl relay
56 Agent przekazywania DHCP (Dynamic Host Configuration Protocol) miêdzy
65 LDFLAGS="-s" ; export LDFLAGS
68 make COPTS="$RPM_OPT_FLAGS -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
69 -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\"" \
70 DEBUG="" VARDB="/var/lib/%{name}"
73 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_mandir}/man{5,8}} \
76 $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
79 CLIENTBINDIR=$RPM_BUILD_ROOT/sbin \
80 BINDIR=$RPM_BUILD_ROOT%{_sbindir} \
81 ADMMANDIR=$RPM_BUILD_ROOT%{_mandir}/man8 \
83 FFMANDIR=$RPM_BUILD_ROOT%{_mandir}/man5 \
86 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
87 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
88 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
89 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
91 install client/scripts/linux $RPM_BUILD_ROOT%{_sysconfdir}/dhclient-script
93 gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
96 touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
99 /sbin/chkconfig --add dhcpd
100 touch /var/lib/%{name}/dhcpd.leases
102 if [ ! -d /var/lib/dhcp ]; then
103 install -d /var/lib/dhcp
106 if [ -f /var/lock/subsys/dhcpd ]; then
107 /etc/rc.d/init.d/dhcpd restart >&2
109 echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
113 /sbin/chkconfig --add dhcrelay
115 if [ -f /var/lock/subsys/dhcrelay ]; then
116 /etc/rc.d/init.d/dhcrelay restart >&2
118 echo "Run \"/etc/rc.d/init.d/dhcrelay start\" to start dhcrelay daemon."
122 if [ -d /var/lib/dhcp ]; then
123 install -d /var/lib/dhcp
127 if [ "$1" = "0" ];then
128 if [ -f /var/lock/subsys/dhcpd ]; then
129 /etc/rc.d/init.d/dhcpd stop >&2
131 /sbin/chkconfig --del dhcpd
135 if [ "$1" = "0" ];then
136 if [ -f /var/lock/subsys/dhcrelay ]; then
137 /etc/rc.d/init.d/dhrelay stop >&2
139 /sbin/chkconfig --del dhcrelay
143 rm -rf $RPM_BUILD_ROOT
146 %defattr(644,root,root,755)
147 %doc doc/* README.gz RELNOTES.gz dhcpd.conf.sample
148 %{_mandir}/man5/dhcp*
149 %{_mandir}/man8/dhcp*
150 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
151 %attr(755,root,root) %{_sbindir}/dhcpd
152 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
153 %attr(750,root,root) %dir /var/lib/%{name}
154 %ghost /var/lib/%{name}/dhcpd.leases
157 %defattr(644,root,root,755)
158 %attr(755,root,root) /sbin/dhclient
159 %attr(755,root,root) %{_sysconfdir}/dhclient-script
160 %{_mandir}/man[58]/dhclient*
161 %ghost /var/lib/%{name}/dhclient.leases
164 %defattr(644,root,root,755)
165 %{_mandir}/man8/dhcrelay*
166 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
167 %attr(755,root,root) %{_sbindir}/dhcrelay
168 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay