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