[publican] Fix paths to docs when doc dir is unversioned. BZ #994053

Ville Skyttä scop at fedoraproject.org
Thu Oct 24 21:16:03 UTC 2013


commit 04aa159f81c287b960fabe4e4130f697ad750b47
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri Oct 25 00:16:06 2013 +0300

    Fix paths to docs when doc dir is unversioned. BZ #994053

 publican.spec |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/publican.spec b/publican.spec
index ee4da30..58c8e25 100644
--- a/publican.spec
+++ b/publican.spec
@@ -22,7 +22,7 @@
 
 Name:           publican
 Version:        3.2.1
-Release:        0%{?dist}
+Release:        1%{?dist}
 Summary:        Common files and scripts for publishing with DocBook XML
 # For a breakdown of the licensing, refer to LICENSE
 License:        (GPLv2+ or Artistic) and CC0
@@ -194,6 +194,7 @@ Website style for common brand for DocBook5 content
 
 %prep
 %setup -q -n Publican-v%{version}
+%{?_docdir_fmt:%{__perl} -pi -e 's|/publican-\$VERSION|/publican|' bin/publican}
 
 %build
 %{__perl} Build.PL installdirs=vendor --nocolours=1
@@ -211,8 +212,8 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
 
 %{_fixperms} $RPM_BUILD_ROOT/*
 
-sed -i -e 's|@@FILE@@|%{_docdir}/%{name}-doc-%{version}/en-US/index.html|' %{name}.desktop
-sed -i -e 's|@@ICON@@|%{_docdir}/%{name}-doc-%{version}/en-US/images/icon.svg|' %{name}.desktop
+sed -i -e 's|@@FILE@@|%{_docdir}/%{name}-doc%{!?_docdir_fmt:-%{version}}/en-US/index.html|' %{name}.desktop
+sed -i -e 's|@@ICON@@|%{_docdir}/%{name}-doc%{!?_docdir_fmt:-%{version}}/en-US/images/icon.svg|' %{name}.desktop
 
 desktop-file-install \
 %if 0%{?with_desktop_vendor_tag}
@@ -291,6 +292,9 @@ rm -rf $RPM_BUILD_ROOT
 %{wwwdir}/common-db5
 
 %changelog
+* Thu Oct 24 2013 Ville Skyttä <ville.skytta at iki.fi> - 3.2.1-1
+- Fix paths to docs when doc dir is unversioned. BZ #994053
+
 * Wed Sep 04 2013 Jeff Fearn <jfearn at redhat.com> 3.2.1-0
 - Fix empty images dir causing packaging fail. BZ #996349
 - Fix draft background being in front. BZ #996361


More information about the scm-commits mailing list