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.freenet.de/pub/ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
14 Source0: ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
15 # Source0-md5: a68074d9ebdeb355c293d9b3645b3c2c
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}-ldap.patch
23 Patch2: %{name}-ldap1.patch
24 URL: http://www.isc.org/sw/dhcp/
26 %{?with_ldap:BuildRequires: openldap-devel}
27 PreReq: rc-scripts >= 0.2.0
28 Requires(post,preun): /sbin/chkconfig
29 Requires(post): fileutils
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
35 individual devices on an IP network to get their own network
36 configuration information (IP address, subnetmask, broadcast address,
37 etc.) from a DHCP server. The overall purpose of DHCP is to make it
38 easier to administer a large network.
41 DHCP permite que hosts en una red TCP/IP soliciten y tengan sus
42 direcciones IP alocadas dinámicamente, permite también descubrir
43 información sobre la red en que están conectados. BOOTP provee una
44 funcionalidad similar, con ciertas restricciones. Este servidor
45 también las atiende. Esta versión aún está considerada como un
49 Serwer DHCP (Dynamic Host Configuration Protocol).
51 DHCP to protokó³ pozwalaj±cy urz±dzeniom pracuj±cym w sieci IP na
52 pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu
53 rozg³oszeniowego itp.) z serwera DHCP. U³atwia on administrowanie
57 DHCP permite que hosts numa rede TCP/IP requisitem e tenham seus
58 endereços IP alocados dinamicamente, permite também descobrir
59 informações sobre a rede em que estão conectados. BOOTP provê uma
60 funcionalidade similar, com certas restrições. Este servidor também
61 atende aquelas requisições. Esta versão é ainda considerada um
66 Summary(pl): Klient DHCP
67 Group: Networking/Daemons
68 Requires(post): fileutils
72 Dynamic Host Configuration Protocol Client.
74 %description client -l pl
75 Klient DHCP (Dynamic Host Configuration Protocol).
78 Summary: DHCP Relay Agent
79 Summary(pl): Agent przekazywania informacji DHCP
80 Group: Networking/Daemons
81 PreReq: rc-scripts >= 0.2.0
82 Requires(post,preun): /sbin/chkconfig
83 Requires(post): fileutils
86 Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
87 with DHCP clients to "relay" their requests to a subnet that has a
88 DHCP server on it. Because DHCP packets can be broadcast, they will
89 not be routed off of the local subnet. The DHCP relay takes care of
92 %description relay -l pl
93 Agent przekazywania DHCP (Dynamic Host Configuration Protocol) miêdzy
94 podsieciami. Poniewa¿ komunikaty DHCP mog± byæ przekazywane w formie
95 rozg³oszeniowej, bez tego agenta nie zostan± przerutowane do innej
99 Summary: DHCP development includes and libs
100 Summary(pl): Pliki nag³ówkowe i biblioteki dla oprogramowania DHCP
101 Group: Development/Libraries
104 Includes OMAPI and dhcptl libraries.
106 OMAPI is an programming layer designed for controlling remote
107 applications, and for querying them for their state. It is currently
108 used by the ISC DHCP server.
110 The dhcpctl set of functions provide an API that can be used to
111 communicate with and manipulate a running ISC DHCP server.
113 %description devel -l pl
114 Zawiera biblioteki OMAPI oraz dhcpctl.
116 OMAPI to warstwa programowa stworzona do kontroli zdalnych aplikacji i
117 odpytywania o ich stan. Aktualnie jest u¿ywana przez serwer ISC DHCP.
119 dhcpctl to zbiór funkcji tworz±cych API, które mo¿e byæ u¿ywane do
120 komunikacji z dzia³aj±cym serwerem ISC DHCP i jego kontroli.
126 %{?with_ldap:%patch1 -p1}
127 %{?with_ldap:%patch2 -p1}
130 echo "dhcpd complies with the following RFCs:" > rfc-compliance
131 ls rfc*.txt >> rfc-compliance
136 # Notice: this is not autoconf configure!!!!!!!
137 # do not change it to %%configure
140 %{__make} COPTS="%{rpmcflags} \
141 -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
142 -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\"" \
143 DEBUG="" VARDB="/var/lib/%{name}"
146 rm -rf $RPM_BUILD_ROOT
147 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_bindir},%{_mandir}/man{5,8}} \
148 $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
151 DESTDIR=$RPM_BUILD_ROOT \
155 INCDIR=%{_includedir} \
156 ADMMANDIR=%{_mandir}/man8 \
158 FFMANDIR=%{_mandir}/man5 \
159 LIBMANDIR=%{_mandir}/man3 \
161 USRMANDIR=%{_mandir}/man1 \
163 VARDB=/var/lib/%{name} \
166 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
167 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
168 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
169 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
171 mv $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3 \
172 $RPM_BUILD_ROOT%{_mandir}/man1/omshell.1
174 install client/scripts/linux $RPM_BUILD_ROOT%{_sbindir}/dhclient-script
176 touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
179 rm -rf $RPM_BUILD_ROOT
182 /sbin/chkconfig --add dhcpd
183 touch /var/lib/%{name}/dhcpd.leases
185 if [ ! -d /var/lib/dhcp ]; then
186 install -d /var/lib/dhcp
189 if [ -f /var/lock/subsys/dhcpd ]; then
190 /etc/rc.d/init.d/dhcpd restart >&2
192 echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
196 if [ "$1" = "0" ];then
197 if [ -f /var/lock/subsys/dhcpd ]; then
198 /etc/rc.d/init.d/dhcpd stop >&2
200 /sbin/chkconfig --del dhcpd
204 if [ -d /var/lib/dhcp ]; then
205 install -d /var/lib/dhcp
209 /sbin/chkconfig --add dhcp-relay
210 if [ -f /var/lock/subsys/dhcrelay ]; then
211 mv -f /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
213 if [ -f /var/lock/subsys/dhcp-relay ]; then
214 /etc/rc.d/init.d/dhcp-relay restart >&2
216 echo "Run \"/etc/rc.d/init.d/dhcp-relay start\" to start dhcrelay daemon."
220 if [ "$1" = "0" ];then
221 if [ -f /var/lock/subsys/dhcp-relay ]; then
222 /etc/rc.d/init.d/dhcp-relay stop >&2
224 /sbin/chkconfig --del dhcp-relay
227 %triggerpostun -- dhcp < 3.0
228 if [ `grep ddns-update-style /etc/dhcpd.conf` = "" ]; then
230 echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
231 echo "" >> /etc/dhcpd.conf.tmp
232 cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp
233 mv -f /etc/dhcpd.conf.tmp /etc/dhcpd.conf
237 %defattr(644,root,root,755)
238 %doc doc/* README RELNOTES dhcpd.conf.sample
239 %{?with_ldap:%doc contrib/*}
241 %{_mandir}/man5/dhcp*
242 %{_mandir}/man8/dhcp*
243 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
244 %attr(755,root,root) %{_bindir}/*
245 %attr(755,root,root) %{_sbindir}/dhcpd
246 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
247 %attr(750,root,root) %dir /var/lib/%{name}
248 %ghost /var/lib/%{name}/dhcpd.leases
251 %defattr(644,root,root,755)
252 %attr(755,root,root) /sbin/dhclient
253 %attr(755,root,root) /sbin/dhclient-script
254 %{_mandir}/man[58]/dhclient*
255 %ghost /var/lib/%{name}/dhclient.leases
258 %defattr(644,root,root,755)
259 %{_mandir}/man8/dhcrelay*
260 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
261 %attr(755,root,root) %{_sbindir}/dhcrelay
262 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
265 %defattr(644,root,root,755)