[argtable] Install doc to %{_pkgdocdir} where available (#993671).

Ville Skyttä scop at fedoraproject.org
Fri Dec 13 22:17:03 UTC 2013


commit c2d7aed67c0f0b74991993eb3687639ee284fdac
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Dec 14 00:17:01 2013 +0200

    Install doc to %{_pkgdocdir} where available (#993671).
    
    - Don't duplicate docs in main and -devel.

 argtable.spec |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/argtable.spec b/argtable.spec
index 148500d..c29c22f 100644
--- a/argtable.spec
+++ b/argtable.spec
@@ -1,7 +1,9 @@
+%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
+
 Summary: Cross platform C library for parsing GNU style command line arguments
 Name: argtable
 Version: 2.13
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: LGPLv2+
 Url: http://argtable.sourceforge.net/
 Source: http://prdownloads.sourceforge.net/argtable/%{name}2-13.tar.gz
@@ -30,15 +32,20 @@ Header and development files for using argtable
 %setup -q -n %{name}2-13
 
 %build
-%configure --disable-static --docdir=%{_docdir}/%{name}-%{version}
+%configure --disable-static --docdir=%{_pkgdocdir}
 make %{?_smp_mflags} 
 
 %install
 make DESTDIR=${RPM_BUILD_ROOT} install
 rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.la
+install -pm 644 AUTHORS ChangeLog COPYING README ${RPM_BUILD_ROOT}%{_pkgdocdir}
 
-%files 
-%doc README COPYING AUTHORS ChangeLog
+%files
+%dir %{_pkgdocdir}
+%{_pkgdocdir}/AUTHORS
+%{_pkgdocdir}/ChangeLog
+%{_pkgdocdir}/COPYING
+%{_pkgdocdir}/README
 %{_libdir}/libargtable2.so.*
 
 %files devel
@@ -47,13 +54,21 @@ rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.la
 %{_libdir}/pkgconfig/argtable2.pc
 
 %doc %{_mandir}/man3/*
-%doc %{_docdir}/%{name}-%{version}
+%{_pkgdocdir}/*
+%exclude %{_pkgdocdir}/AUTHORS
+%exclude %{_pkgdocdir}/ChangeLog
+%exclude %{_pkgdocdir}/COPYING
+%exclude %{_pkgdocdir}/README
 
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
 
 %changelog
+* Fri Dec 13 2013 Ville Skyttä <ville.skytta at iki.fi> - 2.13-5
+- Install doc to %%{_pkgdocdir} where available (#993671).
+- Don't duplicate docs in main and -devel.
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.13-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list