From f1cc7a7d3017cd53f6781a23b91503c761a564ce Mon Sep 17 00:00:00 2001
From: Rich Mattes <richmattes(a)gmail.com>
Date: Tue, 26 Jan 2016 18:12:56 -0500
Subject: Add missing Requires to devel sub-package (rhbz#1300055)
- Move CeresConfig.cmake to arch-dependent path
---
ceres-solver-1.11.0-cmakedir.patch | 12 ++++++++++++
ceres-solver.spec | 18 ++++++++++++++----
2 files changed, 26 insertions(+), 4 deletions(-)
create mode 100644 ceres-solver-1.11.0-cmakedir.patch
diff --git a/ceres-solver-1.11.0-cmakedir.patch b/ceres-solver-1.11.0-cmakedir.patch
new file mode 100644
index 0000000..9f08241
--- /dev/null
+++ b/ceres-solver-1.11.0-cmakedir.patch
@@ -0,0 +1,12 @@
+diff -up ./CMakeLists.txt.cmakedir ./CMakeLists.txt
+--- ./CMakeLists.txt.cmakedir 2016-01-25 18:18:59.046642680 -0500
++++ ./CMakeLists.txt 2016-01-25 18:23:13.570995786 -0500
+@@ -762,7 +762,7 @@ configure_file("${CMAKE_SOURCE_DIR}/cmak
+ if (WIN32)
+ set(RELATIVE_CMAKECONFIG_INSTALL_DIR CMake)
+ else ()
+- set(RELATIVE_CMAKECONFIG_INSTALL_DIR share/Ceres)
++ set(RELATIVE_CMAKECONFIG_INSTALL_DIR lib${LIB_SUFFIX}/cmake/Ceres)
+ endif ()
+
+ # This "exports" for installation all targets which have been put into the
diff --git a/ceres-solver.spec b/ceres-solver.spec
index 995f23a..a79dfeb 100644
--- a/ceres-solver.spec
+++ b/ceres-solver.spec
@@ -3,7 +3,7 @@ Version: 1.11.0
# Release candidate versions are messy. Give them a release of
# e.g. "0.1.0%{?dist}" for RC1 (and remember to adjust the Source0
# URL). Non-RC releases go back to incrementing integers starting at 1.
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A non-linear least squares minimizer
Group: Development/Libraries
@@ -11,7 +11,10 @@ License: BSD
URL:
http://ceres-solver.org/
Source0: http://%{name}.org/%{name}-%{version}.tar.gz
-
+# Patch to install cmake configuration to libdir/cmake/Ceres instead of
+# share/Ceres
+# Not yet submitted upstream.
+Patch0: %{name}-1.11.0-cmakedir.patch
# Exclude ppc64 because suitesparse is not available on ppc64
#
https://lists.fedoraproject.org/pipermail/epel-devel/2015-May/011193.html
ExcludeArch: ppc64
@@ -77,6 +80,8 @@ Features include:
Summary: A non-linear least squares minimizer
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: eigen3-devel
+Requires: glog-devel
%description devel
The %{name}-devel package contains libraries and header files for
@@ -85,6 +90,7 @@ developing applications that use %{name}.
%prep
%setup -q
+%patch0 -p1 -b .cmakedir
%build
mkdir build
@@ -125,11 +131,15 @@ CTEST_OUTPUT_ON_FAILURE=1 make -C build test
%files devel
%{_includedir}/*
%{_libdir}/*.so
-%dir %{_datadir}/Ceres
-%{_datadir}/Ceres/*.cmake
+%dir %{_libdir}/cmake/Ceres
+%{_libdir}/cmake/Ceres/*.cmake
%changelog
+* Mon Jan 25 2016 Rich Mattes <richmattes(a)gmail.com> - 1.11.0-2
+- Add missing Requires to devel sub-package (rhbz#1300055)
+- Move CeresConfig.cmake to arch-dependent path
+
* Mon Oct 12 2015 Rich Mattes <richmattes(a)gmail.com> - 1.11.0-1
- Update to release 1.11.0
--
cgit v0.11.2
http://pkgs.fedoraproject.org/cgit/ceres-solver.git/commit/?h=epel7&i...