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