[sane-backends] move some documentation to devel subpackage (#977103)
Nils Philippsen
nphilipp at fedoraproject.org
Mon Jun 24 09:57:42 UTC 2013
commit 7041f37d8acae84576200d8095f878a5c32a0151
Author: Nils Philippsen <nils at redhat.com>
Date: Mon Jun 24 11:57:01 2013 +0200
move some documentation to devel subpackage (#977103)
sane-backends.spec | 29 ++++++++++++++++++++++++++++-
1 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/sane-backends.spec b/sane-backends.spec
index e628dbb..f2cdfbe 100644
--- a/sane-backends.spec
+++ b/sane-backends.spec
@@ -24,6 +24,9 @@
%define __provides_exclude_from ^%{_libdir}/sane/.*\.so.*$
%define __requires_exclude ^libsane-.*\.so\.[0-9]*(\(\).*)?+$
+%define _maindocdir %{_docdir}/%{name}-%{version}
+%define _develdocdir %{_docdir}/%{name}-devel-%{version}
+
Summary: Scanner access software
Name: sane-backends
Version: 1.0.23
@@ -189,6 +192,26 @@ 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}
+pushd %{buildroot}%{_maindocdir}
+for f in *; do
+ if [ -d "$f" ]; then
+ mv "$f" "%{buildroot}%{_develdocdir}/${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}"
+ ;;
+ *)
+ rm -rf "$f"
+ ;;
+ esac
+ fi
+done
+popd
+
%find_lang %name
%post libs -p /sbin/ldconfig
@@ -196,6 +219,7 @@ install -m 0644 tools/sane-backends.pc %{buildroot}%{_libdir}/pkgconfig/
%files -f %{name}.lang
%defattr(-,root,root)
+%doc %{_maindocdir}
%dir /etc/sane.d
%dir /etc/sane.d/dll.d
%config(noreplace) /etc/sane.d/*.conf
@@ -206,7 +230,6 @@ install -m 0644 tools/sane-backends.pc %{buildroot}%{_libdir}/pkgconfig/
%{_bindir}/scanimage
%{_sbindir}/*
-%doc %{_docdir}/*
%exclude %{_mandir}/man1/sane-config.1*
%{_mandir}/*/*
@@ -218,6 +241,7 @@ install -m 0644 tools/sane-backends.pc %{buildroot}%{_libdir}/pkgconfig/
%files devel
%defattr(-,root,root)
+%doc %{_develdocdir}
%{_bindir}/sane-config
%{_mandir}/man1/sane-config.1*
%{_includedir}/sane
@@ -234,6 +258,9 @@ install -m 0644 tools/sane-backends.pc %{buildroot}%{_libdir}/pkgconfig/
%{_libdir}/sane/*gphoto2.so*
%changelog
+* Mon Jun 24 2013 Nils Philippsen <nils at redhat.com>
+- move some documentation to devel subpackage (#977103)
+
* Thu Jun 13 2013 Nils Philippsen <nils at redhat.com>
- don't ignore libsane-gphoto2.so
More information about the scm-commits
mailing list