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