3 %bcond_with ldap # with support for ldap storage
7 Summary(es): Servidor DHCP
8 Summary(pl): Serwer DHCP
9 Summary(pt_BR): Servidor DHCP (Protocolo de configuração dinâmica de hosts)
15 License: distributable
16 Group: Networking/Daemons
17 Source0: ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}%{_rc}.tar.gz
18 # Source0-md5: 7c5dd4587d0236275ddf026750513131
20 Source2: %{name}-relay.init
21 Source3: %{name}-relay.sysconfig
22 Source4: %{name}d.conf.sample
23 Source5: %{name}.sysconfig
24 Patch0: %{name}-if_buffer_size.patch
25 Patch1: %{name}-ldap.patch
26 Patch2: %{name}-ldap1.patch
27 Patch3: %{name}-gcc343-fix.patch
28 URL: http://www.isc.org/sw/dhcp/
30 %{?with_ldap:BuildRequires: openldap-devel}
31 PreReq: rc-scripts >= 0.2.0
32 Requires(post,preun): /sbin/chkconfig
33 Requires(post): fileutils
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
39 individual devices on an IP network to get their own network
40 configuration information (IP address, subnetmask, broadcast address,
41 etc.) from a DHCP server. The overall purpose of DHCP is to make it
42 easier to administer a large network.
45 DHCP permite que hosts en una red TCP/IP soliciten y tengan sus
46 direcciones IP alocadas dinámicamente, permite también descubrir
47 información sobre la red en que están conectados. BOOTP provee una
48 funcionalidad similar, con ciertas restricciones. Este servidor
52 Serwer DHCP (Dynamic Host Configuration Protocol).
54 DHCP to protokó³ pozwalaj±cy urz±dzeniom pracuj±cym w sieci IP na
55 pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu
56 rozg³oszeniowego itp.) z serwera DHCP. U³atwia on administrowanie
60 DHCP permite que hosts numa rede TCP/IP requisitem e tenham seus
61 endereços IP alocados dinamicamente, permite também descobrir
62 informações sobre a rede em que estão conectados. BOOTP provê uma
63 funcionalidade similar, com certas restrições. Este servidor também
64 atende aquelas requisições. Esta versão é ainda considerada um
69 Summary(pl): Klient DHCP
70 Group: Networking/Daemons
71 Requires(post): fileutils
76 Dynamic Host Configuration Protocol Client.
78 %description client -l pl
79 Klient DHCP (Dynamic Host Configuration Protocol).
82 Summary: DHCP Relay Agent
83 Summary(pl): Agent przekazywania informacji DHCP
84 Group: Networking/Daemons
85 PreReq: rc-scripts >= 0.2.0
86 Requires(post,preun): /sbin/chkconfig
87 Requires(post): fileutils
90 Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
91 with DHCP clients to "relay" their requests to a subnet that has a
92 DHCP server on it. Because DHCP packets can be broadcast, they will
93 not be routed off of the local subnet. The DHCP relay takes care of
96 %description relay -l pl
97 Agent przekazywania DHCP (Dynamic Host Configuration Protocol) miêdzy
98 podsieciami. Poniewa¿ komunikaty DHCP mog± byæ przekazywane w formie
99 rozg³oszeniowej, bez tego agenta nie zostan± przerutowane do innej
103 Summary: DHCP development includes and libs
104 Summary(pl): Pliki nag³ówkowe i biblioteki dla oprogramowania DHCP
105 Group: Development/Libraries
108 Includes OMAPI and dhcptl libraries.
110 OMAPI is an programming layer designed for controlling remote
111 applications, and for querying them for their state. It is currently
112 used by the ISC DHCP server.
114 The dhcpctl set of functions provide an API that can be used to
115 communicate with and manipulate a running ISC DHCP server.
117 %description devel -l pl
118 Zawiera biblioteki OMAPI oraz dhcpctl.
120 OMAPI to warstwa programowa stworzona do kontroli zdalnych aplikacji i
121 odpytywania o ich stan. Aktualnie jest u¿ywana przez serwer ISC DHCP.
123 dhcpctl to zbiór funkcji tworz±cych API, które mo¿e byæ u¿ywane do
124 komunikacji z dzia³aj±cym serwerem ISC DHCP i jego kontroli.
127 %setup -q -n %{name}-%{version}%{_rc}
130 %{?with_ldap:%patch1 -p1}
131 %{?with_ldap:%patch2 -p1}
135 echo "dhcpd complies with the following RFCs:" > rfc-compliance
136 ls rfc*.txt >> rfc-compliance
141 # Notice: this is not autoconf configure!!!!!!!
142 # do not change it to %%configure
146 COPTS="%{rpmcflags} \
147 -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
148 -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\"" \
149 DEBUG="" VARDB="/var/lib/%{name}"
152 rm -rf $RPM_BUILD_ROOT
153 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_bindir},%{_mandir}/man{5,8}} \
154 $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
157 DESTDIR=$RPM_BUILD_ROOT \
161 INCDIR=%{_includedir} \
162 ADMMANDIR=%{_mandir}/man8 \
164 FFMANDIR=%{_mandir}/man5 \
165 LIBMANDIR=%{_mandir}/man3 \
167 USRMANDIR=%{_mandir}/man1 \
169 VARDB=/var/lib/%{name} \
172 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
173 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
174 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
175 install %{SOURCE4} $RPM_BUILD_ROOT/etc/dhcpd.conf
176 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
178 mv $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3 \
179 $RPM_BUILD_ROOT%{_mandir}/man1/omshell.1
181 install client/scripts/linux $RPM_BUILD_ROOT%{_sbindir}/dhclient-script
183 touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
186 rm -rf $RPM_BUILD_ROOT
189 /sbin/chkconfig --add dhcpd
190 touch /var/lib/%{name}/dhcpd.leases
192 if [ ! -d /var/lib/dhcp ]; then
193 install -d /var/lib/dhcp
196 if [ -f /var/lock/subsys/dhcpd ]; then
197 /etc/rc.d/init.d/dhcpd restart >&2
199 echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
203 if [ "$1" = "0" ];then
204 if [ -f /var/lock/subsys/dhcpd ]; then
205 /etc/rc.d/init.d/dhcpd stop >&2
207 /sbin/chkconfig --del dhcpd
211 if [ -d /var/lib/dhcp ]; then
212 install -d /var/lib/dhcp
216 /sbin/chkconfig --add dhcp-relay
217 if [ -f /var/lock/subsys/dhcrelay ]; then
218 mv -f /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
220 if [ -f /var/lock/subsys/dhcp-relay ]; then
221 /etc/rc.d/init.d/dhcp-relay restart >&2
223 echo "Run \"/etc/rc.d/init.d/dhcp-relay start\" to start dhcrelay daemon."
227 if [ "$1" = "0" ];then
228 if [ -f /var/lock/subsys/dhcp-relay ]; then
229 /etc/rc.d/init.d/dhcp-relay stop >&2
231 /sbin/chkconfig --del dhcp-relay
234 %triggerpostun -- dhcp < 3.0
235 if [ `grep ddns-update-style /etc/dhcpd.conf` = "" ]; then
237 echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
238 echo "" >> /etc/dhcpd.conf.tmp
239 cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp
240 mv -f /etc/dhcpd.conf.tmp /etc/dhcpd.conf
244 %defattr(644,root,root,755)
245 %doc doc/* README RELNOTES dhcpd.conf.sample
246 %{?with_ldap:%doc contrib/*}
248 %{_mandir}/man5/dhcp*
249 %{_mandir}/man8/dhcp*
250 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
251 %config(noreplace) %verify(not size mtime md5) /etc/dhcpd.conf
252 %attr(755,root,root) %{_bindir}/*
253 %attr(755,root,root) %{_sbindir}/dhcpd
254 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
255 %attr(750,root,root) %dir /var/lib/%{name}
256 %ghost /var/lib/%{name}/dhcpd.leases
259 %defattr(644,root,root,755)
260 %attr(755,root,root) /sbin/dhclient
261 %attr(755,root,root) /sbin/dhclient-script
262 %{_mandir}/man[58]/dhclient*
263 %ghost /var/lib/%{name}/dhclient.leases
266 %defattr(644,root,root,755)
267 %{_mandir}/man8/dhcrelay*
268 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
269 %attr(755,root,root) %{_sbindir}/dhcrelay
270 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
273 %defattr(644,root,root,755)