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