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