]> git.pld-linux.org Git - packages/dhcp.git/blame - dhcp.spec
- don't obsolete pump
[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
5bf1b3cd
JR
10%define _pre a3
11Version: 3.1.0
12Release: 0.%{_pre}.1
9598ee90 13Epoch: 4
aa104090 14License: distributable
cd3ce1e4 15Group: Networking/Daemons
5bf1b3cd 16Source0: ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}%{_pre}.tar.gz
0ed97b59 17# Source0-md5: d09be1a80982b78482e8fbd416924468
a4dfcb55 18Source1: %{name}.init
19Source2: %{name}-relay.init
967af251
JR
20Source3: %{name}.sysconfig
21Source4: %{name}-relay.sysconfig
eda193cb
JR
22Patch0: %{name}-dhclient.script.patch
23Patch1: %{name}-if_buffer_size.patch
5bf1b3cd 24# http://home.ntelos.net/~masneyb/dhcp-3.0.5-ldap-patch
eda193cb 25Patch2: %{name}-ldap.patch
5bf1b3cd
JR
26Patch3: %{name}-client-script-redhat.patch
27Patch4: %{name}-3.0.3-x-option.patch
28Patch5: %{name}-typo.patch
29Patch6: %{name}-arg-concat.patch
30Patch7: %{name}-split-VARDB.patch
5ea0fa25 31URL: http://www.isc.org/sw/dhcp/
bca716bd 32BuildRequires: groff
5deae13f 33%{?with_ldap:BuildRequires: openldap-devel}
5bf1b3cd 34%{?with_ldap:BuildRequires: openssl-devel}
967af251
JR
35BuildRequires: rpmbuild(macros) >= 1.304
36Requires(post): coreutils
ac30bae3
ER
37Requires(post,preun): /sbin/chkconfig
38Requires: rc-scripts >= 0.2.0
73612d9c 39Provides: dhcpd
bf74a63f 40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
cd3ce1e4 41
967af251
JR
42%define schemadir /usr/share/openldap/schema
43
cd3ce1e4 44%description
0770f14a 45DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
37bec083 46individual devices on an IP network to get their own network
47configuration information (IP address, subnetmask, broadcast address,
48etc.) from a DHCP server. The overall purpose of DHCP is to make it
49easier to administer a large network.
0770f14a 50
39cd54ba 51%description -l es.UTF-8
1f522308 52DHCP permite que hosts en una red TCP/IP soliciten y tengan sus
39cd54ba
JR
53direcciones IP alocadas dinámicamente, permite también descubrir
54información sobre la red en que están conectados. BOOTP provee una
1f522308 55funcionalidad similar, con ciertas restricciones. Este servidor
39cd54ba 56también las atiende.
1f522308 57
39cd54ba 58%description -l pl.UTF-8
b7cc5fa2 59Serwer DHCP (Dynamic Host Configuration Protocol).
cd3ce1e4 60
39cd54ba 61DHCP to protokół pozwalający urządzeniom pracującym w sieci IP na
cd42af6b 62pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu
39cd54ba
JR
63rozgłoszeniowego itp.) z serwera DHCP. Ułatwia on administrowanie
64dużymi sieciami IP.
cd42af6b 65
39cd54ba 66%description -l pt_BR.UTF-8
1f522308 67DHCP permite que hosts numa rede TCP/IP requisitem e tenham seus
39cd54ba
JR
68endereços IP alocados dinamicamente, permite também descobrir
69informações sobre a rede em que estão conectados. BOOTP provê uma
70funcionalidade similar, com certas restrições. Este servidor também
71atende aquelas requisições. Esta versão é ainda considerada um
1f522308 72software BETA.
73
967af251
JR
74%package ldap-schema
75Summary: LDAP Schema for DHCP Server
76Summary(pl.UTF-8): Schemat LDAP dla serwera DHCP
77Group: Networking/Daemons
78Requires(post,postun): sed >= 4.0
79Requires: openldap-servers
80
81%description ldap-schema
82This package contains LDAPv3 schema for use with the DHCP Server.
83
84%description ldap-schema -l pl.UTF-8
85Ten pakiet zawiera schemat LDAPv3 do używania z serwerem DHCP.
86
3bb4bab9 87%package client
88Summary: DHCP Client
6e8d2260 89Summary(pl.UTF-8): Klient DHCP
3bb4bab9 90Group: Networking/Daemons
eda193cb
JR
91Requires: coreutils
92Requires: iproute2
93Requires: net-tools
dd3090a5 94Obsoletes: dhclient
3bb4bab9 95
96%description client
0770f14a 97Dynamic Host Configuration Protocol Client.
3bb4bab9 98
39cd54ba 99%description client -l pl.UTF-8
0770f14a 100Klient DHCP (Dynamic Host Configuration Protocol).
3bb4bab9 101
45ef0575 102%package relay
103Summary: DHCP Relay Agent
6e8d2260 104Summary(pl.UTF-8): Agent przekazywania informacji DHCP
45ef0575 105Group: Networking/Daemons
967af251 106Requires(post): coreutils
ac30bae3
ER
107Requires(post,preun): /sbin/chkconfig
108Requires: rc-scripts >= 0.2.0
45ef0575 109
110%description relay
a4dfcb55 111Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
112with DHCP clients to "relay" their requests to a subnet that has a
113DHCP server on it. Because DHCP packets can be broadcast, they will
114not be routed off of the local subnet. The DHCP relay takes care of
115this for the client.
116
39cd54ba
JR
117%description relay -l pl.UTF-8
118Agent przekazywania DHCP (Dynamic Host Configuration Protocol) między
119podsieciami. Ponieważ komunikaty DHCP mogą być przekazywane w formie
120rozgłoszeniowej, bez tego agenta nie zostaną przerutowane do innej
cd42af6b 121podsieci.
45ef0575 122
1d526f5b
JK
123%package devel
124Summary: DHCP development includes and libs
6e8d2260 125Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki dla oprogramowania DHCP
1d526f5b
JK
126Group: Development/Libraries
127
128%description devel
129Includes OMAPI and dhcptl libraries.
130
131OMAPI is an programming layer designed for controlling remote
132applications, and for querying them for their state. It is currently
133used by the ISC DHCP server.
134
135The dhcpctl set of functions provide an API that can be used to
136communicate with and manipulate a running ISC DHCP server.
137
39cd54ba 138%description devel -l pl.UTF-8
1d526f5b
JK
139Zawiera biblioteki OMAPI oraz dhcpctl.
140
141OMAPI to warstwa programowa stworzona do kontroli zdalnych aplikacji i
39cd54ba 142odpytywania o ich stan. Aktualnie jest używana przez serwer ISC DHCP.
1d526f5b 143
39cd54ba
JR
144dhcpctl to zbiór funkcji tworzących API, które może być używane do
145komunikacji z działającym serwerem ISC DHCP i jego kontroli.
1d526f5b 146
cd3ce1e4 147%prep
5bf1b3cd 148%setup -q -n %{name}-%{version}%{_pre}
5c01071a 149%patch0 -p1
eda193cb 150%patch1 -p1
5deae13f 151%{?with_ldap:%patch2 -p1}
eda193cb 152# These two patches are required for dhcdbd to function
5bf1b3cd 153%patch3 -p1
9598ee90 154%patch4 -p1
eda193cb 155#
5bf1b3cd 156%patch5 -p1
74b36fbe 157%patch6 -p1
b0caeee3 158%patch7 -p1
4b8d2654 159
0770f14a 160%build
c5dc12be 161# NOTE: this is not autoconf configure - do not change it to %%configure
ca2187eb 162./configure
cd3ce1e4 163
fa424e73 164%{__make} \
a63fcfce 165 CC="%{__cc}" \
0c23a828 166 CC_OPTIONS="%{rpmcflags} \
b955a7fa
ER
167 -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
168 -DEXTENDED_NEW_OPTION_INFO \
b0caeee3 169 -D_PATH_DHCLIENT_DB=\\\"/var/lib/dhclient/dhclient.leases\\\" \
b955a7fa 170 "
fdc24592 171 LFLAGS="%{rpmldflags}" \
172 DEBUG="" \
b0caeee3
JR
173 VARDBS="/var/lib/%{name}"
174 VARDBC="/var/lib/dhclient"
cd3ce1e4 175
176%install
177rm -rf $RPM_BUILD_ROOT
967af251 178install -d $RPM_BUILD_ROOT{%{_sysconfdir}/{rc.d/init.d,sysconfig},%{schemadir}}
cd3ce1e4 179
771aee8c 180%{__make} install \
5eb60a7e
PG
181 DESTDIR=$RPM_BUILD_ROOT \
182 CLIENTBINDIR=/sbin \
183 BINDIR=%{_sbindir} \
184 LIBDIR=%{_libdir} \
185 INCDIR=%{_includedir} \
186 ADMMANDIR=%{_mandir}/man8 \
cd3ce1e4 187 ADMMANEXT=.8 \
5eb60a7e
PG
188 FFMANDIR=%{_mandir}/man5 \
189 LIBMANDIR=%{_mandir}/man3 \
1d526f5b 190 LIBMANEXT=.3 \
5eb60a7e 191 USRMANDIR=%{_mandir}/man1 \
1d526f5b 192 USRMANEXT=.1 \
b0caeee3
JR
193 VARDBS=/var/lib/%{name} \
194 VARDBC=/var/lib/dhclient \
cd3ce1e4 195 FFMANEXT=.5
196
967af251
JR
197rm $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3*
198
cd3ce1e4 199install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
3ac86cff 200install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
967af251
JR
201install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
202install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
cd3ce1e4 203
967af251
JR
204install server/dhcpd.conf $RPM_BUILD_ROOT%{_sysconfdir}
205%if %{with ldap}
206install contrib/dhcp.schema $RPM_BUILD_ROOT%{schemadir}
207%endif
1d526f5b 208
967af251 209touch $RPM_BUILD_ROOT%{_sysconfdir}/dhclient.conf
9da55644 210
b0caeee3
JR
211touch $RPM_BUILD_ROOT/var/lib/%{name}/dhcpd.leases
212touch $RPM_BUILD_ROOT/var/lib/dhclient/dhclient.leases
3bb4bab9 213
82fbb222
JB
214%clean
215rm -rf $RPM_BUILD_ROOT
216
cd3ce1e4 217%post
3a01d42c 218/sbin/chkconfig --add dhcpd
d6a3364d 219touch /var/lib/%{name}/dhcpd.leases
30c45ada 220%service dhcpd restart "dhcpd daemon"
cd3ce1e4 221
208108e2
JB
222%preun
223if [ "$1" = "0" ];then
30c45ada 224 %service dhcpd stop
208108e2
JB
225 /sbin/chkconfig --del dhcpd
226fi
227
967af251
JR
228%post ldap-schema
229%openldap_schema_register %{schemadir}/dhcp.schema -d core
230%service -q ldap restart
231
232%postun ldap-schema
233if [ "$1" = "0" ]; then
234 %openldap_schema_unregister %{schemadir}/dhcp.schema
235 %service -q ldap restart
236fi
237
208108e2 238%post client
b0caeee3
JR
239if [ -f /var/lib/dhcp/dhclient.leases.rpmsave ]; then
240 mv /var/lib/dhcp/dhclient.leases.rpmsave /var/lib/dhclient/dhclient.leases
208108e2
JB
241fi
242
7940deed 243%post relay
3a01d42c 244/sbin/chkconfig --add dhcp-relay
3a01d42c 245if [ -f /var/lock/subsys/dhcrelay ]; then
30c45ada 246 mv -f /var/lock/subsys/{dhcrelay,dhcp-relay}
3a01d42c 247fi
30c45ada 248%service dhcp-relay restart "dhcrelay daemon"
7940deed 249
7940deed 250%preun relay
3a01d42c 251if [ "$1" = "0" ];then
30c45ada 252 %service dhcp-relay stop
3a01d42c 253 /sbin/chkconfig --del dhcp-relay
254fi
7940deed 255
b7f7d94b 256%triggerpostun -- dhcp < 3.0
30c45ada 257if [ "`grep ddns-update-style /etc/dhcpd.conf`" = "" ]; then
208108e2 258 umask 027
b7f7d94b 259 echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
260 echo "" >> /etc/dhcpd.conf.tmp
261 cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp
262 mv -f /etc/dhcpd.conf.tmp /etc/dhcpd.conf
263fi
264
cd3ce1e4 265%files
266%defattr(644,root,root,755)
967af251
JR
267%doc doc/* README RELNOTES server/dhcpd.conf LICENSE
268%doc contrib/ms2isc
269%{?with_ldap:%doc README.ldap Changelog-LDAP contrib/dhcpd-conf-to-ldap.pl}
1d526f5b 270%{_mandir}/man1/*
3bb4bab9 271%{_mandir}/man5/dhcp*
272%{_mandir}/man8/dhcp*
ac30bae3
ER
273%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcpd
274%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd.conf
967af251 275%attr(755,root,root) %{_bindir}/omshell
cd3ce1e4 276%attr(755,root,root) %{_sbindir}/dhcpd
d3d402da 277%attr(754,root,root) /etc/rc.d/init.d/dhcpd
d6a3364d
JR
278%attr(750,root,root) %dir /var/lib/%{name}
279%ghost /var/lib/%{name}/dhcpd.leases
3bb4bab9 280
967af251
JR
281%if %{with ldap}
282%files ldap-schema
283%defattr(644,root,root,755)
284%doc contrib/dhcpd-conf-to-ldap.pl
285%{schemadir}/*.schema
286%endif
287
3bb4bab9 288%files client
ccf64540 289%defattr(644,root,root,755)
967af251
JR
290%doc contrib/sethostname.sh
291%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhclient.conf
3bb4bab9 292%attr(755,root,root) /sbin/dhclient
f9cc1a26 293%attr(755,root,root) /sbin/dhclient-script
d3d402da 294%{_mandir}/man[58]/dhclient*
b0caeee3
JR
295%attr(750,root,root) %dir /var/lib/dhclient
296%ghost /var/lib/dhclient/dhclient.leases
45ef0575 297
298%files relay
299%defattr(644,root,root,755)
300%{_mandir}/man8/dhcrelay*
ac30bae3 301%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcp-relay
45ef0575 302%attr(755,root,root) %{_sbindir}/dhcrelay
3ac86cff 303%attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
1d526f5b
JK
304
305%files devel
306%defattr(644,root,root,755)
79686690 307%{_mandir}/man3/*
1d526f5b
JK
308%{_libdir}/*.a
309%{_includedir}/*
This page took 0.090149 seconds and 4 git commands to generate.