]> git.pld-linux.org Git - packages/dhcp.git/blobdiff - dhcp.spec
- rel 3
[packages/dhcp.git] / dhcp.spec
index 5922f78611c59caa26d9e7858aff6c70f5146fa2..1f24e5e6d069cdc60a3705c2353752eba550dcb5 100644 (file)
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -1,26 +1,37 @@
+#
+# Conditional build:
+%bcond_with    ldap    # with support for ldap storage
+#
 Summary:       DHCP Server
 Summary:       DHCP Server
-Summary(es):   Servidor DHCP (Protocolo de configuración dinámica de hosts)
+Summary(es):   Servidor DHCP
 Summary(pl):   Serwer DHCP
 Summary(pt_BR):        Servidor DHCP (Protocolo de configuração dinâmica de hosts)
 Name:          dhcp
 Summary(pl):   Serwer DHCP
 Summary(pt_BR):        Servidor DHCP (Protocolo de configuração dinâmica de hosts)
 Name:          dhcp
-Version:       3.0.1rc11
-Release:       2
-Epoch:         2
-Vendor:                ISC
+Version:       3.0.4
+Release:       3
+Epoch:         3
 License:       distributable
 Group:         Networking/Daemons
 Source0:       ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
 License:       distributable
 Group:         Networking/Daemons
 Source0:       ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
-# Source0-md5: af79b0453ac67fb6824247d3d48fff91
+# Source0-md5: 004ef935fd54b8046b16bdde31a9e151
 Source1:       %{name}.init
 Source2:       %{name}-relay.init
 Source3:       %{name}-relay.sysconfig
 Source4:       %{name}d.conf.sample
 Source5:       %{name}.sysconfig
 Patch0:                %{name}-if_buffer_size.patch
 Source1:       %{name}.init
 Source2:       %{name}-relay.init
 Source3:       %{name}-relay.sysconfig
 Source4:       %{name}d.conf.sample
 Source5:       %{name}.sysconfig
 Patch0:                %{name}-if_buffer_size.patch
+Patch1:                %{name}-ldap.patch
+Patch2:                %{name}-ldap1.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
 BuildRequires: groff
-PreReq:                rc-scripts >= 0.2.0
-Requires(post,preun):  /sbin/chkconfig
+%{?with_ldap:BuildRequires:    openldap-devel}
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post):        fileutils
 Requires(post):        fileutils
+Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts >= 0.2.0
 Provides:      dhcpd
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 Provides:      dhcpd
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -36,8 +47,7 @@ DHCP permite que hosts en una red TCP/IP soliciten y tengan sus
 direcciones IP alocadas dinámicamente, permite también descubrir
 información sobre la red en que están conectados. BOOTP provee una
 funcionalidad similar, con ciertas restricciones. Este servidor
 direcciones IP alocadas dinámicamente, permite también descubrir
 información sobre la red en que están conectados. BOOTP provee una
 funcionalidad similar, con ciertas restricciones. Este servidor
-también las atiende. Esta versión aún está considerada como un
-software BETA.
+también las atiende.
 
 %description -l pl
 Serwer DHCP (Dynamic Host Configuration Protocol).
 
 %description -l pl
 Serwer DHCP (Dynamic Host Configuration Protocol).
@@ -60,6 +70,7 @@ Summary:      DHCP Client
 Summary(pl):   Klient DHCP
 Group:         Networking/Daemons
 Requires(post):        fileutils
 Summary(pl):   Klient DHCP
 Group:         Networking/Daemons
 Requires(post):        fileutils
+Obsoletes:     dhclient
 Obsoletes:     pump
 
 %description client
 Obsoletes:     pump
 
 %description client
@@ -72,9 +83,9 @@ Klient DHCP (Dynamic Host Configuration Protocol).
 Summary:       DHCP Relay Agent
 Summary(pl):   Agent przekazywania informacji DHCP
 Group:         Networking/Daemons
 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):        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
 
 %description relay
 Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
@@ -117,6 +128,11 @@ komunikacji z dzia
 %setup -q
 install %{SOURCE4} .
 %patch0 -p1
 %setup -q
 install %{SOURCE4} .
 %patch0 -p1
+%{?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
 
 cd doc
 echo "dhcpd complies with the following RFCs:" > rfc-compliance
@@ -129,10 +145,15 @@ cd ..
 #         do not change it to %%configure
 ./configure
 
 #         do not change it to %%configure
 ./configure
 
-%{__make} COPTS="%{rpmcflags} \
+%{__make} \
+       CC="%{__cc}" \
+       CC_OPTIONS="%{rpmcflags} \
        -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
        -D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
-       -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\"" \
-       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
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -140,24 +161,25 @@ install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_bindir},%{_mandir}/man{5,8}} \
        $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
 
 %{__make} install \
        $RPM_BUILD_ROOT{/var/lib/%{name},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
 
 %{__make} install \
-       DESTDIR="$RPM_BUILD_ROOT" \
-       CLIENTBINDIR="/sbin" \
-       BINDIR="%{_sbindir}" \
-       LIBDIR="%{_libdir}" \
-       INCDIR="%{_includedir}" \
-       ADMMANDIR="%{_mandir}/man8" \
+       DESTDIR=$RPM_BUILD_ROOT \
+       CLIENTBINDIR=/sbin \
+       BINDIR=%{_sbindir} \
+       LIBDIR=%{_libdir} \
+       INCDIR=%{_includedir} \
+       ADMMANDIR=%{_mandir}/man8 \
        ADMMANEXT=.8 \
        ADMMANEXT=.8 \
-       FFMANDIR="%{_mandir}/man5" \
-       LIBMANDIR="%{_mandir}/man3" \
+       FFMANDIR=%{_mandir}/man5 \
+       LIBMANDIR=%{_mandir}/man3 \
        LIBMANEXT=.3 \
        LIBMANEXT=.3 \
-       USRMANDIR="%{_mandir}/man1" \
+       USRMANDIR=%{_mandir}/man1 \
        USRMANEXT=.1 \
        USRMANEXT=.1 \
-       VARDB="/var/lib/%{name}" \
+       VARDB=/var/lib/%{name} \
        FFMANEXT=.5
 
 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
        FFMANEXT=.5
 
 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%{_sysconfdir}/dhcpd.conf
 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
 
 mv $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3 \
 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
 
 mv $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3 \
@@ -173,51 +195,37 @@ rm -rf $RPM_BUILD_ROOT
 %post
 /sbin/chkconfig --add dhcpd
 touch /var/lib/%{name}/dhcpd.leases
 %post
 /sbin/chkconfig --add dhcpd
 touch /var/lib/%{name}/dhcpd.leases
-
 if [ ! -d /var/lib/dhcp ]; then
        install -d /var/lib/dhcp
 fi
 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
 
 %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
        /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
        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
 fi
+%service dhcp-relay restart "dhcrelay daemon"
 
 %preun relay
 if [ "$1" = "0" ];then
 
 %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
        /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
        umask 027
        echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
        echo "" >> /etc/dhcpd.conf.tmp
@@ -228,10 +236,12 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc doc/* README RELNOTES dhcpd.conf.sample
 %files
 %defattr(644,root,root,755)
 %doc doc/* README RELNOTES dhcpd.conf.sample
+%{?with_ldap:%doc contrib/*}
 %{_mandir}/man1/*
 %{_mandir}/man5/dhcp*
 %{_mandir}/man8/dhcp*
 %{_mandir}/man1/*
 %{_mandir}/man5/dhcp*
 %{_mandir}/man8/dhcp*
-%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
+%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
 %attr(755,root,root) %{_bindir}/*
 %attr(755,root,root) %{_sbindir}/dhcpd
 %attr(754,root,root) /etc/rc.d/init.d/dhcpd
@@ -248,7 +258,7 @@ fi
 %files relay
 %defattr(644,root,root,755)
 %{_mandir}/man8/dhcrelay*
 %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
 
 %attr(755,root,root) %{_sbindir}/dhcrelay
 %attr(754,root,root) /etc/rc.d/init.d/dhcp-relay
 
This page took 0.073777 seconds and 4 git commands to generate.