From 9ce138021d7493803ef135ad632b33fe291ebbac Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Sat, 1 Aug 2020 06:19:00 -0700 Subject: [PATCH] 1. Starting with f33, need to specify build in source directory. 2. Change soversion number so modified version display durning cmake command --- cppad.spec | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cppad.spec b/cppad.spec index 8a40627..edc66ba 100644 --- a/cppad.spec +++ b/cppad.spec @@ -13,7 +13,7 @@ # https://fedoraproject.org/wiki/Packaging:Versioning Name: cppad Version: %{yyyymmdd}.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc # As of yet there is no debug version installed for cppad_lib. @@ -31,6 +31,9 @@ BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake >= 2.8 +# Starting with f33, need to define this maco to build in source directory +%define __cmake_in_source_build 1 + %description C++ Algorithmic Differentiation (AD), see %{name}-devel, %{name}-doc. @@ -85,7 +88,7 @@ mv CppAD-%{version}/uw_copy_040507.html uw_copy_040507.html # # cppad_lib: replace soversion number and ensure build type is release sed -i.bak CppAD-%{version}/cppad_lib/CMakeLists.txt \ - -e "s|\${soversion}|%{soversion}|" \ + -e "s|print_variable(soversion)|SET(soversion %{soversion} )\n&|" \ -e "s|\${cppad_debug_which}|debug_none|" # # configure.hpp.in: Make sure CPPAD_DEBUG_AND_RELEASE is defined @@ -146,7 +149,7 @@ sed -i.bak CppAD-%{version}/test_more/general/pow.cpp \ # ----------------------------------------------------------------------------- %build # -# 1. Cannot use %%{_includedir}, $${_libdir}, %%{_datadir}, %%{_docdir} +# 1. Cannot use %%{_includedir}, %%{_libdir}, %%{_datadir}, %%{_docdir} # because they are absolute paths. Relative values would be more flexible # because they can be combined with %%{_prefix} to get absolute values. # @@ -217,6 +220,11 @@ make check # ---------------------------------------------------------------------------- %changelog +* Sat Aug 01 2020 Brad Bell - 20200000.0-6 +- define __cmake_in_source_build see: + https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/ +- Change soversion edit so modified soversion displayed during cmake command + * Sat Aug 01 2020 Fedora Release Engineering - 20200000.0-5 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild