%global libname liboscillator-disciplining %global _description %{expand: Library providing C disciplining algorithm used with oscillatord to discipling oscillators using the minipod algorithm developed by Matthias Lorentz.} Name: disciplining-minipod Version: 1.0.1 Release: %autorelease Summary: Disciplining algorithm for Atomic Reference Time Card License: LGPLv2 URL: https://github.com/Orolia2s/disciplining-minipod Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: cmake BuildRequires: make BuildRequires: sed %description %{_description} %package -n %{libname} Summary: %{summary} %description -n %{libname} %{_description} %package -n %{libname}-devel Summary: Development files for %{libname} Requires: %{libname} = %{version}-%{release} %description -n %{libname}-devel This package contains development headers and files for %{libname}. %prep %autosetup # Drop forced optimization flag sed -i 's/-O3//' CMakeLists.txt # Do not install static library sed -i 's/^install.*-static.*$//' src/CMakeLists.txt %build %cmake %cmake_build %install %cmake_install %check pushd test %set_build_flags for t in test-utils test-minipod-lib; do %make_build \ C="$CC" \ CPPFLAGS="$CFLAGS -I%{buildroot}%{_includedir}" \ LDLIBS="$LDFLAGS -L%{buildroot}%{_libdir} -lm -loscillator-disciplining" \ $t # ignore failures due to # https://github.com/Orolia2s/disciplining-minipod/issues/1 LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./$t || true done %files -n %{libname} %license LICENSE %doc README.md %{_libdir}/%{libname}.so.1* %files -n %{libname}-devel %{_includedir}/oscillator-disciplining %{_libdir}/%{libname}.so %{_libdir}/pkgconfig/%{libname}.pc %changelog %autochangelog