Skip to content

Commit f2d4fa7

Browse files
authored
Merge pull request #10126 from fwyzard/IB/CMSSW_16_0_X/master_boost_cmake
Include cmake files in Boost installation
2 parents 54c6964 + f7059ba commit f2d4fa7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

boost.spec

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,19 @@ mkdir -p %{i}/lib %{i}/include
7676
# the files that we are copying.
7777
pushd stage/lib
7878
find . -name "*.%{dynamic_lib_ext}*" -type f | tar cf - -T - | (cd %{i}/lib; tar xfp -)
79+
find . -name "*.cmake" -type f | tar cf - -T - | (cd %{i}/lib; tar xfp -)
7980
popd
8081
find boost -name '*.[hi]*' | tar cf - -T - | ( cd %{i}/include; tar xfp -)
8182

83+
# relocate the CMake files
84+
find %{i}/lib/cmake -name '*.cmake' | xargs sed -i \
85+
-e's#%{_builddir}/%{n}-%{realversion}/stage#%{i}#g' \
86+
-e's#_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../../"#_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../include/"#g'
87+
8288
for l in $(find %{i}/lib -name "*.%{dynamic_lib_ext}.*")
8389
do
8490
ln -s $(basename ${l}) $(echo ${l} | sed -e "s|[.]%{dynamic_lib_ext}[.].*|.%{dynamic_lib_ext}|")
8591
done
92+
93+
%post
94+
%relocateConfigAll lib/cmake *.cmake

0 commit comments

Comments
 (0)