Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions catch2.spec
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
### RPM external catch2 2.13.6
Source: https://raw.githubusercontent.com/catchorg/Catch2/v%{realversion}/single_include/catch2/catch.hpp
### RPM external catch2 3.11.0

Source: https://github.com/catchorg/Catch2/archive/refs/tags/v%{realversion}.tar.gz
BuildRequires: cmake gmake

%prep
%setup -n Catch2-%{realversion}

%build
cd %{_builddir}
rm -rf build && mkdir build && cd build

cmake ../Catch2-%{realversion} \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX="%{i}" \
-DCATCH_INSTALL_HELPERS=ON \
-DCATCH_INSTALL_EXTRAS=ON \
-DCMAKE_INSTALL_COMPONENT="devel"

make %{makeprocesses} VERBOSE=1

%install
mkdir %{i}/include
cp %{_sourcedir}/catch.hpp %{i}/include/
cd %{_builddir}/build
make install

%post
%{relocateConfig}share/pkgconfig/catch2*.pc
7 changes: 5 additions & 2 deletions scram-tools.file/tools/catch2/catch2.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<tool name="@TOOL@" version="@TOOL_VERSION@" revision="2">
<tool name="@TOOL@" version="@TOOL_VERSION@" revision="3">
<lib name="Catch2Main"/>
<lib name="Catch2"/>
<client>
<environment name="@TOOL_BASE@" default="@TOOL_ROOT@"/>
<environment name="INCLUDE" default="$@TOOL_BASE@/include"/>
<environment name="INCLUDE" default="$@TOOL_BASE@/include"/>
<environment name="LIBDIR" default="$@TOOL_BASE@/lib64"/>
</client>
</tool>