]> git.pld-linux.org Git - packages/dhcp.git/blob - dhcp.spec
- converted to UTF-8
[packages/dhcp.git] / dhcp.spec
1 #
2 # Conditional build:
3 %bcond_with     ldap    # with support for ldap storage
4 #
5 Summary:        DHCP Server
6 Summary(es.UTF-8):   Servidor DHCP
7 Summary(pl.UTF-8):   Serwer DHCP
8 Summary(pt_BR.UTF-8):   Servidor DHCP (Protocolo de configuração dinâmica de hosts)
9 Name:           dhcp
10 Version:        3.1.0a3
11 Release:        0.1
12 Epoch:          4
13 License:        distributable
14 Group:          Networking/Daemons
15 Source0:        ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
16 # Source0-md5:  d09be1a80982b78482e8fbd416924468
17 Source1:        %{name}.init
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}-3.0.3-x-option.patch
27 Patch5:         %{name}-typo.patch
28 Patch6:         %{name}-arg-concat.patch
29 URL:            http://www.isc.org/sw/dhcp/
30 BuildRequires:  groff
31 %{?with_ldap:BuildRequires:     openldap-devel}
32 BuildRequires:  rpmbuild(macros) >= 1.268
33 Requires(post): fileutils
34 Requires(post,preun):   /sbin/chkconfig
35 Requires:       rc-scripts >= 0.2.0
36 Provides:       dhcpd
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 DHCP (Dynamic Host Configuration Protocol) is a protocol which allows
41 individual devices on an IP network to get their own network
42 configuration information (IP address, subnetmask, broadcast address,
43 etc.) from a DHCP server. The overall purpose of DHCP is to make it
44 easier to administer a large network.
45
46 %description -l es.UTF-8
47 DHCP permite que hosts en una red TCP/IP soliciten y tengan sus
48 direcciones IP alocadas dinámicamente, permite también descubrir
49 información sobre la red en que están conectados. BOOTP provee una
50 funcionalidad similar, con ciertas restricciones. Este servidor
51 también las atiende.
52
53 %description -l pl.UTF-8
54 Serwer DHCP (Dynamic Host Configuration Protocol).
55
56 DHCP to protokół pozwalający urządzeniom pracującym w sieci IP na
57 pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu
58 rozgłoszeniowego itp.) z serwera DHCP. Ułatwia on administrowanie
59 dużymi sieciami IP.
60
61 %description -l pt_BR.UTF-8
62 DHCP permite que hosts numa rede TCP/IP requisitem e tenham seus
63 endereços IP alocados dinamicamente, permite também descobrir
64 informações sobre a rede em que estão conectados. BOOTP provê uma
65 funcionalidade similar, com certas restrições. Este servidor também
66 atende aquelas requisições. Esta versão é ainda considerada um
67 software BETA.
68
69 %package client
70 Summary:        DHCP Client
71 Summary(pl.UTF-8):   Klient DHCP
72 Group:          Networking/Daemons
73 Requires(post): fileutils
74 Obsoletes:      dhclient
75 Obsoletes:      pump
76
77 %description client
78 Dynamic Host Configuration Protocol Client.
79
80 %description client -l pl.UTF-8
81 Klient DHCP (Dynamic Host Configuration Protocol).
82
83 %package relay
84 Summary:        DHCP Relay Agent
85 Summary(pl.UTF-8):   Agent przekazywania informacji DHCP
86 Group:          Networking/Daemons
87 Requires(post): fileutils
88 Requires(post,preun):   /sbin/chkconfig
89 Requires:       rc-scripts >= 0.2.0
90
91 %description relay
92 Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
93 with DHCP clients to "relay" their requests to a subnet that has a
94 DHCP server on it. Because DHCP packets can be broadcast, they will
95 not be routed off of the local subnet. The DHCP relay takes care of
96 this for the client.
97
98 %description relay -l pl.UTF-8
99 Agent przekazywania DHCP (Dynamic Host Configuration Protocol) między
100 podsieciami. Ponieważ komunikaty DHCP mogą być przekazywane w formie
101 rozgłoszeniowej, bez tego agenta nie zostaną przerutowane do innej
102 podsieci.
103
104 %package devel
105 Summary:        DHCP development includes and libs
106 Summary(pl.UTF-8):   Pliki nagłówkowe i biblioteki dla oprogramowania DHCP
107 Group:          Development/Libraries
108
109 %description devel
110 Includes OMAPI and dhcptl libraries.
111
112 OMAPI is an programming layer designed for controlling remote
113 applications, and for querying them for their state. It is currently
114 used by the ISC DHCP server.
115
116 The dhcpctl set of functions provide an API that can be used to
117 communicate with and manipulate a running ISC DHCP server.
118
119 %description devel -l pl.UTF-8
120 Zawiera biblioteki OMAPI oraz dhcpctl.
121
122 OMAPI to warstwa programowa stworzona do kontroli zdalnych aplikacji i
123 odpytywania o ich stan. Aktualnie jest używana przez serwer ISC DHCP.
124
125 dhcpctl to zbiór funkcji tworzących API, które może być używane do
126 komunikacji z działającym serwerem ISC DHCP i jego kontroli.
127
128 %prep
129 %setup -q
130 install %{SOURCE4} .
131 %patch0 -p1
132 %{?with_ldap:%patch1 -p1}
133 %{?with_ldap:%patch2 -p1}
134 %patch3 -p1
135 # This patch is required for dhcdbd to function
136 %patch4 -p1
137 %patch5 -p1
138 %patch6 -p1
139
140 %build
141 # NOTE: this is not autoconf configure - do not change it to %%configure
142 ./configure
143
144 %{__make} \
145         CC="%{__cc}" \
146         CC_OPTIONS="%{rpmcflags} \
147                 -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
148                 -DEXTENDED_NEW_OPTION_INFO \
149                 -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\" \
150         "
151         LFLAGS="%{rpmldflags}" \
152         DEBUG="" \
153         VARDB="/var/lib/%{name}"
154
155 %install
156 rm -rf $RPM_BUILD_ROOT
157 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_bindir},%{_mandir}/man{5,8}} \
158         $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
159
160 %{__make} install \
161         DESTDIR=$RPM_BUILD_ROOT \
162         CLIENTBINDIR=/sbin \
163         BINDIR=%{_sbindir} \
164         LIBDIR=%{_libdir} \
165         INCDIR=%{_includedir} \
166         ADMMANDIR=%{_mandir}/man8 \
167         ADMMANEXT=.8 \
168         FFMANDIR=%{_mandir}/man5 \
169         LIBMANDIR=%{_mandir}/man3 \
170         LIBMANEXT=.3 \
171         USRMANDIR=%{_mandir}/man1 \
172         USRMANEXT=.1 \
173         VARDB=/var/lib/%{name} \
174         FFMANEXT=.5
175
176 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
177 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
178 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
179 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/dhcpd.conf
180 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
181
182 mv $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3 \
183         $RPM_BUILD_ROOT%{_mandir}/man1/omshell.1
184
185 install client/scripts/linux $RPM_BUILD_ROOT%{_sbindir}/dhclient-script
186
187 touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
188
189 %clean
190 rm -rf $RPM_BUILD_ROOT
191
192 %post
193 /sbin/chkconfig --add dhcpd
194 touch /var/lib/%{name}/dhcpd.leases
195 %service dhcpd restart "dhcpd daemon"
196
197 %preun
198 if [ "$1" = "0" ];then
199         %service dhcpd stop
200         /sbin/chkconfig --del dhcpd
201 fi
202
203 %post client
204 # TODO: fix this
205 if [ ! -d /var/lib/dhcp ]; then
206         install -d /var/lib/dhcp
207 fi
208
209 %post relay
210 /sbin/chkconfig --add dhcp-relay
211 if [ -f /var/lock/subsys/dhcrelay ]; then
212         mv -f /var/lock/subsys/{dhcrelay,dhcp-relay}
213 fi
214 %service dhcp-relay restart "dhcrelay daemon"
215
216 %preun relay
217 if [ "$1" = "0" ];then
218         %service dhcp-relay stop
219         /sbin/chkconfig --del dhcp-relay
220 fi
221
222 %triggerpostun -- dhcp < 3.0
223 if [ "`grep ddns-update-style /etc/dhcpd.conf`" = "" ]; then
224         umask 027
225         echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
226         echo "" >> /etc/dhcpd.conf.tmp
227         cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp
228         mv -f /etc/dhcpd.conf.tmp /etc/dhcpd.conf
229 fi
230
231 %files
232 %defattr(644,root,root,755)
233 %doc doc/* README RELNOTES dhcpd.conf.sample
234 %{?with_ldap:%doc contrib/*}
235 %{_mandir}/man1/*
236 %{_mandir}/man5/dhcp*
237 %{_mandir}/man8/dhcp*
238 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcpd
239 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd.conf
240 %attr(755,root,root) %{_bindir}/*
241 %attr(755,root,root) %{_sbindir}/dhcpd
242 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
243 %attr(750,root,root) %dir /var/lib/%{name}
244 %ghost /var/lib/%{name}/dhcpd.leases
245
246 %files client
247 %defattr(644,root,root,755)
248 %attr(755,root,root) /sbin/dhclient
249 %attr(755,root,root) /sbin/dhclient-script
250 %{_mandir}/man[58]/dhclient*
251 %ghost /var/lib/%{name}/dhclient.leases
252
253 %files relay
254 %defattr(644,root,root,755)
255 %{_mandir}/man8/dhcrelay*
256 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcp-relay
257 %attr(755,root,root) %{_sbindir}/dhcrelay
258 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
259
260 %files devel
261 %defattr(644,root,root,755)
262 %{_mandir}/man3/*
263 %{_libdir}/*.a
264 %{_includedir}/*
This page took 0.078622 seconds and 4 git commands to generate.