Name: oscillatord Version: 1.0.1 Release: %autorelease Summary: Daemon for disciplining an oscillator License: GPLv2+ URL: https://github.com/Orolia2s/oscillatord Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: cmake BuildRequires: gpsd-devel BuildRequires: json-c-devel BuildRequires: liboscillator-disciplining-devel BuildRequires: pps-tools-devel BuildRequires: sed BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros BuildRequires: ubloxcfg-devel %description The oscillatord daemon takes input from a PHC clock, reporting once per second, the phase error between an oscillator and a reference GNSS receiver. For an example of such a device, please see the ptp_ocp kernel driver. The phase error read is then used as an input to the disciplining-minipod library which will compute a setpoint, used by oscillatord to control an oscillator and discipline it to the 1PPS from a GNSS receiver. Oscillatord also sets PHC'stime at start up, using Output from a GNSS receiver. To communicate with GNSS receiver's serial it uses ubloxcfg %prep %autosetup # Fix paths in systemd unit sed -e 's/^Environment=LD_LIBRARY_PATH.*$//' \ -e "s@/usr/local/bin@%{_bindir}@" \ -i systemd/oscillatord.service # Drop hardcoded CFLAGS sed -e 's/-O0//g' -i CMakeLists.txt %build %cmake %cmake_build %install %cmake_install # libosc_sim_stubs is meant to be used with LD_PRELOAD mkdir -p %{buildroot}%{_libdir}/%{name} mv %{buildroot}%{_libdir}/libosc_sim_stubs.so %{buildroot}%{_libdir}/%{name} # install default config install -Dpm0644 -t %{buildroot}%{_sysconfdir} \ example_configurations/%{name}.conf %post %systemd_post oscillatord.service %preun %systemd_preun oscillatord.service %postun %systemd_postun_with_restart oscillatord.service %files %license LICENSE %doc README.md example_configurations %{_bindir}/* %{_libdir}/%{name} %{_unitdir}/%{name}.service %config(noreplace) %{_sysconfdir}/%{name}.conf %changelog %autochangelog