%global commit ff6af6fc683159deb51c543b065eba14dfcf329b %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global date 20231215 Name: rapidcheck Version: 0.0.0.%{date}git%{shortcommit} Release: 1%{?dist} Summary: QuickCheck clone for C++ with the goal of being simple to use License: BSD-2-Clause URL: https://github.com/emil-e/rapidcheck Source0: https://github.com/emil-e/rapidcheck/archive/%{commit}/rapidcheck-%{commit}.zip BuildRequires: cmake BuildRequires: gcc-c++ %description RapidCheck is a C++ framework for property based testing inspired by QuickCheck. %prep %setup -n %{name}-%{commit} -q %build mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DBUILD_SHARED_LIBS=ON -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-soname,librapidcheck.so.0.1" -DRC_ENABLE_GTEST=ON make %{?_smp_mflags} %install cd build make DESTDIR=%{buildroot} install #Downstream .so name versioning. Upstream: https://github.com/emil-e/rapidcheck/issues/333 cp %{buildroot}%{_libdir}/librapidcheck.so %{buildroot}%{_libdir}/librapidcheck.so.0.1 ln -sf librapidcheck.so.0.1 %{buildroot}%{_libdir}/librapidcheck.so install -D -m 644 ../LICENSE.md %{buildroot}%{_pkgdocdir}/LICENSE.md install -D -m 644 ../README.md %{buildroot}%{_pkgdocdir}/README.md %files %{_libdir}/librapidcheck.so.0.1 %ghost %{_libdir}/librapidcheck.so %doc %{_pkgdocdir}/README.md %license %{_pkgdocdir}/LICENSE.md %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains the header files and CMake configuration files %files devel %{_datadir}/rapidcheck/cmake/rapidcheckConfig.cmake %{_datadir}/rapidcheck/cmake/rapidcheckConfig-release.cmake %{_includedir}/rapidcheck/ %{_includedir}/rapidcheck.h %{_libdir}/pkgconfig/rapidcheck.pc %{_libdir}/pkgconfig/rapidcheck_gtest.pc %doc %{_pkgdocdir}/README.md %changelog * Sun Aug 04 2024 Fhiss - 0.0.0.20231215gitff6af6f-1 - Initial package for rapidcheck