move documentation into separate doc subpackage (#977653)

This commit is contained in:
Nils Philippsen 2013-06-25 11:56:10 +02:00
parent 76d415bcb0
commit 2d873990c1

View File

@ -25,7 +25,7 @@
%define __requires_exclude ^libsane-.*\.so\.[0-9]*(\(\).*)?+$
%define _maindocdir %{_docdir}/%{name}-%{version}
%define _develdocdir %{_docdir}/%{name}-devel-%{version}
%define _docdocdir %{_docdir}/%{name}-doc-%{version}
Summary: Scanner access software
Name: sane-backends
@ -76,8 +76,8 @@ Requires: systemd >= 183
Requires: udev >= 143
%endif
Requires: sane-backends-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: sane-backends < 1.0.22-4
Conflicts: sane-backends < 1.0.22-4
Obsoletes: sane-backends < 1.0.23-10
Conflicts: sane-backends < 1.0.23-10
Obsoletes: sane-backends-docs <= 1.0.17-12
Provides: sane-backends-docs = %{?epoch:%{epoch}:}%{version}-%{release}
@ -87,6 +87,16 @@ SANE application programming interface (API) provides standardized
access to any raster image scanner hardware (flatbed scanner,
hand-held scanner, video and still cameras, frame-grabbers, etc.).
%package doc
Summary: SANE backends documentation
Group: Documentation
BuildArch: noarch
Obsoletes: sane-backends < 1.0.23-10
Conflicts: sane-backends < 1.0.23-10
%description doc
This package contains documentation for SANE backends.
%package libs
Summary: SANE libraries
Group: System Environment/Libraries
@ -192,17 +202,17 @@ install -m 0644 tools/udev/libsane.rules %{buildroot}%{udevrulesdir}/65-libsane.
mkdir -p %{buildroot}%{_libdir}/pkgconfig
install -m 0644 tools/sane-backends.pc %{buildroot}%{_libdir}/pkgconfig/
mkdir %{buildroot}%{_develdocdir}
mkdir %{buildroot}%{_docdocdir}
pushd %{buildroot}%{_maindocdir}
for f in *; do
if [ -d "$f" ]; then
mv "$f" "%{buildroot}%{_develdocdir}/${f}"
mv "$f" "%{buildroot}%{_docdocdir}/${f}"
else
case "$f" in
AUTHORS|ChangeLog|COPYING|LICENSE|NEWS|PROBLEMS|README|README.linux)
;;
backend-writing.txt|PROJECTS|sane-*.html)
mv "$f" "%{buildroot}%{_develdocdir}/${f}"
mv "$f" "%{buildroot}%{_docdocdir}/${f}"
;;
*)
rm -rf "$f"
@ -235,13 +245,16 @@ popd
%dir %{_libdir}/sane
%files doc
%defattr(-, root, root)
%doc %{_docdocdir}
%files libs
%defattr(-, root, root)
%{_libdir}/libsane*.so.*
%files devel
%defattr(-,root,root)
%doc %{_develdocdir}
%{_bindir}/sane-config
%{_mandir}/man1/sane-config.1*
%{_includedir}/sane
@ -258,6 +271,9 @@ popd
%{_libdir}/sane/*gphoto2.so*
%changelog
* Tue Jun 25 2013 Nils Philippsen <nils@redhat.com>
- move documentation into separate doc subpackage (#977653)
* Mon Jun 24 2013 Nils Philippsen <nils@redhat.com> - 1.0.23-10
- move some documentation to devel subpackage (#977103)