]> git.pld-linux.org Git - packages/dhcp.git/blobdiff - dhcp.spec
- rel 3
[packages/dhcp.git] / dhcp.spec
index b49fdb9df80948a8738ca138536f95e9ed2a5cf9..1f24e5e6d069cdc60a3705c2353752eba550dcb5 100644 (file)
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -7,14 +7,13 @@ Summary(es):  Servidor DHCP
 Summary(pl):   Serwer DHCP
 Summary(pt_BR):        Servidor DHCP (Protocolo de configuração dinâmica de hosts)
 Name:          dhcp
-Version:       3.0.2
-Release:       2.1
+Version:       3.0.4
+Release:       3
 Epoch:         3
-Vendor:                ISC
 License:       distributable
 Group:         Networking/Daemons
 Source0:       ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
-# Source0-md5: 04800a111521e7442749b2ce883f962b
+# Source0-md5: 004ef935fd54b8046b16bdde31a9e151
 Source1:       %{name}.init
 Source2:       %{name}-relay.init
 Source3:       %{name}-relay.sysconfig
@@ -23,13 +22,16 @@ Source5:    %{name}.sysconfig
 Patch0:                %{name}-if_buffer_size.patch
 Patch1:                %{name}-ldap.patch
 Patch2:                %{name}-ldap1.patch
-Patch3:                %{name}-gcc343-fix.patch
+Patch3:                %{name}-client-script-redhat.patch
+Patch4:                %{name}-dhcpd_lease_time.patch
+Patch5:                %{name}-3.0.3-x-option.patch
 URL:           http://www.isc.org/sw/dhcp/
 BuildRequires: groff
 %{?with_ldap:BuildRequires:    openldap-devel}
-PreReq:                rc-scripts >= 0.2.0
-Requires(post,preun):  /sbin/chkconfig
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post):        fileutils
+Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts >= 0.2.0
 Provides:      dhcpd
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -68,8 +70,8 @@ Summary:      DHCP Client
 Summary(pl):   Klient DHCP
 Group:         Networking/Daemons
 Requires(post):        fileutils
-Obsoletes:     pump
 Obsoletes:     dhclient
+Obsoletes:     pump
 
 %description client
 Dynamic Host Configuration Protocol Client.
@@ -81,9 +83,9 @@ Klient DHCP (Dynamic Host Configuration Protocol).
 Summary:       DHCP Relay Agent
 Summary(pl):   Agent przekazywania informacji DHCP
 Group:         Networking/Daemons
-PreReq:                rc-scripts >= 0.2.0
-Requires(post,preun):  /sbin/chkconfig
 Requires(post):        fileutils
+Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts >= 0.2.0
 
 %description relay
 Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
@@ -129,6 +131,8 @@ install %{SOURCE4} .
 %{?with_ldap:%patch1 -p1}
 %{?with_ldap:%patch2 -p1}
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 cd doc
 echo "dhcpd complies with the following RFCs:" > rfc-compliance
@@ -142,11 +146,14 @@ cd ..
 ./configure
 
 %{__make} \
-       COPTS="%{rpmcflags} \
+       CC="%{__cc}" \
+       CC_OPTIONS="%{rpmcflags} \
        -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
-       -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\" \
-       -DUSE_SOCKET_FALLBACK" \
-       DEBUG="" VARDB="/var/lib/%{name}"
+       -DEXTENDED_NEW_OPTION_INFO \
+       -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\" " \
+       LFLAGS="%{rpmldflags}" \
+       DEBUG="" \
+       VARDB="/var/lib/%{name}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -172,7 +179,7 @@ install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_bindir},%{_mandir}/man{5,8}} \
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/dhcpd.conf
+install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/dhcpd.conf
 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
 
 mv $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3 \
@@ -188,51 +195,37 @@ rm -rf $RPM_BUILD_ROOT
 %post
 /sbin/chkconfig --add dhcpd
 touch /var/lib/%{name}/dhcpd.leases
-
 if [ ! -d /var/lib/dhcp ]; then
        install -d /var/lib/dhcp
 fi
-
-if [ -f /var/lock/subsys/dhcpd ]; then
-       /etc/rc.d/init.d/dhcpd restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
-fi
+%service dhcpd restart "dhcpd daemon"
 
 %preun
 if [ "$1" = "0" ];then
-       if [ -f /var/lock/subsys/dhcpd ]; then
-               /etc/rc.d/init.d/dhcpd stop >&2
-       fi
+       %service dhcpd stop
        /sbin/chkconfig --del dhcpd
 fi
 
 %post client
-if [ -d /var/lib/dhcp ]; then
+if [ -d /var/lib/dhcp ]; then
        install -d /var/lib/dhcp
 fi
 
 %post relay
 /sbin/chkconfig --add dhcp-relay
 if [ -f /var/lock/subsys/dhcrelay ]; then
-       mv -f /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
-fi
-if [ -f /var/lock/subsys/dhcp-relay ]; then
-       /etc/rc.d/init.d/dhcp-relay restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/dhcp-relay start\" to start dhcrelay daemon."
+       mv -f /var/lock/subsys/{dhcrelay,dhcp-relay}
 fi
+%service dhcp-relay restart "dhcrelay daemon"
 
 %preun relay
 if [ "$1" = "0" ];then
-       if [ -f /var/lock/subsys/dhcp-relay ]; then
-               /etc/rc.d/init.d/dhcp-relay stop >&2
-       fi
+       %service dhcp-relay stop
        /sbin/chkconfig --del dhcp-relay
 fi
 
 %triggerpostun -- dhcp < 3.0
-if [ `grep ddns-update-style /etc/dhcpd.conf` = "" ]; then
+if [ "`grep ddns-update-style /etc/dhcpd.conf`" = "" ]; then
        umask 027
        echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
        echo "" >> /etc/dhcpd.conf.tmp
@@ -247,8 +240,8 @@ fi
 %{_mandir}/man1/*
 %{_mandir}/man5/dhcp*
 %{_mandir}/man8/dhcp*
-%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
-%config(noreplace) %verify(not size mtime md5) /etc/dhcpd.conf
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcpd
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd.conf
 %attr(755,root,root) %{_bindir}/*
 %attr(755,root,root) %{_sbindir}/dhcpd
 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
@@ -265,7 +258,7 @@ fi
 %files relay
 %defattr(644,root,root,755)
 %{_mandir}/man8/dhcrelay*
-%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcp-relay
 %attr(755,root,root) %{_sbindir}/dhcrelay
 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
 
This page took 0.035481 seconds and 4 git commands to generate.