Accepting request 70094 from network:dhcp

fixed dependencies / conditionals

OBS-URL: https://build.opensuse.org/request/show/70094
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dhcp?expand=0&rev=57
This commit is contained in:
Sascha Peilicke 2011-05-16 09:17:11 +00:00 committed by Git OBS Bridge
commit 84c5e19b69
2 changed files with 50 additions and 20 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu May 12 08:39:03 UTC 2011 - mt@suse.de
- Removed obsolete sles8 compatibility dependencies, fixed
to avoid non-functional sles_version conditionals.
-------------------------------------------------------------------
Tue May 10 11:48:57 UTC 2011 - mt@suse.de
- Fixed to not introduce separate dhcp-doc package on sles,
use versioned provides/obsoletes, improved conditionals.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 3 12:27:08 UTC 2011 - mt@suse.de Tue May 3 12:27:08 UTC 2011 - mt@suse.de

View File

@ -21,12 +21,16 @@
%define susefw2dir %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services %define susefw2dir %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
%define omc_prefix /usr/share/omc %define omc_prefix /usr/share/omc
%define omc_svcdir %{omc_prefix}/svcinfo.d %define omc_svcdir %{omc_prefix}/svcinfo.d
# always on
%define with_ldap 1 %define with_ldap 1
%define with_ldapcasa 0%{?sles_version} > 0 # on sles, but sles_version is gone
%define with_ldapcasa 0%{?sles_version} >= 10 || (%suse_version >= 1110 && %suse_version < 1140)
# doc package is new on 11.3
%define with_doc_package %suse_version >= 1130
Name: dhcp Name: dhcp
%if 0%{?with_ldap} %if %{with_ldap}
%if 0%{?with_ldapcasa} %if %{with_ldapcasa}
BuildRequires: CASA-devel BuildRequires: CASA-devel
%endif %endif
BuildRequires: openldap2-devel BuildRequires: openldap2-devel
@ -86,6 +90,8 @@ Patch45: dhcp-4.2.1-P1-dhclient-option-checks.bnc675052.diff
## ##
PreReq: /bin/touch /sbin/chkconfig sysconfig PreReq: /bin/touch /sbin/chkconfig sysconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: dhcp = %{version}
Obsoletes: dhcp < %{version}
%package server %package server
License: BSD3c(or similar) License: BSD3c(or similar)
@ -93,7 +99,8 @@ Summary: ISC DHCP Server
Group: Productivity/Networking/Boot/Servers Group: Productivity/Networking/Boot/Servers
Requires: net-tools dhcp = %{version} Requires: net-tools dhcp = %{version}
PreReq: %insserv_prereq %fillup_prereq /bin/cat /bin/mkdir /bin/cp /usr/sbin/useradd PreReq: %insserv_prereq %fillup_prereq /bin/cat /bin/mkdir /bin/cp /usr/sbin/useradd
Provides: dhcp_server dhcp_server6 Provides: dhcp-server = %{version}, dhcp_server, dhcp_server6
Obsoletes: dhcp-server < %{version}
AutoReqProv: on AutoReqProv: on
%package client %package client
@ -102,7 +109,8 @@ Summary: ISC DHCP Client
Group: Productivity/Networking/Boot/Clients Group: Productivity/Networking/Boot/Clients
Requires: net-tools dhcp = %{version} /sbin/arping /usr/bin/host Requires: net-tools dhcp = %{version} /sbin/arping /usr/bin/host
PreReq: %insserv_prereq %fillup_prereq /bin/cat /bin/mkdir /bin/cp /bin/grep PreReq: %insserv_prereq %fillup_prereq /bin/cat /bin/mkdir /bin/cp /bin/grep
Provides: dhcp_client dhcp_client6 Provides: dhcp-client = %{version}, dhclient = %{version}, dhcp_client, dhcp_client6
Obsoletes: dhcp-client < %{version}, dhclient < %{version}
AutoReqProv: on AutoReqProv: on
%package relay %package relay
@ -111,7 +119,8 @@ Summary: ISC DHCP Relay Agent
Group: Productivity/Networking/Boot/Servers Group: Productivity/Networking/Boot/Servers
Requires: net-tools dhcp = %{version} Requires: net-tools dhcp = %{version}
PreReq: %insserv_prereq %fillup_prereq /bin/cat /bin/mkdir /bin/cp PreReq: %insserv_prereq %fillup_prereq /bin/cat /bin/mkdir /bin/cp
Provides: dhcp_relay dhcp_relay6 Provides: dhcp-relay = %{version}, dhcrelay = %{version}, dhcp_relay, dhcp_relay6
Obsoletes: dhcp-relay < %{version}, dhcrelay < %{version}
AutoReqProv: on AutoReqProv: on
%package devel %package devel
@ -119,11 +128,17 @@ License: BSD3c(or similar)
Summary: Header Files and Libraries for dhcpctl API Summary: Header Files and Libraries for dhcpctl API
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: dhcp = %{version} Requires: dhcp = %{version}
Provides: dhcp-devel = %{version}
Obsoletes: dhcp-devel < %{version}
%if %{with_doc_package}
%package doc %package doc
License: BSD3c(or similar) License: BSD3c(or similar)
Summary: Documentation Summary: Documentation
Group: Productivity/Networking/Boot/Servers Group: Productivity/Networking/Boot/Servers
Provides: dhcp-doc = %{version}
Obsoletes: dhcp-doc < %{version}
%endif
%description %description
This package contains common programs used by both the ISC DHCP This package contains common programs used by both the ISC DHCP
@ -172,6 +187,7 @@ Authors:
-------- --------
Internet Systems Consortium, Inc. <info@isc.org> Internet Systems Consortium, Inc. <info@isc.org>
%if %{with_doc_package}
%description doc %description doc
This package contains additional documentation files provided with This package contains additional documentation files provided with
the software. The manual pages are in the corresponding packages. the software. The manual pages are in the corresponding packages.
@ -180,6 +196,7 @@ Authors:
-------- --------
Internet Systems Consortium, Inc. <info@isc.org> Internet Systems Consortium, Inc. <info@isc.org>
%endif
%description devel %description devel
This package contains all of the libraries and headers for developing This package contains all of the libraries and headers for developing
@ -201,7 +218,7 @@ Authors:
%patch15 -p0 %patch15 -p0
%patch20 -p1 %patch20 -p1
%patch21 -p1 %patch21 -p1
%if 0%{?with_ldap} %if %{with_ldap}
%patch30 -p1 %patch30 -p1
%endif %endif
%patch40 -p1 %patch40 -p1
@ -238,10 +255,10 @@ autoreconf
--enable-failover \ --enable-failover \
--enable-paranoia \ --enable-paranoia \
--enable-early-chroot \ --enable-early-chroot \
%if 0%{?with_ldap} %if %{with_ldap}
--with-ldap \ --with-ldap \
--with-ldapcrypto \ --with-ldapcrypto \
%if 0%{with_ldapcasa} %if %{with_ldapcasa}
--with-ldapcasa \ --with-ldapcasa \
%endif %endif
%endif %endif
@ -277,7 +294,7 @@ install -d -m0755 $RPM_BUILD_ROOT/sbin
install -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/init.d install -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/init.d
install -d -m0755 $RPM_BUILD_ROOT/%{susefw2dir} install -d -m0755 $RPM_BUILD_ROOT/%{susefw2dir}
install -d -m0755 $RPM_BUILD_ROOT/%{omc_svcdir} install -d -m0755 $RPM_BUILD_ROOT/%{omc_svcdir}
%if 0%{?with_ldap} %if %{with_ldap}
install -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema install -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema
%endif %endif
install -d -m0755 $RPM_BUILD_ROOT%{_localstatedir}/run install -d -m0755 $RPM_BUILD_ROOT%{_localstatedir}/run
@ -325,7 +342,7 @@ install -m0644 $RPM_SOURCE_DIR/sysconfig.syslog-dhcpd \
install -m0644 $RPM_SOURCE_DIR/sysconfig.dhcrelay \ install -m0644 $RPM_SOURCE_DIR/sysconfig.dhcrelay \
$RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/ $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/
# another config files and scripts # another config files and scripts
%if 0%{?with_ldap} %if %{with_ldap}
install -m0644 contrib/ldap/dhcp.schema \ install -m0644 contrib/ldap/dhcp.schema \
$RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema $RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema
%endif %endif
@ -415,13 +432,6 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi
%doc %{_mandir}/man5/dhcp-eval.5.gz %doc %{_mandir}/man5/dhcp-eval.5.gz
%doc %{_mandir}/man5/dhcp-options.5.gz %doc %{_mandir}/man5/dhcp-options.5.gz
%files doc
%defattr(-,root,root)
%doc LICENSE README RELNOTES
%doc LIESMICH.* README.*
%doc DDNS-howto.txt doc/*
%doc contrib examples
%files server %files server
%defattr(-,root,root) %defattr(-,root,root)
%{_sbindir}/dhcpd %{_sbindir}/dhcpd
@ -449,7 +459,7 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi
%doc %{_mandir}/man8/dhcpd.8.gz %doc %{_mandir}/man8/dhcpd.8.gz
%doc %{_mandir}/man5/dhcpd.conf.5.gz %doc %{_mandir}/man5/dhcpd.conf.5.gz
%doc %{_mandir}/man5/dhcpd.leases.5.gz %doc %{_mandir}/man5/dhcpd.leases.5.gz
%if 0%{?with_ldap} %if %{with_ldap}
%dir %{_sysconfdir}/openldap %dir %{_sysconfdir}/openldap
%dir %{_sysconfdir}/openldap/schema %dir %{_sysconfdir}/openldap/schema
%attr(0644, root, root) %config %{_sysconfdir}/openldap/schema/dhcp.schema %attr(0644, root, root) %config %{_sysconfdir}/openldap/schema/dhcp.schema
@ -460,6 +470,14 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi
%{_sysconfdir}/sysconfig/network/if-up.d/60-dhcpd-restart-hook %{_sysconfdir}/sysconfig/network/if-up.d/60-dhcpd-restart-hook
%{_localstatedir}/adm/fillup-templates/sysconfig.dhcpd %{_localstatedir}/adm/fillup-templates/sysconfig.dhcpd
%{_localstatedir}/adm/fillup-templates/sysconfig.syslog-dhcpd %{_localstatedir}/adm/fillup-templates/sysconfig.syslog-dhcpd
%if %{with_doc_package}
%files doc
%defattr(-,root,root)
%endif
%doc LICENSE README RELNOTES
%doc LIESMICH.* README.*
%doc DDNS-howto.txt doc/*
%doc contrib examples
%files client %files client
%defattr(-,root,root) %defattr(-,root,root)