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