split off devel-docs subpackage to make package multi-lib compliant

(#477807) let devel package require correct arch of base package
This commit is contained in:
Nils Philippsen 2010-06-14 12:52:39 +00:00
parent 3dd3002e28
commit d06ca402f3

View File

@ -1,7 +1,7 @@
Summary: A dynamic, any to any, pixel format conversion library
Name: babl
Version: 0.1.2
Release: 1%{?dist}
Release: 2%{?dist}
# The gggl codes contained in this package are under the GPL, with exceptions allowing their use under libraries covered under the LGPL
License: LGPLv3+ and GPLv3+
Group: System Environment/Libraries
@ -10,6 +10,8 @@ Source0: ftp://ftp.gtk.org/pub/babl/0.1/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: librsvg2 w3m
%global develdocdir %{_docdir}/%{name}-devel-%{version}/html
%description
Babl is a dynamic, any to any, pixel format conversion library. It
provides conversions between the myriad of buffer types images can be
@ -19,13 +21,28 @@ facilitates creation of new and uncommon ones.
%package devel
Summary: Headers for developing programs that will use %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
# Split off devel docs from 0.1.2-2 on
Obsoletes: %{name}-devel < 0.1.2-2%{?dist}
Conflicts: %{name}-devel < 0.1.2-2%{?dist}
%description devel
This package contains the libraries and header files needed for
developing with %{name}.
%package devel-docs
Summary: Documentation for developing programs that will use %{name}
Group: Documentation
BuildArch: noarch
Requires: %{name}-devel = %{version}-%{release}
# Split off devel docs from 0.1.2-2 on
Obsoletes: %{name}-devel < 0.1.2-2%{?dist}
Conflicts: %{name}-devel < 0.1.2-2%{?dist}
%description devel-docs
This package contains documentation needed for developing with %{name}.
%prep
%setup -q
@ -33,20 +50,17 @@ developing with %{name}.
%configure --disable-static
make V=1 %{?_smp_mflags}
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install INSTALL='install -p'
mkdir -p babl_docs babl_docs/html
cp -pr docs/graphics docs/*.html docs/babl.css babl_docs/html
rm -rf babl_docs/html/graphics/Makefile*
mkdir -p "%{buildroot}/%{develdocdir}"
cp -pr docs/graphics docs/*.html docs/babl.css "%{buildroot}/%{develdocdir}"
rm -rf "%{buildroot}/%{develdocdir}"/graphics/Makefile*
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
# fix timestamps for multilib
touch -m --reference=docs/Makefile.am babl_docs/html{,/graphics}/*
%check
make check
@ -65,12 +79,19 @@ rm -rf %{buildroot}
%files devel
%defattr(-, root, root, -)
%doc babl_docs/html
%{_includedir}/babl-0.1/
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc
%files devel-docs
%defattr(-, root, root, -)
%doc %{develdocdir}
%changelog
* Mon Jun 14 2010 Nils Philippsen <nils@redhat.com> - 0.1.2-2
- split off devel-docs subpackage to make package multi-lib compliant (#477807)
- let devel package require correct arch of base package
* Thu Jan 21 2010 Deji Akingunola <dakingun@gmail.com> - 0.1.2-1
- Update to 0.1.2