1 %bcond_with ldap # added support for ldap storage
3 Summary(es): Servidor DHCP (Protocolo de configuración dinámica de hosts)
4 Summary(pl): Serwer DHCP
5 Summary(pt_BR): Servidor DHCP (Protocolo de configuração dinâmica de hosts)
11 License: distributable
12 Group: Networking/Daemons
13 # Source0: ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
14 Source0: ftp://ftp.freenet.de/pub/ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
15 # Source0-md5: 68624d95b91aefa72a000a29e5e82408
17 Source2: %{name}-relay.init
18 Source3: %{name}-relay.sysconfig
19 Source4: %{name}d.conf.sample
20 Source5: %{name}.sysconfig
21 Patch0: %{name}-if_buffer_size.patch
22 Patch1: %{name}-%{version}-ldap-patch
23 Patch2: %{name}-%{version}-ldap1.patch
25 %{?with_ldap:BuildRequires: openldap-devel}
26 PreReq: rc-scripts >= 0.2.0
27 Requires(post,preun): /sbin/chkconfig
28 Requires(post): fileutils
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
34 individual devices on an IP network to get their own network
35 configuration information (IP address, subnetmask, broadcast address,
36 etc.) from a DHCP server. The overall purpose of DHCP is to make it
37 easier to administer a large network.
40 DHCP permite que hosts en una red TCP/IP soliciten y tengan sus
41 direcciones IP alocadas dinámicamente, permite también descubrir
42 información sobre la red en que están conectados. BOOTP provee una
43 funcionalidad similar, con ciertas restricciones. Este servidor
44 también las atiende. Esta versión aún está considerada como un
48 Serwer DHCP (Dynamic Host Configuration Protocol).
50 DHCP to protokó³ pozwalaj±cy urz±dzeniom pracuj±cym w sieci IP na
51 pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu
52 rozg³oszeniowego itp.) z serwera DHCP. U³atwia on administrowanie
56 DHCP permite que hosts numa rede TCP/IP requisitem e tenham seus
57 endereços IP alocados dinamicamente, permite também descobrir
58 informações sobre a rede em que estão conectados. BOOTP provê uma
59 funcionalidade similar, com certas restrições. Este servidor também
60 atende aquelas requisições. Esta versão é ainda considerada um
65 Summary(pl): Klient DHCP
66 Group: Networking/Daemons
67 Requires(post): fileutils
71 Dynamic Host Configuration Protocol Client.
73 %description client -l pl
74 Klient DHCP (Dynamic Host Configuration Protocol).
77 Summary: DHCP Relay Agent
78 Summary(pl): Agent przekazywania informacji DHCP
79 Group: Networking/Daemons
80 PreReq: rc-scripts >= 0.2.0
81 Requires(post,preun): /sbin/chkconfig
82 Requires(post): fileutils
85 Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
86 with DHCP clients to "relay" their requests to a subnet that has a
87 DHCP server on it. Because DHCP packets can be broadcast, they will
88 not be routed off of the local subnet. The DHCP relay takes care of
91 %description relay -l pl
92 Agent przekazywania DHCP (Dynamic Host Configuration Protocol) miêdzy
93 podsieciami. Poniewa¿ komunikaty DHCP mog± byæ przekazywane w formie
94 rozg³oszeniowej, bez tego agenta nie zostan± przerutowane do innej
98 Summary: DHCP development includes and libs
99 Summary(pl): Pliki nag³ówkowe i biblioteki dla oprogramowania DHCP
100 Group: Development/Libraries
103 Includes OMAPI and dhcptl libraries.
105 OMAPI is an programming layer designed for controlling remote
106 applications, and for querying them for their state. It is currently
107 used by the ISC DHCP server.
109 The dhcpctl set of functions provide an API that can be used to
110 communicate with and manipulate a running ISC DHCP server.
112 %description devel -l pl
113 Zawiera biblioteki OMAPI oraz dhcpctl.
115 OMAPI to warstwa programowa stworzona do kontroli zdalnych aplikacji i
116 odpytywania o ich stan. Aktualnie jest u¿ywana przez serwer ISC DHCP.
118 dhcpctl to zbiór funkcji tworz±cych API, które mo¿e byæ u¿ywane do
119 komunikacji z dzia³aj±cym serwerem ISC DHCP i jego kontroli.
125 %{?with_ldap:%patch1 -p1}
126 %{?with_ldap:%patch2 -p1}
129 echo "dhcpd complies with the following RFCs:" > rfc-compliance
130 ls rfc*.txt >> rfc-compliance
135 # Notice: this is not autoconf configure!!!!!!!
136 # do not change it to %%configure
139 %{__make} COPTS="%{rpmcflags} \
140 -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
141 -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\"" \
142 DEBUG="" VARDB="/var/lib/%{name}"
145 rm -rf $RPM_BUILD_ROOT
146 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_bindir},%{_mandir}/man{5,8}} \
147 $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
150 DESTDIR=$RPM_BUILD_ROOT \
154 INCDIR=%{_includedir} \
155 ADMMANDIR=%{_mandir}/man8 \
157 FFMANDIR=%{_mandir}/man5 \
158 LIBMANDIR=%{_mandir}/man3 \
160 USRMANDIR=%{_mandir}/man1 \
162 VARDB=/var/lib/%{name} \
165 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
166 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
167 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
168 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
170 mv $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3 \
171 $RPM_BUILD_ROOT%{_mandir}/man1/omshell.1
173 install client/scripts/linux $RPM_BUILD_ROOT%{_sbindir}/dhclient-script
175 touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
178 rm -rf $RPM_BUILD_ROOT
181 /sbin/chkconfig --add dhcpd
182 touch /var/lib/%{name}/dhcpd.leases
184 if [ ! -d /var/lib/dhcp ]; then
185 install -d /var/lib/dhcp
188 if [ -f /var/lock/subsys/dhcpd ]; then
189 /etc/rc.d/init.d/dhcpd restart >&2
191 echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
195 if [ "$1" = "0" ];then
196 if [ -f /var/lock/subsys/dhcpd ]; then
197 /etc/rc.d/init.d/dhcpd stop >&2
199 /sbin/chkconfig --del dhcpd
203 if [ -d /var/lib/dhcp ]; then
204 install -d /var/lib/dhcp
208 /sbin/chkconfig --add dhcp-relay
209 if [ -f /var/lock/subsys/dhcrelay ]; then
210 mv -f /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
212 if [ -f /var/lock/subsys/dhcp-relay ]; then
213 /etc/rc.d/init.d/dhcp-relay restart >&2
215 echo "Run \"/etc/rc.d/init.d/dhcp-relay start\" to start dhcrelay daemon."
219 if [ "$1" = "0" ];then
220 if [ -f /var/lock/subsys/dhcp-relay ]; then
221 /etc/rc.d/init.d/dhcp-relay stop >&2
223 /sbin/chkconfig --del dhcp-relay
226 %triggerpostun -- dhcp < 3.0
227 if [ `grep ddns-update-style /etc/dhcpd.conf` = "" ]; then
229 echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
230 echo "" >> /etc/dhcpd.conf.tmp
231 cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp
232 mv -f /etc/dhcpd.conf.tmp /etc/dhcpd.conf
236 %defattr(644,root,root,755)
237 %doc doc/* README RELNOTES dhcpd.conf.sample
238 %{?with_ldap:%doc contrib/*}
240 %{_mandir}/man5/dhcp*
241 %{_mandir}/man8/dhcp*
242 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
243 %attr(755,root,root) %{_bindir}/*
244 %attr(755,root,root) %{_sbindir}/dhcpd
245 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
246 %attr(750,root,root) %dir /var/lib/%{name}
247 %ghost /var/lib/%{name}/dhcpd.leases
250 %defattr(644,root,root,755)
251 %attr(755,root,root) /sbin/dhclient
252 %attr(755,root,root) /sbin/dhclient-script
253 %{_mandir}/man[58]/dhclient*
254 %ghost /var/lib/%{name}/dhclient.leases
257 %defattr(644,root,root,755)
258 %{_mandir}/man8/dhcrelay*
259 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
260 %attr(755,root,root) %{_sbindir}/dhcrelay
261 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
264 %defattr(644,root,root,755)