## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: gotcha Version: 1.0.5 Release: %autorelease Summary: A library for wrapping function calls to shared libraries License: LGPL-2.1-only URL: https://github.com/llnl/gotcha Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: check-devel BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: git BuildRequires: python3dist(sphinx) %description Gotcha is a library that wraps functions. Tools can use gotcha to install hooks into other libraries, for example putting a wrapper function around libc's malloc. It is similar to LD_PRELOAD, but operates via a programmable API. This enables easy methods of accomplishing tasks like code instrumentation or wholesale replacement of mechanisms in programs without disrupting their source code. %package devel Summary: A library for wrapping function calls to shared libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development header files for Gotcha %prep %autosetup -n GOTCHA-%{version} # Use shared library for testing sed -i 's/libcheck.a/libcheck.so/g' test/unit/CMakeLists.txt %build %cmake -DGOTCHA_ENABLE_TESTS=OFF -DDEPENDENCIES_PREINSTALLED=TRUE %cmake_build # Build Documentation pushd docs sphinx-build . -b man man popd %install %cmake_install # install documentation mkdir -p %{buildroot}/%{_mandir}/man1 cp -p docs/man/gotcha.1 %{buildroot}/%{_mandir}/man1 %check #ctest %files %license COPYRIGHT %license LGPL %doc README.md %{_mandir}/man1/gotcha.1* %{_libdir}/libgotcha.so.2 %{_libdir}/libgotcha.so.2.* %files devel %dir %{_includedir}/gotcha %{_includedir}/gotcha/gotcha.h %{_includedir}/gotcha/gotcha_types.h %dir %{_libdir}/cmake/gotcha %{_libdir}/cmake/gotcha/*.cmake %{_libdir}/libgotcha.so %changelog * Thu Nov 16 2023 John Doe - 1.0.5-1 - Uncommitted changes