]> git.pld-linux.org Git - packages/dhcp.git/blobdiff - dhcp.spec
- rel 3; separate dhcpd6.conf for dhcpd6
[packages/dhcp.git] / dhcp.spec
index 7bac9346eab2d1c965e4bd0de0023c51e9835668..6bea925359a17e09be3fc816fb353b49c3268e3d 100644 (file)
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -12,13 +12,13 @@ Summary(pl.UTF-8):  Serwer DHCP
 Summary(pt_BR.UTF-8):  Servidor DHCP (Protocolo de configuração dinâmica de hosts)
 Name:          dhcp
 # 4.1.0a1 is on DEVEL
-Version:       4.0.0
-Release:       1
+Version:       4.0.2
+Release:       3
 Epoch:         4
 License:       MIT
 Group:         Networking/Daemons
 Source0:       ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
-# Source0-md5: 31d79b27ce4a94089a0b9ce7f72307fa
+# Source0-md5: f8d35ade3727429b1ab74c26058bd6b1
 Source1:       %{name}.init
 Source2:       %{name}6.init
 Source3:       %{name}-relay.init
@@ -33,30 +33,27 @@ Source11:   %{name}-README.ldap
 Source12:      draft-ietf-dhc-ldap-schema-01.txt
 Source13:      dhcpd-conf-to-ldap
 Source14:      dhcp-dhclient-script
-Patch0:                %{name}-dhclient.script.patch
-Patch1:                %{name}-release-by-ifup.patch
-# from fedora 9-dev
-Patch2:                %{name}-ldap.patch
-Patch3:                %{name}-client-script-redhat.patch
-Patch4:                %{name}-3.0.3-x-option.patch
-Patch5:                %{name}-paths.patch
-Patch6:                %{name}-arg-concat.patch
-Patch8:                %{name}-timeouts.patch
-Patch9:                %{name}-options.patch
-Patch10:       %{name}-libdhcp4client.patch
-Patch11:       %{name}-prototypes.patch
-Patch12:       %{name}-errwarn-message.patch
-Patch13:       %{name}-memory.patch
-Patch14:       %{name}-dhclient-decline-backoff.patch
-Patch15:       %{name}-unicast-bootp.patch
-Patch16:       %{name}-fast-timeout.patch
-Patch17:       %{name}-failover-ports.patch
-Patch18:       %{name}-dhclient-usage.patch
-Patch19:       %{name}-default-requested-options.patch
-Patch20:       %{name}-xen-checksum.patch
-Patch21:       %{name}-dhclient-anycast.patch
-Patch22:       %{name}-manpages.patch
-Patch23:       %{name}-NetworkManager-crash.patch
+Patch0:                %{name}-release-by-ifup.patch
+# http://github.com/dcantrell/ldap-for-dhcp/raw/9cfd4c277d7615777f372ea08f44cc7de9ed7959/dhcp-4.0.1-ldap.patch
+Patch1:                %{name}-ldap.patch
+Patch2:                %{name}-3.0.3-x-option.patch
+Patch3:                %{name}-paths.patch
+Patch5:                %{name}-timeouts.patch
+Patch6:                %{name}-options.patch
+Patch7:                %{name}-libdhcp4client.patch
+Patch8:                %{name}-prototypes.patch
+Patch9:                %{name}-errwarn-message.patch
+Patch10:       %{name}-memory.patch
+Patch11:       %{name}-dhclient-decline-backoff.patch
+Patch12:       %{name}-unicast-bootp.patch
+Patch13:       %{name}-fast-timeout.patch
+Patch14:       %{name}-failover-ports.patch
+Patch15:       %{name}-dhclient-usage.patch
+Patch16:       %{name}-default-requested-options.patch
+Patch17:       %{name}-xen-checksum.patch
+Patch18:       %{name}-dhclient-anycast.patch
+Patch19:       %{name}-manpages.patch
+Patch20:       %{name}-NetworkManager-crash.patch
 URL:           http://www.isc.org/sw/dhcp/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -124,6 +121,7 @@ Group:              Networking/Daemons
 Requires:      coreutils
 Requires:      iproute2
 Requires:      net-tools
+Suggests:      avahi-autoipd
 Obsoletes:     dhclient
 
 %description client
@@ -218,18 +216,18 @@ Statyczna biblioteka kliencka DHCP.
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%{?with_ldap:%patch2 -p1}
-# These two patches are required for dhcdbd to function
-%patch3 -p1
+# This patch is required for dhcdbd to function
 # CHECK ME: adds -x (formerly -y):
 #The -x argument enables extended option information to be created in the
 #-s dhclient-script environment, which would allow applications running
 #in that environment to handle options they do not know about in advance -
 #this is a Red Hat extension to support dhcdbd and NetworkManager.
 # however, fedora doesn't have this patch anymore, so can drop?
-#%%patch4 -p1
+#%%patch2 -p1
+%patch3 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
@@ -243,9 +241,6 @@ Statyczna biblioteka kliencka DHCP.
 %patch18 -p1
 %patch19 -p1
 %patch20 -p1
-%patch21 -p1
-%patch22 -p1
-%patch23 -p1
 
 # Copy in documentation and example scripts for LDAP patch to dhcpd
 cp -a %{SOURCE11} README.ldap
@@ -279,7 +274,7 @@ for page in server/dhcpd.conf.5 server/dhcpd.leases.5 server/dhcpd.8; do
                                -e 's|ETCDIR|%{_sysconfdir}|g' $page
 done
 
-sed 's/@DHCP_VERSION@/'%{version}'/' < %{SOURCE5} > libdhcp4client.pc
+sed 's/@DHCP_VERSION@/'%{version}'/' < %{SOURCE6} > libdhcp4client.pc
 
 %build
 %{__libtoolize}
@@ -291,16 +286,17 @@ CFLAGS="%{rpmcflags} -fPIC -D_GNU_SOURCE=1"
 %configure \
        %{!?with_static_libs:--disable-static} \
        --enable-dhcpv6 \
-    --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \
-    --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \
-    --with-srv-pid-file=/var/run/dhcpd.pid \
-    --with-cli-pid-file=/var/run/dhclient.pid \
-    --with-relay-pid-file=/var/run/dhcrelay.pid
+       --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \
+       --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \
+       --with-srv-pid-file=/var/run/dhcpd.pid \
+       --with-cli-pid-file=/var/run/dhclient.pid \
+       --with-relay-pid-file=/var/run/dhcrelay.pid \
+       --with%{!?with_ldap:out}-ldap
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_pkgconfigdir},/var/lib/{dhcpd,dhclient}}
+install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,dhclient-enter-hooks.d,dhclient-exit-hooks.d},%{_pkgconfigdir},/var/lib/{dhcpd,dhclient}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -313,6 +309,7 @@ install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
 install %{SOURCE14} $RPM_BUILD_ROOT/sbin/dhclient-script
 
 install server/dhcpd.conf $RPM_BUILD_ROOT%{_sysconfdir}
+:> $RPM_BUILD_ROOT%{_sysconfdir}/dhcpd6.conf
 
 %if %{with ldap}
 install -d $RPM_BUILD_ROOT%{schemadir}
@@ -320,6 +317,8 @@ install %{SOURCE10} $RPM_BUILD_ROOT%{schemadir}
 %endif
 
 # Install headers for libdhcp4client-devel
+install -d $RPM_BUILD_ROOT%{_includedir}/dhcp4client
+install libdhcp4client/dhcp4client.h $RPM_BUILD_ROOT%{_includedir}/dhcp4client/dhcp4client.h
 install -d $RPM_BUILD_ROOT%{_includedir}/dhcp4client/minires
 for hdr in cdefs.h ctrace.h dhcp.h dhcp6.h dhcpd.h dhctoken.h failover.h \
            heap.h inet.h minires/minires.h minires/res_update.h \
@@ -327,7 +326,7 @@ for hdr in cdefs.h ctrace.h dhcp.h dhcp6.h dhcpd.h dhctoken.h failover.h \
        install -p -m 0644 includes/${hdr} $RPM_BUILD_ROOT%{_includedir}/dhcp4client/${hdr}
 done
 
-touch $RPM_BUILD_ROOT%{_sysconfdir}/dhclient.conf
+:> $RPM_BUILD_ROOT%{_sysconfdir}/dhclient.conf
 
 touch $RPM_BUILD_ROOT/var/lib/dhcpd/dhcpd.leases
 touch $RPM_BUILD_ROOT/var/lib/dhclient/dhclient.leases
@@ -364,6 +363,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 touch /var/lib/dhcpd/dhcpd.leases
+touch /var/lib/dhcpd/dhcpd6.leases
 /sbin/chkconfig --add dhcpd
 %service dhcpd restart "dhcpd daemon"
 /sbin/chkconfig --add dhcpd6
@@ -405,14 +405,24 @@ if [ "$1" = "0" ];then
        /sbin/chkconfig --del dhcp-relay
 fi
 
+%triggerun client -- %{name}-client < 4:4.0.2-2
+if [ -f /etc/dhclient-enter-hooks ] ; then
+       mv /etc/dhclient-enter-hooks /etc/dhclient-enter-hooks.d/
+fi
+if [ -f /etc/dhclient-exit-hooks ] ; then
+       mv /etc/dhclient-exit-hooks /etc/dhclient-exit-hooks.d/
+fi
+
 %post  -n libdhcp4client -p /sbin/ldconfig
 %postun        -n libdhcp4client -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
-%doc doc/* README RELNOTES server/dhcpd.conf LICENSE contrib/ms2isc
+%doc doc/* README RELNOTES server/dhcpd.conf LICENSE 
+%doc contrib/ms2isc %{?with_ldap:contrib/dhcpd-conf-to-ldap README.ldap}
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcpd
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd6.conf
 %attr(755,root,root) %{_bindir}/omshell
 %attr(755,root,root) %{_sbindir}/dhcpd
 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
@@ -431,6 +441,8 @@ fi
 %defattr(644,root,root,755)
 %doc contrib/sethostname.sh client/dhclient.conf
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhclient.conf
+%{_sysconfdir}/dhclient-enter-hooks.d
+%{_sysconfdir}/dhclient-exit-hooks.d
 %attr(755,root,root) /sbin/dhclient
 %attr(755,root,root) /sbin/dhclient-script
 %{_mandir}/man5/dhclient.conf.5*
This page took 0.110304 seconds and 4 git commands to generate.