[gammaray] Add a CMake patch to be able to override libexec installation destination

Daniel Vrátil dvratil at fedoraproject.org
Thu Jan 23 13:34:17 UTC 2014


commit 3d75bfc05dc0f05a00516f573b8ea4cd62cd8831
Author: Dan Vrátil <dvratil at redhat.com>
Date:   Thu Jan 23 14:34:04 2014 +0100

    Add a CMake patch to be able to override libexec installation destination

 gammaray-libexec-install-dir-fix.patch |   19 +++++++++++++++++++
 gammaray.spec                          |   21 ++++++++++++++++-----
 2 files changed, 35 insertions(+), 5 deletions(-)
---
diff --git a/gammaray-libexec-install-dir-fix.patch b/gammaray-libexec-install-dir-fix.patch
new file mode 100644
index 0000000..c7a92dc
--- /dev/null
+++ b/gammaray-libexec-install-dir-fix.patch
@@ -0,0 +1,19 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bdffd69..b7f2bc5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -259,8 +259,12 @@ if(WIN32)
+   set(PLUGIN_INSTALL_DIR "plugins")
+   set(LIBEXEC_INSTALL_DIR "${BIN_INSTALL_DIR}")
+ else()
+-  set(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/gammaray")
+-  set(LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/gammaray/libexec")
++  if (NOT PLUGIN_INSTALL_DIR)
++    set(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/gammaray")
++  endif()
++  if(NOT LIBEXEC_INSTALL_DIR)
++    set(LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/gammaray/libexec")
++  endif()
+ endif()
+ if(UNIX AND NOT APPLE)
+   set(DOC_INSTALL_DIR share/doc/gammaray/)
diff --git a/gammaray.spec b/gammaray.spec
index 5a87b5e..083ced4 100644
--- a/gammaray.spec
+++ b/gammaray.spec
@@ -12,6 +12,9 @@ URL:            http://www.kdab.com/kdab-products/gammaray/
 Source0:        gammaray-%{version}.tar.gz
 Source1:        http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-%{qt_version}.tar.gz
 
+# https://github.com/KDAB/GammaRay/issues/69
+Patch0:         gammaray-libexec-install-dir-fix.patch
+
 BuildRequires:  qt-devel%{?_isa} = 1:%qt_version
 BuildRequires:  qt-devel-private = 1:%qt_version
 BuildRequires:  qtwebkit-devel
@@ -57,13 +60,17 @@ This package includes developer documentation in HTML format.
 %prep
 %setup -q -b 1 -n GammaRay-%{version}
 
+
+%patch0 -p 1 -b .cmake-libexec
+
 %build
 mkdir -p %{_target_platform}
 pushd %{_target_platform}
 %cmake .. \
         -DQT_PRIVATE_INCLUDE_DIR=%{_builddir}/qt-everywhere-opensource-src-%{qt_version}/include/QtCore \
         -DGAMMARAY_ENFORCE_QT4_BUILD:BOOL=ON \
-        -DVTK_DIR=%{_libdir}/cmake/vtk
+        -DVTK_DIR=%{_libdir}/cmake/vtk \
+        -DLIBEXEC_INSTALL_DIR=libexec
 popd
 make %{?_smp_mflags} -C %{_target_platform}
 make docs -C %{_target_platform}
@@ -80,9 +87,10 @@ cp %{_builddir}/GammaRay-%{version}/{License.txt,ReadMe.txt} %{buildroot}/%{_doc
 
 %files
 %{_bindir}/gammaray
-%{_qt4_libdir}/*.so
-%{_qt4_plugindir}/styles/*.so
-%{_qt4_plugindir}/gammaray
+%{_libexecdir}/gammaray-client
+%{_libexecdir}/gammaray-launcher
+%{_qt4_libdir}/libgammaray_*.so
+%{_qt4_libdir}/gammaray
 %{_datadir}/applications/GammaRay.desktop
 %{_datadir}/icons/hicolor/*/apps/GammaRay.png
 %{_mandir}/man1/gammaray.1.gz
@@ -90,18 +98,21 @@ cp %{_builddir}/GammaRay-%{version}/{License.txt,ReadMe.txt} %{buildroot}/%{_doc
 
 %files devel
 %{_includedir}/gammaray
+%{_libdir}/libgammaray_*.so.*
+%{_libdir}/cmake/GammaRay/
 
 %files doc
 %{_docdir}/gammaray/*.txt
 %{_docdir}/gammaray/html/
 
 %changelog
-* Wed Jan 22 2014 Daniel Vrátil <dvratil at redhat.com> - 2.0.0-1
+* Wed Jan 23 2014 Daniel Vrátil <dvratil at redhat.com> - 2.0.0-1
 - GammaRay 2.0.0
 - require specific version of Qt
 - point CMake to VTK dir
 - enforce Qt 4 build (GammaRay automatically switches to Qt 5 build when it finds it installed)
 - remove rpath workaround
+- fix installation destination of libexec binaries
 
 * Thu Jan 02 2014 Daniel Vrátil <dvratil at redhat.com> - 1.3.2-2
 - Rebuilt against new VTK


More information about the scm-commits mailing list