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