3 %bcond_with ldap # with support for ldap storage
6 Summary(es): Servidor DHCP
7 Summary(pl): Serwer DHCP
8 Summary(pt_BR): Servidor DHCP (Protocolo de configuração dinâmica de hosts)
13 License: distributable
14 Group: Networking/Daemons
15 Source0: ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
16 # Source0-md5: 004ef935fd54b8046b16bdde31a9e151
18 Source2: %{name}-relay.init
19 Source3: %{name}-relay.sysconfig
20 Source4: %{name}d.conf.sample
21 Source5: %{name}.sysconfig
22 Patch0: %{name}-if_buffer_size.patch
23 Patch1: %{name}-ldap.patch
24 Patch2: %{name}-ldap1.patch
25 Patch3: %{name}-client-script-redhat.patch
26 Patch4: %{name}-dhcpd_lease_time.patch
27 Patch5: %{name}-3.0.3-x-option.patch
28 URL: http://www.isc.org/sw/dhcp/
30 %{?with_ldap:BuildRequires: openldap-devel}
31 BuildRequires: rpmbuild(macros) >= 1.268
32 Requires(post): fileutils
33 Requires(post,preun): /sbin/chkconfig
34 Requires: rc-scripts >= 0.2.0
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
40 individual devices on an IP network to get their own network
41 configuration information (IP address, subnetmask, broadcast address,
42 etc.) from a DHCP server. The overall purpose of DHCP is to make it
43 easier to administer a large network.
46 DHCP permite que hosts en una red TCP/IP soliciten y tengan sus
47 direcciones IP alocadas dinámicamente, permite también descubrir
48 información sobre la red en que están conectados. BOOTP provee una
49 funcionalidad similar, con ciertas restricciones. Este servidor
53 Serwer DHCP (Dynamic Host Configuration Protocol).
55 DHCP to protokó³ pozwalaj±cy urz±dzeniom pracuj±cym w sieci IP na
56 pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu
57 rozg³oszeniowego itp.) z serwera DHCP. U³atwia on administrowanie
61 DHCP permite que hosts numa rede TCP/IP requisitem e tenham seus
62 endereços IP alocados dinamicamente, permite também descobrir
63 informações sobre a rede em que estão conectados. BOOTP provê uma
64 funcionalidade similar, com certas restrições. Este servidor também
65 atende aquelas requisições. Esta versão é ainda considerada um
70 Summary(pl): Klient DHCP
71 Group: Networking/Daemons
72 Requires(post): fileutils
77 Dynamic Host Configuration Protocol Client.
79 %description client -l pl
80 Klient DHCP (Dynamic Host Configuration Protocol).
83 Summary: DHCP Relay Agent
84 Summary(pl): Agent przekazywania informacji DHCP
85 Group: Networking/Daemons
86 Requires(post): fileutils
87 Requires(post,preun): /sbin/chkconfig
88 Requires: rc-scripts >= 0.2.0
91 Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
92 with DHCP clients to "relay" their requests to a subnet that has a
93 DHCP server on it. Because DHCP packets can be broadcast, they will
94 not be routed off of the local subnet. The DHCP relay takes care of
97 %description relay -l pl
98 Agent przekazywania DHCP (Dynamic Host Configuration Protocol) miêdzy
99 podsieciami. Poniewa¿ komunikaty DHCP mog± byæ przekazywane w formie
100 rozg³oszeniowej, bez tego agenta nie zostan± przerutowane do innej
104 Summary: DHCP development includes and libs
105 Summary(pl): Pliki nag³ówkowe i biblioteki dla oprogramowania DHCP
106 Group: Development/Libraries
109 Includes OMAPI and dhcptl libraries.
111 OMAPI is an programming layer designed for controlling remote
112 applications, and for querying them for their state. It is currently
113 used by the ISC DHCP server.
115 The dhcpctl set of functions provide an API that can be used to
116 communicate with and manipulate a running ISC DHCP server.
118 %description devel -l pl
119 Zawiera biblioteki OMAPI oraz dhcpctl.
121 OMAPI to warstwa programowa stworzona do kontroli zdalnych aplikacji i
122 odpytywania o ich stan. Aktualnie jest u¿ywana przez serwer ISC DHCP.
124 dhcpctl to zbiór funkcji tworz±cych API, które mo¿e byæ u¿ywane do
125 komunikacji z dzia³aj±cym serwerem ISC DHCP i jego kontroli.
131 %{?with_ldap:%patch1 -p1}
132 %{?with_ldap:%patch2 -p1}
138 echo "dhcpd complies with the following RFCs:" > rfc-compliance
139 ls rfc*.txt >> rfc-compliance
144 # Notice: this is not autoconf configure!!!!!!!
145 # do not change it to %%configure
150 CC_OPTIONS="%{rpmcflags} \
151 -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
152 -DEXTENDED_NEW_OPTION_INFO \
153 -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\" " \
154 LFLAGS="%{rpmldflags}" \
156 VARDB="/var/lib/%{name}"
159 rm -rf $RPM_BUILD_ROOT
160 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_bindir},%{_mandir}/man{5,8}} \
161 $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
164 DESTDIR=$RPM_BUILD_ROOT \
168 INCDIR=%{_includedir} \
169 ADMMANDIR=%{_mandir}/man8 \
171 FFMANDIR=%{_mandir}/man5 \
172 LIBMANDIR=%{_mandir}/man3 \
174 USRMANDIR=%{_mandir}/man1 \
176 VARDB=/var/lib/%{name} \
179 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
180 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
181 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
182 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/dhcpd.conf
183 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
185 mv $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3 \
186 $RPM_BUILD_ROOT%{_mandir}/man1/omshell.1
188 install client/scripts/linux $RPM_BUILD_ROOT%{_sbindir}/dhclient-script
190 touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
193 rm -rf $RPM_BUILD_ROOT
196 /sbin/chkconfig --add dhcpd
197 touch /var/lib/%{name}/dhcpd.leases
198 if [ ! -d /var/lib/dhcp ]; then
199 install -d /var/lib/dhcp
201 %service dhcpd restart "dhcpd daemon"
204 if [ "$1" = "0" ];then
206 /sbin/chkconfig --del dhcpd
210 if [ ! -d /var/lib/dhcp ]; then
211 install -d /var/lib/dhcp
215 /sbin/chkconfig --add dhcp-relay
216 if [ -f /var/lock/subsys/dhcrelay ]; then
217 mv -f /var/lock/subsys/{dhcrelay,dhcp-relay}
219 %service dhcp-relay restart "dhcrelay daemon"
222 if [ "$1" = "0" ];then
223 %service dhcp-relay stop
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 README RELNOTES dhcpd.conf.sample
239 %doc doc/{IANA-arp-parameters,api+protocol,draft-ietf-dhc-authentication-14.txt,draft-ietf-dhc-dhcp-dns-12.txt,draft-ietf-dhc-failover-07.txt,rfc-compliance}
240 %lang(ja) %doc doc/ja_JP.eucJP
241 %{?with_ldap:%doc contrib/*}
243 %{_mandir}/man5/dhcp*
244 %{_mandir}/man8/dhcp*
245 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcpd
246 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd.conf
247 %attr(755,root,root) %{_bindir}/*
248 %attr(755,root,root) %{_sbindir}/dhcpd
249 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
250 %attr(750,root,root) %dir /var/lib/%{name}
251 %ghost /var/lib/%{name}/dhcpd.leases
254 %defattr(644,root,root,755)
255 %attr(755,root,root) /sbin/dhclient
256 %attr(755,root,root) /sbin/dhclient-script
257 %{_mandir}/man[58]/dhclient*
258 %ghost /var/lib/%{name}/dhclient.leases
261 %defattr(644,root,root,755)
262 %{_mandir}/man8/dhcrelay*
263 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcp-relay
264 %attr(755,root,root) %{_sbindir}/dhcrelay
265 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
268 %defattr(644,root,root,755)