[diveintopython] Install to %{_pkgdocdir} where available (#993724).

Ville Skyttä scop at fedoraproject.org
Thu Dec 12 19:19:45 UTC 2013


commit c3381c2d650c719b11faed92ec051c5142778fdd
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Thu Dec 12 21:12:22 2013 +0200

    Install to %{_pkgdocdir} where available (#993724).
    
    - Fix ant(-nodeps) build dependency (#992130).

 diveintopython.spec |   34 ++++++++++++++++++++--------------
 1 files changed, 20 insertions(+), 14 deletions(-)
---
diff --git a/diveintopython.spec b/diveintopython.spec
index 743921f..1089761 100644
--- a/diveintopython.spec
+++ b/diveintopython.spec
@@ -1,6 +1,8 @@
+%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
+
 Name:           diveintopython
 Version:        5.4
-Release:        25%{?dist}
+Release:        26%{?dist}
 
 Summary:        Dive into Python - a python book
 
@@ -17,8 +19,8 @@ Patch0:         diveintopython-build.xml.patch
 Patch1:         diveintopython-build_common.xml.patch
 Patch2:         diveintopython-xalan.patch
 
-BuildRequires:  desktop-file-utils, htmldoc, ant, jakarta-commons-net, ant-commons-net, xerces-j2, xml-commons-apis
-BuildRequires:  python, w3m, java, xalan-j2, ant-nodeps
+BuildRequires:  desktop-file-utils, htmldoc, ant >= 1.8.2, jakarta-commons-net, ant-commons-net, xerces-j2, xml-commons-apis
+BuildRequires:  python, w3m, java, xalan-j2
 
 %description
 Dive Into Python is a Python book for experienced programmers.
@@ -74,15 +76,15 @@ rm -rf pdf/*.png pdf/*.html pdf/images/
 rm -rf txt/*.html
 
 #install the files
-find . -type d -exec mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/'{}'  \;
+find . -type d -exec mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/'{}'  \;
 for DIR in * ; do
-  find $DIR -type f -exec install -D -m 0644 '{}' $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/'{}' \;
+  find $DIR -type f -exec install -D -m 0644 '{}' $RPM_BUILD_ROOT%{_pkgdocdir}/'{}' \;
 done
 popd
 
 #install desktop file
 mkdir ${RPM_BUILD_ROOT}%{_datadir}/applications/
-cat %{SOURCE2}|sed "s|@DOCDIR@|%{_docdir}/%{name}-%{version}/|g" > ${RPM_BUILD_ROOT}%{_datadir}/applications/diveintopython.desktop
+cat %{SOURCE2}|sed "s|@DOCDIR@|%{_pkgdocdir}/|g" > ${RPM_BUILD_ROOT}%{_datadir}/applications/diveintopython.desktop
 
 desktop-file-install  \
         --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
@@ -92,23 +94,27 @@ desktop-file-install  \
 %files 
 
 %files html
-%dir %{_docdir}/%{name}-%{version}
-%doc %{_docdir}/%{name}-%{version}/html
+%dir %{_pkgdocdir}
+%doc %{_pkgdocdir}/html
 
 %files pdf
-%dir %{_docdir}/%{name}-%{version}
-%doc %{_docdir}/%{name}-%{version}/pdf
+%dir %{_pkgdocdir}
+%doc %{_pkgdocdir}/pdf
 %{_datadir}/applications/diveintopython.desktop
 
 %files single-html
-%dir %{_docdir}/%{name}-%{version}
-%doc %{_docdir}/%{name}-%{version}/htmlflat
+%dir %{_pkgdocdir}
+%doc %{_pkgdocdir}/htmlflat
 
 %files txt
-%dir %{_docdir}/%{name}-%{version}
-%doc %{_docdir}/%{name}-%{version}/txt
+%dir %{_pkgdocdir}
+%doc %{_pkgdocdir}/txt
 
 %changelog
+* Thu Dec 12 2013 Ville Skyttä <ville.skytta at iki.fi> - 5.4-26
+- Install to %%{_pkgdocdir} where available (#993724).
+- Fix ant(-nodeps) build dependency (#992130).
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 5.4-25
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list