]> git.pld-linux.org Git - packages/dhcp.git/blame - dhcp.spec
- updated
[packages/dhcp.git] / dhcp.spec
CommitLineData
fa424e73
JB
1#
2# Conditional build:
967af251 3%bcond_without ldap # without support for ldap storage
fa424e73 4#
8dc004f7 5Summary: DHCP Server
6e8d2260
ER
6Summary(es.UTF-8): Servidor DHCP
7Summary(pl.UTF-8): Serwer DHCP
8Summary(pt_BR.UTF-8): Servidor DHCP (Protocolo de configuração dinâmica de hosts)
cd3ce1e4 9Name: dhcp
6e6494f3
AM
10Version: 4.0.0
11# don't put int release until all patches are updated/ported(!)
12Release: 0.1
9598ee90 13Epoch: 4
6acbb058 14License: MIT
cd3ce1e4 15Group: Networking/Daemons
cab047e0 16Source0: ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
6e6494f3 17# Source0-md5: 31d79b27ce4a94089a0b9ce7f72307fa
a4dfcb55 18Source1: %{name}.init
6e6494f3
AM
19Source2: %{name}6.init
20Source3: %{name}-relay.init
21Source4: %{name}.sysconfig
22Source5: %{name}-relay.sysconfig
23Source6: %{name}-libdhcp4client.pc
24Source7: %{name}-dhcp4client.h
25Source8: %{name}-libdhcp4client.make
26Source9: %{name}-libdhcp_control.h
eda193cb
JR
27Patch0: %{name}-dhclient.script.patch
28Patch1: %{name}-if_buffer_size.patch
5bf1b3cd 29# http://home.ntelos.net/~masneyb/dhcp-3.0.5-ldap-patch
eda193cb 30Patch2: %{name}-ldap.patch
5bf1b3cd
JR
31Patch3: %{name}-client-script-redhat.patch
32Patch4: %{name}-3.0.3-x-option.patch
33Patch5: %{name}-typo.patch
34Patch6: %{name}-arg-concat.patch
35Patch7: %{name}-split-VARDB.patch
01b31b42 36Patch8: %{name}-timeouts.patch
8cf9160b 37Patch9: %{name}-options.patch
01b31b42 38Patch10: %{name}-libdhcp4client.patch
8cf9160b 39Patch11: %{name}-prototypes.patch
5ea0fa25 40URL: http://www.isc.org/sw/dhcp/
bca716bd 41BuildRequires: groff
01b31b42 42%{?with_ldap:BuildRequires: openldap-devel}
5bf1b3cd 43%{?with_ldap:BuildRequires: openssl-devel}
967af251
JR
44BuildRequires: rpmbuild(macros) >= 1.304
45Requires(post): coreutils
ac30bae3
ER
46Requires(post,preun): /sbin/chkconfig
47Requires: rc-scripts >= 0.2.0
73612d9c 48Provides: dhcpd
bf74a63f 49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
cd3ce1e4 50
6e6494f3 51%define _sbindir /sbin
967af251
JR
52%define schemadir /usr/share/openldap/schema
53
cd3ce1e4 54%description
0770f14a 55DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
37bec083 56individual devices on an IP network to get their own network
57configuration information (IP address, subnetmask, broadcast address,
58etc.) from a DHCP server. The overall purpose of DHCP is to make it
59easier to administer a large network.
0770f14a 60
39cd54ba 61%description -l es.UTF-8
1f522308 62DHCP permite que hosts en una red TCP/IP soliciten y tengan sus
39cd54ba
JR
63direcciones IP alocadas dinámicamente, permite también descubrir
64información sobre la red en que están conectados. BOOTP provee una
1f522308 65funcionalidad similar, con ciertas restricciones. Este servidor
39cd54ba 66también las atiende.
1f522308 67
39cd54ba 68%description -l pl.UTF-8
b7cc5fa2 69Serwer DHCP (Dynamic Host Configuration Protocol).
cd3ce1e4 70
39cd54ba 71DHCP to protokół pozwalający urządzeniom pracującym w sieci IP na
cd42af6b 72pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu
39cd54ba
JR
73rozgłoszeniowego itp.) z serwera DHCP. Ułatwia on administrowanie
74dużymi sieciami IP.
cd42af6b 75
39cd54ba 76%description -l pt_BR.UTF-8
1f522308 77DHCP permite que hosts numa rede TCP/IP requisitem e tenham seus
39cd54ba
JR
78endereços IP alocados dinamicamente, permite também descobrir
79informações sobre a rede em que estão conectados. BOOTP provê uma
80funcionalidade similar, com certas restrições. Este servidor também
81atende aquelas requisições. Esta versão é ainda considerada um
1f522308 82software BETA.
83
b62eae95 84%package -n openldap-schema-dhcp
967af251
JR
85Summary: LDAP Schema for DHCP Server
86Summary(pl.UTF-8): Schemat LDAP dla serwera DHCP
87Group: Networking/Daemons
88Requires(post,postun): sed >= 4.0
89Requires: openldap-servers
90
b62eae95 91%description -n openldap-schema-dhcp
967af251
JR
92This package contains LDAPv3 schema for use with the DHCP Server.
93
b62eae95 94%description -n openldap-schema-dhcp -l pl.UTF-8
967af251
JR
95Ten pakiet zawiera schemat LDAPv3 do używania z serwerem DHCP.
96
3bb4bab9 97%package client
98Summary: DHCP Client
6e8d2260 99Summary(pl.UTF-8): Klient DHCP
3bb4bab9 100Group: Networking/Daemons
eda193cb
JR
101Requires: coreutils
102Requires: iproute2
103Requires: net-tools
dd3090a5 104Obsoletes: dhclient
3bb4bab9 105
106%description client
0770f14a 107Dynamic Host Configuration Protocol Client.
3bb4bab9 108
39cd54ba 109%description client -l pl.UTF-8
0770f14a 110Klient DHCP (Dynamic Host Configuration Protocol).
3bb4bab9 111
45ef0575 112%package relay
113Summary: DHCP Relay Agent
6e8d2260 114Summary(pl.UTF-8): Agent przekazywania informacji DHCP
45ef0575 115Group: Networking/Daemons
967af251 116Requires(post): coreutils
ac30bae3
ER
117Requires(post,preun): /sbin/chkconfig
118Requires: rc-scripts >= 0.2.0
45ef0575 119
120%description relay
a4dfcb55 121Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
122with DHCP clients to "relay" their requests to a subnet that has a
123DHCP server on it. Because DHCP packets can be broadcast, they will
124not be routed off of the local subnet. The DHCP relay takes care of
125this for the client.
126
39cd54ba
JR
127%description relay -l pl.UTF-8
128Agent przekazywania DHCP (Dynamic Host Configuration Protocol) między
129podsieciami. Ponieważ komunikaty DHCP mogą być przekazywane w formie
130rozgłoszeniowej, bez tego agenta nie zostaną przerutowane do innej
cd42af6b 131podsieci.
45ef0575 132
1d526f5b
JK
133%package devel
134Summary: DHCP development includes and libs
6e8d2260 135Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki dla oprogramowania DHCP
1d526f5b
JK
136Group: Development/Libraries
137
138%description devel
139Includes OMAPI and dhcptl libraries.
140
141OMAPI is an programming layer designed for controlling remote
142applications, and for querying them for their state. It is currently
143used by the ISC DHCP server.
144
145The dhcpctl set of functions provide an API that can be used to
146communicate with and manipulate a running ISC DHCP server.
147
39cd54ba 148%description devel -l pl.UTF-8
1d526f5b
JK
149Zawiera biblioteki OMAPI oraz dhcpctl.
150
151OMAPI to warstwa programowa stworzona do kontroli zdalnych aplikacji i
39cd54ba 152odpytywania o ich stan. Aktualnie jest używana przez serwer ISC DHCP.
1d526f5b 153
39cd54ba
JR
154dhcpctl to zbiór funkcji tworzących API, które może być używane do
155komunikacji z działającym serwerem ISC DHCP i jego kontroli.
1d526f5b 156
c494ae74
PZ
157%package -n libdhcp4client
158Summary: The DHCP client in a library for invocation by other programs
159Summary(pl.UTF-8): Klient DHCP w postaci biblioteki do wykorzystania w innych programach
160Group: Development/Libraries
161
162%description -n libdhcp4client
163Provides the client for the DHCP protocol.
164
165%description -n libdhcp4client -l pl.UTF-8
166Ten pakiet zawiera klienta protokołu DHCP.
167
168%package -n libdhcp4client-devel
169Summary: Header files for development with the DHCP client library
170Summary(pl.UTF-8): Pliki nagłówkowe do programowania z użyciem biblioteki klienckiej DHCP
171Group: Development/Libraries
6acbb058 172License: GPL v2+
c494ae74
PZ
173Requires: libdhcp4client = %{epoch}:%{version}-%{release}
174
175%description -n libdhcp4client-devel
176Header files for development with the DHCP client library.
177
178%description -n libdhcp4client-devel -l pl.UTF-8
179Pliki nagłówkowe do programowania z użyciem biblioteki klienckiej DHCP.
180
181%package -n libdhcp4client-static
182Summary: Static DHCP client library
183Summary(pl.UTF-8): Statyczna biblioteka kliencka DHCP
184Group: Development/Libraries
185Requires: libdhcp4client-devel = %{epoch}:%{version}-%{release}
186
187%description -n libdhcp4client-static
188Static DHCP client library.
189
190%description -n libdhcp4client-static -l pl.UTF-8
191Statyczna biblioteka kliencka DHCP.
192
cd3ce1e4 193%prep
cab047e0 194%setup -q
6e6494f3
AM
195# CHECK ME
196#%patch0 -p1
197# CHECK ME
198#%patch1 -p1
199# FIXME
5deae13f 200%{?with_ldap:%patch2 -p1}
eda193cb 201# These two patches are required for dhcdbd to function
5bf1b3cd 202%patch3 -p1
6e6494f3
AM
203# CHECK ME
204#%patch4 -p1
eda193cb 205#
6e6494f3
AM
206# CHECK ME
207#%patch5 -p1
74b36fbe 208%patch6 -p1
6e6494f3
AM
209# CHECK ME
210#%patch7 -p1
c494ae74 211%patch8 -p1
6e6494f3
AM
212# CHECK ME
213#%patch9 -p1
214#%patch10 -p1
8cf9160b 215%patch11 -p1
c494ae74
PZ
216
217sed 's/@DHCP_VERSION@/'%{version}'/' < %{SOURCE5} > libdhcp4client.pc
218mkdir -p libdhcp4client
6e6494f3
AM
219cp %{SOURCE7} libdhcp4client/dhcp4client.h
220cp %{SOURCE8} libdhcp4client/Makefile.dist
221cp %{SOURCE9} includes/isc-dhcp/libdhcp_control.h
4b8d2654 222
0770f14a 223%build
6e6494f3
AM
224%configure \
225 --enable-dhcpv6 \
226 --with-srv-lease-file="/var/lib/%{name}/dhcpd.leases" \
227 --with-cli-lease-file="/var/lib/dhclient/dhclient.leases"
228%{__make}
cd3ce1e4 229
230%install
231rm -rf $RPM_BUILD_ROOT
6e6494f3 232install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{schemadir},%{_pkgconfigdir},/var/lib/{%{name},dhclient}}
cd3ce1e4 233
771aee8c 234%{__make} install \
6e6494f3 235 DESTDIR=$RPM_BUILD_ROOT
967af251 236
cd3ce1e4 237install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
6e6494f3
AM
238install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd6
239install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
240install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
241install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
cd3ce1e4 242
967af251
JR
243install server/dhcpd.conf $RPM_BUILD_ROOT%{_sysconfdir}
244%if %{with ldap}
245install contrib/dhcp.schema $RPM_BUILD_ROOT%{schemadir}
246%endif
1d526f5b 247
967af251 248touch $RPM_BUILD_ROOT%{_sysconfdir}/dhclient.conf
9da55644 249
b0caeee3
JR
250touch $RPM_BUILD_ROOT/var/lib/%{name}/dhcpd.leases
251touch $RPM_BUILD_ROOT/var/lib/dhclient/dhclient.leases
3bb4bab9 252
c494ae74
PZ
253install libdhcp4client.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libdhcp4client.pc
254
82fbb222
JB
255%clean
256rm -rf $RPM_BUILD_ROOT
257
cd3ce1e4 258%post
3a01d42c 259/sbin/chkconfig --add dhcpd
6e6494f3 260/sbin/chkconfig --add dhcpd6
d6a3364d 261touch /var/lib/%{name}/dhcpd.leases
30c45ada 262%service dhcpd restart "dhcpd daemon"
6e6494f3 263%service dhcpd6 restart "dhcpd IPv6 daemon"
cd3ce1e4 264
208108e2
JB
265%preun
266if [ "$1" = "0" ];then
30c45ada 267 %service dhcpd stop
6e6494f3 268 %service dhcpd6 stop
208108e2 269 /sbin/chkconfig --del dhcpd
6e6494f3 270 /sbin/chkconfig --del dhcpd6
208108e2
JB
271fi
272
6acbb058
JB
273%triggerpostun -- dhcp < 3.0
274if [ "`grep ddns-update-style /etc/dhcpd.conf`" = "" ]; then
275 umask 027
276 echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
277 echo "" >> /etc/dhcpd.conf.tmp
278 cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp
279 mv -f /etc/dhcpd.conf.tmp /etc/dhcpd.conf
280fi
281
b62eae95 282%post -n openldap-schema-dhcp
967af251
JR
283%openldap_schema_register %{schemadir}/dhcp.schema -d core
284%service -q ldap restart
285
b62eae95 286%postun -n openldap-schema-dhcp
967af251
JR
287if [ "$1" = "0" ]; then
288 %openldap_schema_unregister %{schemadir}/dhcp.schema
289 %service -q ldap restart
290fi
291
208108e2 292%post client
b0caeee3
JR
293if [ -f /var/lib/dhcp/dhclient.leases.rpmsave ]; then
294 mv /var/lib/dhcp/dhclient.leases.rpmsave /var/lib/dhclient/dhclient.leases
208108e2
JB
295fi
296
7940deed 297%post relay
3a01d42c 298/sbin/chkconfig --add dhcp-relay
3a01d42c 299if [ -f /var/lock/subsys/dhcrelay ]; then
30c45ada 300 mv -f /var/lock/subsys/{dhcrelay,dhcp-relay}
3a01d42c 301fi
30c45ada 302%service dhcp-relay restart "dhcrelay daemon"
7940deed 303
7940deed 304%preun relay
3a01d42c 305if [ "$1" = "0" ];then
30c45ada 306 %service dhcp-relay stop
3a01d42c 307 /sbin/chkconfig --del dhcp-relay
308fi
7940deed 309
6acbb058
JB
310%post -n libdhcp4client -p /sbin/ldconfig
311%postun -n libdhcp4client -p /sbin/ldconfig
b7f7d94b 312
cd3ce1e4 313%files
314%defattr(644,root,root,755)
6acbb058 315%doc doc/* README RELNOTES server/dhcpd.conf LICENSE contrib/ms2isc
967af251 316%{?with_ldap:%doc README.ldap Changelog-LDAP contrib/dhcpd-conf-to-ldap.pl}
ac30bae3
ER
317%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcpd
318%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd.conf
967af251 319%attr(755,root,root) %{_bindir}/omshell
cd3ce1e4 320%attr(755,root,root) %{_sbindir}/dhcpd
d3d402da 321%attr(754,root,root) /etc/rc.d/init.d/dhcpd
6e6494f3 322%attr(754,root,root) /etc/rc.d/init.d/dhcpd6
d6a3364d
JR
323%attr(750,root,root) %dir /var/lib/%{name}
324%ghost /var/lib/%{name}/dhcpd.leases
6acbb058
JB
325%{_mandir}/man1/omshell.1*
326%{_mandir}/man5/dhcp-eval.5*
327%{_mandir}/man5/dhcp-options.5*
328%{_mandir}/man5/dhcpd.conf.5*
329%{_mandir}/man5/dhcpd.leases.5*
330%{_mandir}/man8/dhcpd.8*
3bb4bab9 331
967af251 332%if %{with ldap}
b62eae95 333%files -n openldap-schema-dhcp
967af251
JR
334%defattr(644,root,root,755)
335%doc contrib/dhcpd-conf-to-ldap.pl
6acbb058 336%{schemadir}/dhcp.schema
967af251
JR
337%endif
338
3bb4bab9 339%files client
ccf64540 340%defattr(644,root,root,755)
967af251
JR
341%doc contrib/sethostname.sh
342%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhclient.conf
3bb4bab9 343%attr(755,root,root) /sbin/dhclient
6e6494f3 344#%attr(755,root,root) /sbin/dhclient-script
6acbb058
JB
345%{_mandir}/man5/dhclient.conf.5*
346%{_mandir}/man5/dhclient.leases.5*
347%{_mandir}/man8/dhclient.8*
348%{_mandir}/man8/dhclient-script.8*
b0caeee3
JR
349%attr(750,root,root) %dir /var/lib/dhclient
350%ghost /var/lib/dhclient/dhclient.leases
45ef0575 351
352%files relay
353%defattr(644,root,root,755)
ac30bae3 354%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcp-relay
45ef0575 355%attr(755,root,root) %{_sbindir}/dhcrelay
3ac86cff 356%attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
6acbb058 357%{_mandir}/man8/dhcrelay.8*
1d526f5b
JK
358
359%files devel
360%defattr(644,root,root,755)
6acbb058 361%{_libdir}/libdhcpctl.a
6e6494f3 362%{_libdir}/libdst.a
6acbb058 363%{_libdir}/libomapi.a
6e6494f3 364%{_includedir}/dhcpctl
6acbb058
JB
365%{_includedir}/isc-dhcp
366%{_includedir}/omapip
367%{_mandir}/man3/dhcpctl.3*
368%{_mandir}/man3/omapi.3*
c494ae74 369
6e6494f3
AM
370#%files -n libdhcp4client
371#%defattr(644,root,root,755)
372#%attr(755,root,root) %{_libdir}/libdhcp4client-%{version}.so.0
c494ae74 373
6e6494f3
AM
374#%files -n libdhcp4client-devel
375#%defattr(644,root,root,755)
376#%attr(755,root,root) %{_libdir}/libdhcp4client.so
377#%{_includedir}/dhcp4client
378#%{_pkgconfigdir}/libdhcp4client.pc
c494ae74 379
6e6494f3
AM
380#%files -n libdhcp4client-static
381#%defattr(644,root,root,755)
382#%{_libdir}/libdhcp4client.a
This page took 0.105812 seconds and 4 git commands to generate.