[cutter] Fix doc paths in man pages when doc dir is unversioned (#993715).

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


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

    Fix doc paths in man pages when doc dir is unversioned (#993715).

 cutter.spec |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/cutter.spec b/cutter.spec
index 2fd034a..8bd6482 100644
--- a/cutter.spec
+++ b/cutter.spec
@@ -1,9 +1,10 @@
 %global __provides_exclude_from ^%{_libdir}/%{name}/module/.*\\.so$
+%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
 
 Summary: Unit Testing Framework for C/C++
 Name: cutter
 Version: 1.2.2
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: LGPLv3+
 URL: http://cutter.sourceforge.net/
 Group: Development/Libraries
@@ -71,6 +72,9 @@ Cutter provides easy to write test and easy to debug code environment.
 #rm -fr glib-compatible/pcre/*.{c,h}
 %patch0 -p1
 %patch1 -p1
+# replace to proper directory
+sed -i 's|/usr/local/share/doc/cutter|%{_pkgdocdir}|g' doc/cutter.man
+sed -i 's|/usr/local/share/doc/cutter/ja|%{_pkgdocdir}|g' doc/cutter.jman
 
 %build
 autoconf
@@ -81,9 +85,6 @@ sed -i -e 's| -shared | -Wl,--as-needed\0|g' libtool
 V=1 make %{?_smp_mflags}
 
 %install
-# replace to proper directory
-sed -i 's|/usr/local/share/doc/cutter|%{_defaultdocdir}/%{name}-%{version}|g' doc/cutter.man
-sed -i "s|/usr/local/share/doc/cutter/ja|%{_defaultdocdir}/%{name}-%{version}|g" doc/cutter.jman
 make install DESTDIR=%{buildroot}
 # remove needless config directory of sample. this one will be generated by autogen.sh.
 # already fixed in upstream.
@@ -155,6 +156,9 @@ make check LD_LIBRARY_PATH=$(pwd)/cppcutter/.libs:$(pwd)/cutter/.libs:$(pwd)/gdk
 %{_libdir}/gstreamer-0.10/libgstcuttertest.so
 
 %changelog
+* Thu Dec 12 2013 Ville Skyttä <ville.skytta at iki.fi> - 1.2.2-6
+- Fix doc paths in man pages when doc dir is unversioned (#993715).
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.2-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list