%global commit0 7edbd580cfad509a3253c733e70144e36f02ecd4 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: rttr Version: 0.9.7 Release: 0.2git%{shortcommit0}%{?dist} Summary: Run Time Type Reflection License: MIT URL: https://www.rttr.org #Source0: %{url}/releases/rttr-%{version}-src.tar.gz Source0: https://github.com/rttrorg/rttr/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz Patch0: 0001-cmake-Don-t-set-non-default-permissions.patch BuildRequires: gcc-c++ BuildRequires: doxygen BuildRequires: cmake3 BuildRequires: make BuildRequires: catch-devel BuildRequires: rapidjson-devel %description Run Time Type Reflection is the the ability of a computer program to introspect and modify objects at runtime. It is also the name of the library itself, which is written in C++. %package -n librttr Summary: Run Time Type Reflection for C++ Provides: bundled(nonius) = 1.1.2 %description -n librttr Run Time Type Reflection is the the ability of a computer program to introspect and modify objects at runtime. It is also the name of the library itself, which is written in C++. %package -n librttr-devel Summary: Header files for the C++ Run Time Type Reflection library Requires: librttr%{?_isa} = %{version}-%{release} %description -n librttr-devel Run Time Type Reflection is the the ability of a computer program to introspect and modify objects at runtime. It is also the name of the library itself, which is written in C++. %package doc Summary: Documentation for %{name} BuildArch: noarch %description doc The %{name}-documentation documentations for %{name}. %prep %autosetup -p1 -n %{name}-%{commit0} find . -type f -exec chmod -x {} ';' sed -i 's/PERMISSIONS OWNER_READ//' CMake/*.cmake # Unbundle rm -rf 3rd_party/catch-1.12.0 3rd_party/rapidjson-1.1.0 # Fix catch2 include %if ! 0%{?el7} find src/unit_tests/ -name *.cpp -exec sed -i -e 's|catch/catch.hpp|catch2/catch.hpp|' {} ';' find src/unit_tests/ -name *.h -exec sed -i -e 's|catch/catch.hpp|catch2/catch.hpp|' {} ';' %endif # Disable compiler Werror # See also https://github.com/rttrorg/rttr/issues/317 sed -i -e 's/^set_compiler_warnings/#set_compiler_warnings/' src/unit_tests/CMakeLists.txt %build %cmake3 \ -DCMAKE_INSTALL_CMAKEDIR=cmake \ -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DBUILD_EXAMPLES=OFF \ -DBUILD_PACKAGE=OFF \ -DUSE_PCH=OFF %cmake3_build %install rm -rf __doc %cmake3_install # Rework doc mkdir -p __doc mv %{buildroot}%{_prefix}/doc/* __doc find __doc -type f -exec chmod 0644 {} ';' rm -rf %{buildroot}%{_datadir}/rttr/{LICENSE.txt,README.md} %check %ctest3 run_tests %files -n librttr %license LICENSE.txt %doc README.md %{_libdir}/librttr_core.so.%{version} %files -n librttr-devel %{_includedir}/rttr/ %{_libdir}/librttr_core.so %{_datadir}/rttr/cmake/ %files doc %doc __doc/* %changelog * Fri Jan 21 2022 Fedora Release Engineering - 0.9.7-0.2git7edbd58 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Aug 16 2021 Nicolas Chauvet - 0.9.7-0.1git7edbd58 - Update to pre 0.9.7 * Fri Jul 23 2021 Fedora Release Engineering - 0.9.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Thu Feb 25 2021 Nicolas Chauvet - 0.9.6-3 - Drop main package - Split docs * Wed Feb 24 2021 Nicolas Chauvet - 0.9.6-2 - Backport patch for aarch64 * Mon Feb 08 2021 Nicolas Chauvet - 0.9.6-1 - Initial spec file