3 %bcond_with ldap # with support for ldap storage
6 Summary(es): Servidor DHCP (Protocolo de configuración dinámica de hosts)
7 Summary(pl): Serwer DHCP
8 Summary(pt_BR): Servidor DHCP (Protocolo de configuração dinâmica de hosts)
14 License: distributable
15 Group: Networking/Daemons
16 Source0: ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
17 # Source0-md5: 44f72d16a12acc3fbe09703157aa42d2
19 Source2: %{name}-relay.init
20 Source3: %{name}-relay.sysconfig
21 Source4: %{name}d.conf.sample
22 Source5: %{name}.sysconfig
23 Patch0: %{name}-if_buffer_size.patch
24 Patch1: %{name}-ldap.patch
25 Patch2: %{name}-ldap1.patch
26 URL: http://www.isc.org/sw/dhcp/
28 %{?with_ldap:BuildRequires: openldap-devel}
29 PreReq: rc-scripts >= 0.2.0
30 Requires(post,preun): /sbin/chkconfig
31 Requires(post): fileutils
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
37 individual devices on an IP network to get their own network
38 configuration information (IP address, subnetmask, broadcast address,
39 etc.) from a DHCP server. The overall purpose of DHCP is to make it
40 easier to administer a large network.
43 DHCP permite que hosts en una red TCP/IP soliciten y tengan sus
44 direcciones IP alocadas dinámicamente, permite también descubrir
45 información sobre la red en que están conectados. BOOTP provee una
46 funcionalidad similar, con ciertas restricciones. Este servidor
47 también las atiende. Esta versión aún está considerada como un
51 Serwer DHCP (Dynamic Host Configuration Protocol).
53 DHCP to protokó³ pozwalaj±cy urz±dzeniom pracuj±cym w sieci IP na
54 pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu
55 rozg³oszeniowego itp.) z serwera DHCP. U³atwia on administrowanie
59 DHCP permite que hosts numa rede TCP/IP requisitem e tenham seus
60 endereços IP alocados dinamicamente, permite também descobrir
61 informações sobre a rede em que estão conectados. BOOTP provê uma
62 funcionalidade similar, com certas restrições. Este servidor também
63 atende aquelas requisições. Esta versão é ainda considerada um
68 Summary(pl): Klient DHCP
69 Group: Networking/Daemons
70 Requires(post): fileutils
74 Dynamic Host Configuration Protocol Client.
76 %description client -l pl
77 Klient DHCP (Dynamic Host Configuration Protocol).
80 Summary: DHCP Relay Agent
81 Summary(pl): Agent przekazywania informacji DHCP
82 Group: Networking/Daemons
83 PreReq: rc-scripts >= 0.2.0
84 Requires(post,preun): /sbin/chkconfig
85 Requires(post): fileutils
88 Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
89 with DHCP clients to "relay" their requests to a subnet that has a
90 DHCP server on it. Because DHCP packets can be broadcast, they will
91 not be routed off of the local subnet. The DHCP relay takes care of
94 %description relay -l pl
95 Agent przekazywania DHCP (Dynamic Host Configuration Protocol) miêdzy
96 podsieciami. Poniewa¿ komunikaty DHCP mog± byæ przekazywane w formie
97 rozg³oszeniowej, bez tego agenta nie zostan± przerutowane do innej
101 Summary: DHCP development includes and libs
102 Summary(pl): Pliki nag³ówkowe i biblioteki dla oprogramowania DHCP
103 Group: Development/Libraries
106 Includes OMAPI and dhcptl libraries.
108 OMAPI is an programming layer designed for controlling remote
109 applications, and for querying them for their state. It is currently
110 used by the ISC DHCP server.
112 The dhcpctl set of functions provide an API that can be used to
113 communicate with and manipulate a running ISC DHCP server.
115 %description devel -l pl
116 Zawiera biblioteki OMAPI oraz dhcpctl.
118 OMAPI to warstwa programowa stworzona do kontroli zdalnych aplikacji i
119 odpytywania o ich stan. Aktualnie jest u¿ywana przez serwer ISC DHCP.
121 dhcpctl to zbiór funkcji tworz±cych API, które mo¿e byæ u¿ywane do
122 komunikacji z dzia³aj±cym serwerem ISC DHCP i jego kontroli.
128 %{?with_ldap:%patch1 -p1}
129 %{?with_ldap:%patch2 -p1}
132 echo "dhcpd complies with the following RFCs:" > rfc-compliance
133 ls rfc*.txt >> rfc-compliance
138 # Notice: this is not autoconf configure!!!!!!!
139 # do not change it to %%configure
143 COPTS="%{rpmcflags} \
144 -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
145 -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\"" \
146 DEBUG="" VARDB="/var/lib/%{name}"
149 rm -rf $RPM_BUILD_ROOT
150 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_bindir},%{_mandir}/man{5,8}} \
151 $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
154 DESTDIR=$RPM_BUILD_ROOT \
158 INCDIR=%{_includedir} \
159 ADMMANDIR=%{_mandir}/man8 \
161 FFMANDIR=%{_mandir}/man5 \
162 LIBMANDIR=%{_mandir}/man3 \
164 USRMANDIR=%{_mandir}/man1 \
166 VARDB=/var/lib/%{name} \
169 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
170 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
171 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
172 install %{SOURCE4} $RPM_BUILD_ROOT/etc/dhcpd.conf
173 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
175 mv $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3 \
176 $RPM_BUILD_ROOT%{_mandir}/man1/omshell.1
178 install client/scripts/linux $RPM_BUILD_ROOT%{_sbindir}/dhclient-script
180 touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
183 rm -rf $RPM_BUILD_ROOT
186 /sbin/chkconfig --add dhcpd
187 touch /var/lib/%{name}/dhcpd.leases
189 if [ ! -d /var/lib/dhcp ]; then
190 install -d /var/lib/dhcp
193 if [ -f /var/lock/subsys/dhcpd ]; then
194 /etc/rc.d/init.d/dhcpd restart >&2
196 echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
200 if [ "$1" = "0" ];then
201 if [ -f /var/lock/subsys/dhcpd ]; then
202 /etc/rc.d/init.d/dhcpd stop >&2
204 /sbin/chkconfig --del dhcpd
208 if [ -d /var/lib/dhcp ]; then
209 install -d /var/lib/dhcp
213 /sbin/chkconfig --add dhcp-relay
214 if [ -f /var/lock/subsys/dhcrelay ]; then
215 mv -f /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
217 if [ -f /var/lock/subsys/dhcp-relay ]; then
218 /etc/rc.d/init.d/dhcp-relay restart >&2
220 echo "Run \"/etc/rc.d/init.d/dhcp-relay start\" to start dhcrelay daemon."
224 if [ "$1" = "0" ];then
225 if [ -f /var/lock/subsys/dhcp-relay ]; then
226 /etc/rc.d/init.d/dhcp-relay stop >&2
228 /sbin/chkconfig --del dhcp-relay
231 %triggerpostun -- dhcp < 3.0
232 if [ `grep ddns-update-style /etc/dhcpd.conf` = "" ]; then
234 echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
235 echo "" >> /etc/dhcpd.conf.tmp
236 cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp
237 mv -f /etc/dhcpd.conf.tmp /etc/dhcpd.conf
241 %defattr(644,root,root,755)
242 %doc doc/* README RELNOTES dhcpd.conf.sample
243 %{?with_ldap:%doc contrib/*}
245 %{_mandir}/man5/dhcp*
246 %{_mandir}/man8/dhcp*
247 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
248 %config(noreplace) %verify(not size mtime md5) /etc/dhcpd.conf
249 %attr(755,root,root) %{_bindir}/*
250 %attr(755,root,root) %{_sbindir}/dhcpd
251 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
252 %attr(750,root,root) %dir /var/lib/%{name}
253 %ghost /var/lib/%{name}/dhcpd.leases
256 %defattr(644,root,root,755)
257 %attr(755,root,root) /sbin/dhclient
258 %attr(755,root,root) /sbin/dhclient-script
259 %{_mandir}/man[58]/dhclient*
260 %ghost /var/lib/%{name}/dhclient.leases
263 %defattr(644,root,root,755)
264 %{_mandir}/man8/dhcrelay*
265 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
266 %attr(755,root,root) %{_sbindir}/dhcrelay
267 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
270 %defattr(644,root,root,755)