]>
Commit | Line | Data |
---|---|---|
fa424e73 JB |
1 | # |
2 | # Conditional build: | |
967af251 | 3 | %bcond_without ldap # without support for ldap storage |
6db0fb84 | 4 | %bcond_without static_libs # don't build static library |
ceee8beb ER |
5 | |
6 | # vendor string | |
7 | %define vvendor PLD/Linux | |
fa424e73 | 8 | # |
8dc004f7 | 9 | Summary: DHCP Server |
6e8d2260 ER |
10 | Summary(es.UTF-8): Servidor DHCP |
11 | Summary(pl.UTF-8): Serwer DHCP | |
12 | Summary(pt_BR.UTF-8): Servidor DHCP (Protocolo de configuração dinâmica de hosts) | |
cd3ce1e4 | 13 | Name: dhcp |
6db0fb84 | 14 | # 4.1.0a1 is on DEVEL |
585ef843 | 15 | Version: 4.0.2 |
e8a49f77 | 16 | Release: 4 |
9598ee90 | 17 | Epoch: 4 |
6acbb058 | 18 | License: MIT |
cd3ce1e4 | 19 | Group: Networking/Daemons |
cab047e0 | 20 | Source0: ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz |
585ef843 | 21 | # Source0-md5: f8d35ade3727429b1ab74c26058bd6b1 |
a4dfcb55 | 22 | Source1: %{name}.init |
6e6494f3 AM |
23 | Source2: %{name}6.init |
24 | Source3: %{name}-relay.init | |
25 | Source4: %{name}.sysconfig | |
26 | Source5: %{name}-relay.sysconfig | |
27 | Source6: %{name}-libdhcp4client.pc | |
28 | Source7: %{name}-dhcp4client.h | |
29 | Source8: %{name}-libdhcp4client.make | |
30 | Source9: %{name}-libdhcp_control.h | |
03a6f6c6 | 31 | Source10: %{name}.schema |
ceee8beb ER |
32 | Source11: %{name}-README.ldap |
33 | Source12: draft-ietf-dhc-ldap-schema-01.txt | |
34 | Source13: dhcpd-conf-to-ldap | |
35 | Source14: dhcp-dhclient-script | |
4ca0a88e | 36 | Patch0: %{name}-release-by-ifup.patch |
9f600e9f | 37 | # http://github.com/dcantrell/ldap-for-dhcp/raw/9cfd4c277d7615777f372ea08f44cc7de9ed7959/dhcp-4.0.1-ldap.patch |
4ca0a88e MB |
38 | Patch1: %{name}-ldap.patch |
39 | Patch2: %{name}-3.0.3-x-option.patch | |
40 | Patch3: %{name}-paths.patch | |
4ca0a88e MB |
41 | Patch5: %{name}-timeouts.patch |
42 | Patch6: %{name}-options.patch | |
43 | Patch7: %{name}-libdhcp4client.patch | |
44 | Patch8: %{name}-prototypes.patch | |
45 | Patch9: %{name}-errwarn-message.patch | |
46 | Patch10: %{name}-memory.patch | |
47 | Patch11: %{name}-dhclient-decline-backoff.patch | |
48 | Patch12: %{name}-unicast-bootp.patch | |
49 | Patch13: %{name}-fast-timeout.patch | |
50 | Patch14: %{name}-failover-ports.patch | |
51 | Patch15: %{name}-dhclient-usage.patch | |
52 | Patch16: %{name}-default-requested-options.patch | |
53 | Patch17: %{name}-xen-checksum.patch | |
54 | Patch18: %{name}-dhclient-anycast.patch | |
55 | Patch19: %{name}-manpages.patch | |
56 | Patch20: %{name}-NetworkManager-crash.patch | |
5ea0fa25 | 57 | URL: http://www.isc.org/sw/dhcp/ |
03a6f6c6 AM |
58 | BuildRequires: autoconf |
59 | BuildRequires: automake | |
bca716bd | 60 | BuildRequires: groff |
ceee8beb | 61 | BuildRequires: libtool |
01b31b42 | 62 | %{?with_ldap:BuildRequires: openldap-devel} |
5bf1b3cd | 63 | %{?with_ldap:BuildRequires: openssl-devel} |
967af251 JR |
64 | BuildRequires: rpmbuild(macros) >= 1.304 |
65 | Requires(post): coreutils | |
ac30bae3 ER |
66 | Requires(post,preun): /sbin/chkconfig |
67 | Requires: rc-scripts >= 0.2.0 | |
73612d9c | 68 | Provides: dhcpd |
bf74a63f | 69 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
cd3ce1e4 | 70 | |
6e6494f3 | 71 | %define _sbindir /sbin |
967af251 JR |
72 | %define schemadir /usr/share/openldap/schema |
73 | ||
cd3ce1e4 | 74 | %description |
0770f14a | 75 | DHCP (Dynamic Host Configuration Protocol) is a protocol which allows |
37bec083 | 76 | individual devices on an IP network to get their own network |
77 | configuration information (IP address, subnetmask, broadcast address, | |
78 | etc.) from a DHCP server. The overall purpose of DHCP is to make it | |
79 | easier to administer a large network. | |
0770f14a | 80 | |
39cd54ba | 81 | %description -l es.UTF-8 |
1f522308 | 82 | DHCP permite que hosts en una red TCP/IP soliciten y tengan sus |
39cd54ba JR |
83 | direcciones IP alocadas dinámicamente, permite también descubrir |
84 | información sobre la red en que están conectados. BOOTP provee una | |
1f522308 | 85 | funcionalidad similar, con ciertas restricciones. Este servidor |
39cd54ba | 86 | también las atiende. |
1f522308 | 87 | |
39cd54ba | 88 | %description -l pl.UTF-8 |
b7cc5fa2 | 89 | Serwer DHCP (Dynamic Host Configuration Protocol). |
cd3ce1e4 | 90 | |
39cd54ba | 91 | DHCP to protokół pozwalający urządzeniom pracującym w sieci IP na |
cd42af6b | 92 | pobieranie ich konfiguracji IP (adresu, maski podsieci, adresu |
39cd54ba JR |
93 | rozgłoszeniowego itp.) z serwera DHCP. Ułatwia on administrowanie |
94 | dużymi sieciami IP. | |
cd42af6b | 95 | |
39cd54ba | 96 | %description -l pt_BR.UTF-8 |
1f522308 | 97 | DHCP permite que hosts numa rede TCP/IP requisitem e tenham seus |
39cd54ba JR |
98 | endereços IP alocados dinamicamente, permite também descobrir |
99 | informações sobre a rede em que estão conectados. BOOTP provê uma | |
100 | funcionalidade similar, com certas restrições. Este servidor também | |
101 | atende aquelas requisições. Esta versão é ainda considerada um | |
1f522308 | 102 | software BETA. |
103 | ||
b62eae95 | 104 | %package -n openldap-schema-dhcp |
967af251 JR |
105 | Summary: LDAP Schema for DHCP Server |
106 | Summary(pl.UTF-8): Schemat LDAP dla serwera DHCP | |
107 | Group: Networking/Daemons | |
108 | Requires(post,postun): sed >= 4.0 | |
109 | Requires: openldap-servers | |
110 | ||
b62eae95 | 111 | %description -n openldap-schema-dhcp |
967af251 JR |
112 | This package contains LDAPv3 schema for use with the DHCP Server. |
113 | ||
b62eae95 | 114 | %description -n openldap-schema-dhcp -l pl.UTF-8 |
967af251 JR |
115 | Ten pakiet zawiera schemat LDAPv3 do używania z serwerem DHCP. |
116 | ||
3bb4bab9 | 117 | %package client |
118 | Summary: DHCP Client | |
6e8d2260 | 119 | Summary(pl.UTF-8): Klient DHCP |
3bb4bab9 | 120 | Group: Networking/Daemons |
eda193cb JR |
121 | Requires: coreutils |
122 | Requires: iproute2 | |
123 | Requires: net-tools | |
51ba29e1 | 124 | Suggests: avahi-autoipd |
dd3090a5 | 125 | Obsoletes: dhclient |
3bb4bab9 | 126 | |
127 | %description client | |
0770f14a | 128 | Dynamic Host Configuration Protocol Client. |
3bb4bab9 | 129 | |
39cd54ba | 130 | %description client -l pl.UTF-8 |
0770f14a | 131 | Klient DHCP (Dynamic Host Configuration Protocol). |
3bb4bab9 | 132 | |
e8a49f77 | 133 | %package client-dirs |
134 | Summary: DHCP Client common dirs | |
135 | Summary(pl.UTF-8): Katalogi klienta DHCP | |
136 | Group: Networking/Daemons | |
137 | ||
138 | %description client-dirs | |
139 | Directories for scripts for dhcp-client. | |
140 | ||
141 | %description client -l pl.UTF-8 | |
142 | Katalog przeznaczony na skrypty dla klienta dhcp. | |
143 | ||
45ef0575 | 144 | %package relay |
145 | Summary: DHCP Relay Agent | |
6e8d2260 | 146 | Summary(pl.UTF-8): Agent przekazywania informacji DHCP |
45ef0575 | 147 | Group: Networking/Daemons |
967af251 | 148 | Requires(post): coreutils |
ac30bae3 ER |
149 | Requires(post,preun): /sbin/chkconfig |
150 | Requires: rc-scripts >= 0.2.0 | |
45ef0575 | 151 | |
152 | %description relay | |
a4dfcb55 | 153 | Dhcp relay is a relay agent for DHCP packets. It is used on a subnet |
154 | with DHCP clients to "relay" their requests to a subnet that has a | |
155 | DHCP server on it. Because DHCP packets can be broadcast, they will | |
156 | not be routed off of the local subnet. The DHCP relay takes care of | |
157 | this for the client. | |
158 | ||
39cd54ba JR |
159 | %description relay -l pl.UTF-8 |
160 | Agent przekazywania DHCP (Dynamic Host Configuration Protocol) między | |
161 | podsieciami. Ponieważ komunikaty DHCP mogą być przekazywane w formie | |
162 | rozgłoszeniowej, bez tego agenta nie zostaną przerutowane do innej | |
cd42af6b | 163 | podsieci. |
45ef0575 | 164 | |
1d526f5b JK |
165 | %package devel |
166 | Summary: DHCP development includes and libs | |
6e8d2260 | 167 | Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki dla oprogramowania DHCP |
1d526f5b JK |
168 | Group: Development/Libraries |
169 | ||
170 | %description devel | |
171 | Includes OMAPI and dhcptl libraries. | |
172 | ||
173 | OMAPI is an programming layer designed for controlling remote | |
174 | applications, and for querying them for their state. It is currently | |
175 | used by the ISC DHCP server. | |
176 | ||
177 | The dhcpctl set of functions provide an API that can be used to | |
178 | communicate with and manipulate a running ISC DHCP server. | |
179 | ||
39cd54ba | 180 | %description devel -l pl.UTF-8 |
1d526f5b JK |
181 | Zawiera biblioteki OMAPI oraz dhcpctl. |
182 | ||
183 | OMAPI to warstwa programowa stworzona do kontroli zdalnych aplikacji i | |
39cd54ba | 184 | odpytywania o ich stan. Aktualnie jest używana przez serwer ISC DHCP. |
1d526f5b | 185 | |
39cd54ba JR |
186 | dhcpctl to zbiór funkcji tworzących API, które może być używane do |
187 | komunikacji z działającym serwerem ISC DHCP i jego kontroli. | |
1d526f5b | 188 | |
c494ae74 PZ |
189 | %package -n libdhcp4client |
190 | Summary: The DHCP client in a library for invocation by other programs | |
191 | Summary(pl.UTF-8): Klient DHCP w postaci biblioteki do wykorzystania w innych programach | |
192 | Group: Development/Libraries | |
193 | ||
194 | %description -n libdhcp4client | |
195 | Provides the client for the DHCP protocol. | |
196 | ||
197 | %description -n libdhcp4client -l pl.UTF-8 | |
198 | Ten pakiet zawiera klienta protokołu DHCP. | |
199 | ||
200 | %package -n libdhcp4client-devel | |
201 | Summary: Header files for development with the DHCP client library | |
202 | Summary(pl.UTF-8): Pliki nagłówkowe do programowania z użyciem biblioteki klienckiej DHCP | |
6acbb058 | 203 | License: GPL v2+ |
ceee8beb | 204 | Group: Development/Libraries |
c494ae74 PZ |
205 | Requires: libdhcp4client = %{epoch}:%{version}-%{release} |
206 | ||
207 | %description -n libdhcp4client-devel | |
208 | Header files for development with the DHCP client library. | |
209 | ||
210 | %description -n libdhcp4client-devel -l pl.UTF-8 | |
ceee8beb ER |
211 | Pliki nagłówkowe do programowania z użyciem biblioteki klienckiej |
212 | DHCP. | |
c494ae74 PZ |
213 | |
214 | %package -n libdhcp4client-static | |
215 | Summary: Static DHCP client library | |
216 | Summary(pl.UTF-8): Statyczna biblioteka kliencka DHCP | |
217 | Group: Development/Libraries | |
218 | Requires: libdhcp4client-devel = %{epoch}:%{version}-%{release} | |
219 | ||
220 | %description -n libdhcp4client-static | |
221 | Static DHCP client library. | |
222 | ||
223 | %description -n libdhcp4client-static -l pl.UTF-8 | |
224 | Statyczna biblioteka kliencka DHCP. | |
225 | ||
cd3ce1e4 | 226 | %prep |
cab047e0 | 227 | %setup -q |
37332297 | 228 | %patch0 -p1 |
9f600e9f | 229 | %patch1 -p1 |
4ca0a88e | 230 | # This patch is required for dhcdbd to function |
ceee8beb ER |
231 | # CHECK ME: adds -x (formerly -y): |
232 | #The -x argument enables extended option information to be created in the | |
233 | #-s dhclient-script environment, which would allow applications running | |
234 | #in that environment to handle options they do not know about in advance - | |
235 | #this is a Red Hat extension to support dhcdbd and NetworkManager. | |
f805880f | 236 | # however, fedora doesn't have this patch anymore, so can drop? |
4ca0a88e MB |
237 | #%%patch2 -p1 |
238 | %patch3 -p1 | |
92eb981e | 239 | %patch5 -p1 |
74b36fbe | 240 | %patch6 -p1 |
4ca0a88e | 241 | %patch7 -p1 |
c494ae74 | 242 | %patch8 -p1 |
03a6f6c6 AM |
243 | %patch9 -p1 |
244 | %patch10 -p1 | |
8cf9160b | 245 | %patch11 -p1 |
ceee8beb ER |
246 | %patch12 -p1 |
247 | %patch13 -p1 | |
248 | %patch14 -p1 | |
249 | %patch15 -p1 | |
250 | %patch16 -p1 | |
251 | %patch17 -p1 | |
252 | %patch18 -p1 | |
253 | %patch19 -p1 | |
254 | %patch20 -p1 | |
ceee8beb ER |
255 | |
256 | # Copy in documentation and example scripts for LDAP patch to dhcpd | |
257 | cp -a %{SOURCE11} README.ldap | |
258 | cp -a %{SOURCE12} doc | |
259 | cp -a %{SOURCE13} contrib | |
260 | ||
261 | # Copy in the libdhcp4client headers and Makefile.dist | |
262 | install -d libdhcp4client | |
6e6494f3 AM |
263 | cp %{SOURCE7} libdhcp4client/dhcp4client.h |
264 | cp %{SOURCE8} libdhcp4client/Makefile.dist | |
ceee8beb ER |
265 | |
266 | # Copy in libdhcp_control.h to the isc-dhcp includes directory | |
6e6494f3 | 267 | cp %{SOURCE9} includes/isc-dhcp/libdhcp_control.h |
4b8d2654 | 268 | |
ceee8beb ER |
269 | # Replace @PRODUCTNAME@ |
270 | %{__sed} -i -e 's|@PRODUCTNAME@|%{vvendor}|g' common/dhcp-options.5 | |
271 | %{__sed} -i -e 's|@PRODUCTNAME@|%{vvendor}|g' configure.ac | |
272 | ||
273 | # Update paths in all man pages | |
274 | for page in client/dhclient.conf.5 client/dhclient.leases.5 client/dhclient-script.8 client/dhclient.8; do | |
275 | %{__sed} -i -e 's|CLIENTBINDIR|/sbin|g' \ | |
276 | -e 's|RUNDIR|%{_localstatedir}/run|g' \ | |
277 | -e 's|DBDIR|%{_localstatedir}/db/dhclient|g' \ | |
278 | -e 's|ETCDIR|%{_sysconfdir}|g' $page | |
279 | done | |
280 | ||
281 | for page in server/dhcpd.conf.5 server/dhcpd.leases.5 server/dhcpd.8; do | |
282 | %{__sed} -i -e 's|CLIENTBINDIR|/sbin|g' \ | |
283 | -e 's|RUNDIR|%{_localstatedir}/run|g' \ | |
284 | -e 's|DBDIR|%{_localstatedir}/db/dhcpd|g' \ | |
285 | -e 's|ETCDIR|%{_sysconfdir}|g' $page | |
286 | done | |
287 | ||
7e4b9e16 | 288 | sed 's/@DHCP_VERSION@/'%{version}'/' < %{SOURCE6} > libdhcp4client.pc |
ceee8beb | 289 | |
0770f14a | 290 | %build |
03a6f6c6 AM |
291 | %{__libtoolize} |
292 | %{__aclocal} | |
293 | %{__autoconf} | |
294 | %{__autoheader} | |
295 | %{__automake} | |
4a7f1e32 | 296 | CFLAGS="%{rpmcflags} -fPIC -D_GNU_SOURCE=1" |
6e6494f3 | 297 | %configure \ |
6db0fb84 | 298 | %{!?with_static_libs:--disable-static} \ |
6e6494f3 | 299 | --enable-dhcpv6 \ |
9f600e9f | 300 | --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \ |
301 | --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \ | |
302 | --with-srv-pid-file=/var/run/dhcpd.pid \ | |
303 | --with-cli-pid-file=/var/run/dhclient.pid \ | |
304 | --with-relay-pid-file=/var/run/dhcrelay.pid \ | |
305 | --with%{!?with_ldap:out}-ldap | |
6e6494f3 | 306 | %{__make} |
cd3ce1e4 | 307 | |
308 | %install | |
309 | rm -rf $RPM_BUILD_ROOT | |
51ba29e1 | 310 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,dhclient-enter-hooks.d,dhclient-exit-hooks.d},%{_pkgconfigdir},/var/lib/{dhcpd,dhclient}} |
cd3ce1e4 | 311 | |
771aee8c | 312 | %{__make} install \ |
6e6494f3 | 313 | DESTDIR=$RPM_BUILD_ROOT |
967af251 | 314 | |
cd3ce1e4 | 315 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd |
6e6494f3 AM |
316 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd6 |
317 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay | |
318 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd | |
319 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay | |
ceee8beb | 320 | install %{SOURCE14} $RPM_BUILD_ROOT/sbin/dhclient-script |
cd3ce1e4 | 321 | |
967af251 | 322 | install server/dhcpd.conf $RPM_BUILD_ROOT%{_sysconfdir} |
a5aaaa8f | 323 | :> $RPM_BUILD_ROOT%{_sysconfdir}/dhcpd6.conf |
ceee8beb | 324 | |
967af251 | 325 | %if %{with ldap} |
ceee8beb | 326 | install -d $RPM_BUILD_ROOT%{schemadir} |
03a6f6c6 | 327 | install %{SOURCE10} $RPM_BUILD_ROOT%{schemadir} |
967af251 | 328 | %endif |
1d526f5b | 329 | |
c588390c | 330 | # Install headers for libdhcp4client-devel |
6787bbb5 PZ |
331 | install -d $RPM_BUILD_ROOT%{_includedir}/dhcp4client |
332 | install libdhcp4client/dhcp4client.h $RPM_BUILD_ROOT%{_includedir}/dhcp4client/dhcp4client.h | |
c588390c | 333 | install -d $RPM_BUILD_ROOT%{_includedir}/dhcp4client/minires |
c588390c AM |
334 | for hdr in cdefs.h ctrace.h dhcp.h dhcp6.h dhcpd.h dhctoken.h failover.h \ |
335 | heap.h inet.h minires/minires.h minires/res_update.h \ | |
ceee8beb ER |
336 | minires/resolv.h osdep.h site.h statement.h tree.h; do |
337 | install -p -m 0644 includes/${hdr} $RPM_BUILD_ROOT%{_includedir}/dhcp4client/${hdr} | |
c588390c AM |
338 | done |
339 | ||
4ca0a88e | 340 | :> $RPM_BUILD_ROOT%{_sysconfdir}/dhclient.conf |
9da55644 | 341 | |
ceee8beb | 342 | touch $RPM_BUILD_ROOT/var/lib/dhcpd/dhcpd.leases |
b0caeee3 | 343 | touch $RPM_BUILD_ROOT/var/lib/dhclient/dhclient.leases |
3bb4bab9 | 344 | |
ceee8beb | 345 | touch $RPM_BUILD_ROOT/var/lib/dhcpd/dhcpd6.leases |
8f0f47ea AM |
346 | touch $RPM_BUILD_ROOT/var/lib/dhclient/dhclient6.leases |
347 | ||
ceee8beb | 348 | # Install pkg-config file |
c494ae74 | 349 | install libdhcp4client.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libdhcp4client.pc |
ceee8beb | 350 | cp -a includes/isc-dhcp/libdhcp_control.h $RPM_BUILD_ROOT%{_includedir}/isc-dhcp |
c494ae74 | 351 | |
6db0fb84 ER |
352 | %if %{with static_libs} |
353 | # HACK: strip doesn't like .a inside .a | |
ceee8beb | 354 | install -d stripworkdir |
6db0fb84 ER |
355 | cd stripworkdir |
356 | for a in $RPM_BUILD_ROOT%{_libdir}/*.a; do | |
357 | archives=$(ar t $a | grep '\.a$' || :) | |
358 | [ "$archives" ] || continue | |
359 | ||
360 | # hope we don't have to recurse here | |
361 | for ar in $archives; do | |
362 | rm -f *.o *.a | |
363 | ar x $a $ar | |
364 | ar x $ar | |
365 | ar d $a $ar | |
366 | ar cr $a *.o | |
367 | done | |
368 | done | |
369 | cd - | |
370 | %endif | |
371 | ||
82fbb222 JB |
372 | %clean |
373 | rm -rf $RPM_BUILD_ROOT | |
374 | ||
cd3ce1e4 | 375 | %post |
ceee8beb | 376 | touch /var/lib/dhcpd/dhcpd.leases |
7089f517 | 377 | touch /var/lib/dhcpd/dhcpd6.leases |
3a01d42c | 378 | /sbin/chkconfig --add dhcpd |
30c45ada | 379 | %service dhcpd restart "dhcpd daemon" |
ceee8beb | 380 | /sbin/chkconfig --add dhcpd6 |
6e6494f3 | 381 | %service dhcpd6 restart "dhcpd IPv6 daemon" |
cd3ce1e4 | 382 | |
208108e2 JB |
383 | %preun |
384 | if [ "$1" = "0" ];then | |
30c45ada | 385 | %service dhcpd stop |
208108e2 | 386 | /sbin/chkconfig --del dhcpd |
ceee8beb | 387 | %service dhcpd6 stop |
6e6494f3 | 388 | /sbin/chkconfig --del dhcpd6 |
208108e2 JB |
389 | fi |
390 | ||
6acbb058 | 391 | %triggerpostun -- dhcp < 3.0 |
ceee8beb ER |
392 | if ! grep -q ddns-update-style /etc/dhcpd.conf; then |
393 | %{__sed} -i -e '1iddns-update-style none;' /etc/dhcpd.conf | |
6acbb058 JB |
394 | fi |
395 | ||
b62eae95 | 396 | %post -n openldap-schema-dhcp |
967af251 JR |
397 | %openldap_schema_register %{schemadir}/dhcp.schema -d core |
398 | %service -q ldap restart | |
399 | ||
b62eae95 | 400 | %postun -n openldap-schema-dhcp |
967af251 JR |
401 | if [ "$1" = "0" ]; then |
402 | %openldap_schema_unregister %{schemadir}/dhcp.schema | |
403 | %service -q ldap restart | |
404 | fi | |
405 | ||
7940deed | 406 | %post relay |
3a01d42c | 407 | /sbin/chkconfig --add dhcp-relay |
3a01d42c | 408 | if [ -f /var/lock/subsys/dhcrelay ]; then |
30c45ada | 409 | mv -f /var/lock/subsys/{dhcrelay,dhcp-relay} |
3a01d42c | 410 | fi |
30c45ada | 411 | %service dhcp-relay restart "dhcrelay daemon" |
7940deed | 412 | |
7940deed | 413 | %preun relay |
3a01d42c | 414 | if [ "$1" = "0" ];then |
30c45ada | 415 | %service dhcp-relay stop |
3a01d42c | 416 | /sbin/chkconfig --del dhcp-relay |
417 | fi | |
7940deed | 418 | |
51ba29e1 JK |
419 | %triggerun client -- %{name}-client < 4:4.0.2-2 |
420 | if [ -f /etc/dhclient-enter-hooks ] ; then | |
421 | mv /etc/dhclient-enter-hooks /etc/dhclient-enter-hooks.d/ | |
422 | fi | |
423 | if [ -f /etc/dhclient-exit-hooks ] ; then | |
424 | mv /etc/dhclient-exit-hooks /etc/dhclient-exit-hooks.d/ | |
425 | fi | |
426 | ||
6acbb058 JB |
427 | %post -n libdhcp4client -p /sbin/ldconfig |
428 | %postun -n libdhcp4client -p /sbin/ldconfig | |
b7f7d94b | 429 | |
cd3ce1e4 | 430 | %files |
431 | %defattr(644,root,root,755) | |
9f600e9f | 432 | %doc doc/* README RELNOTES server/dhcpd.conf LICENSE |
433 | %doc contrib/ms2isc %{?with_ldap:contrib/dhcpd-conf-to-ldap README.ldap} | |
ac30bae3 ER |
434 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcpd |
435 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd.conf | |
a5aaaa8f | 436 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd6.conf |
967af251 | 437 | %attr(755,root,root) %{_bindir}/omshell |
cd3ce1e4 | 438 | %attr(755,root,root) %{_sbindir}/dhcpd |
d3d402da | 439 | %attr(754,root,root) /etc/rc.d/init.d/dhcpd |
6e6494f3 | 440 | %attr(754,root,root) /etc/rc.d/init.d/dhcpd6 |
ceee8beb ER |
441 | %attr(750,root,root) %dir /var/lib/dhcpd |
442 | %ghost /var/lib/dhcpd/dhcpd.leases | |
443 | %ghost /var/lib/dhcpd/dhcpd6.leases | |
6acbb058 JB |
444 | %{_mandir}/man1/omshell.1* |
445 | %{_mandir}/man5/dhcp-eval.5* | |
446 | %{_mandir}/man5/dhcp-options.5* | |
447 | %{_mandir}/man5/dhcpd.conf.5* | |
448 | %{_mandir}/man5/dhcpd.leases.5* | |
449 | %{_mandir}/man8/dhcpd.8* | |
3bb4bab9 | 450 | |
451 | %files client | |
ccf64540 | 452 | %defattr(644,root,root,755) |
ceee8beb | 453 | %doc contrib/sethostname.sh client/dhclient.conf |
967af251 | 454 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhclient.conf |
3bb4bab9 | 455 | %attr(755,root,root) /sbin/dhclient |
ceee8beb | 456 | %attr(755,root,root) /sbin/dhclient-script |
6acbb058 JB |
457 | %{_mandir}/man5/dhclient.conf.5* |
458 | %{_mandir}/man5/dhclient.leases.5* | |
459 | %{_mandir}/man8/dhclient.8* | |
460 | %{_mandir}/man8/dhclient-script.8* | |
ceee8beb | 461 | %dir %attr(750,root,root) /var/lib/dhclient |
b0caeee3 | 462 | %ghost /var/lib/dhclient/dhclient.leases |
8f0f47ea | 463 | %ghost /var/lib/dhclient/dhclient6.leases |
45ef0575 | 464 | |
e8a49f77 | 465 | %files client-dirs |
466 | %defattr(644,root,root,755) | |
467 | %dir %{_sysconfdir}/dhclient-enter-hooks.d | |
468 | %dir %{_sysconfdir}/dhclient-exit-hooks.d | |
469 | ||
45ef0575 | 470 | %files relay |
471 | %defattr(644,root,root,755) | |
ac30bae3 | 472 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcp-relay |
45ef0575 | 473 | %attr(755,root,root) %{_sbindir}/dhcrelay |
3ac86cff | 474 | %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay |
6acbb058 | 475 | %{_mandir}/man8/dhcrelay.8* |
1d526f5b JK |
476 | |
477 | %files devel | |
478 | %defattr(644,root,root,755) | |
6acbb058 | 479 | %{_libdir}/libdhcpctl.a |
6e6494f3 | 480 | %{_libdir}/libdst.a |
6acbb058 | 481 | %{_libdir}/libomapi.a |
6e6494f3 | 482 | %{_includedir}/dhcpctl |
6acbb058 JB |
483 | %{_includedir}/isc-dhcp |
484 | %{_includedir}/omapip | |
485 | %{_mandir}/man3/dhcpctl.3* | |
486 | %{_mandir}/man3/omapi.3* | |
c494ae74 | 487 | |
03a6f6c6 AM |
488 | %files -n libdhcp4client |
489 | %defattr(644,root,root,755) | |
490 | %attr(755,root,root) %{_libdir}/libdhcp4client-*.so.* | |
c494ae74 | 491 | |
03a6f6c6 AM |
492 | %files -n libdhcp4client-devel |
493 | %defattr(644,root,root,755) | |
494 | %attr(755,root,root) %{_libdir}/libdhcp4client.so | |
c588390c | 495 | %{_includedir}/dhcp4client |
03a6f6c6 AM |
496 | %{_pkgconfigdir}/libdhcp4client.pc |
497 | %{_libdir}/libdhcp4client.la | |
c494ae74 | 498 | |
6db0fb84 | 499 | %if %{with static_libs} |
03a6f6c6 AM |
500 | %files -n libdhcp4client-static |
501 | %defattr(644,root,root,755) | |
502 | %{_libdir}/libdhcp4client.a | |
6db0fb84 | 503 | %endif |
ceee8beb ER |
504 | |
505 | %if %{with ldap} | |
506 | %files -n openldap-schema-dhcp | |
507 | %defattr(644,root,root,755) | |
508 | %{schemadir}/dhcp.schema | |
509 | %endif |