2017-06-29 17:28:40 +02:00
|
|
|
#
|
|
|
|
# spec file for package linuxptp
|
|
|
|
#
|
2021-07-07 09:42:15 +02:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2017-06-29 17:28:40 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2020-11-11 08:51:58 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-06-29 17:28:40 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-11-23 16:11:36 +01:00
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
|
|
%if ! %{defined _fillupdir}
|
2018-02-08 09:54:41 +01:00
|
|
|
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
2017-11-23 16:11:36 +01:00
|
|
|
%endif
|
2017-06-29 17:28:40 +02:00
|
|
|
Name: linuxptp
|
2021-07-07 09:42:15 +02:00
|
|
|
Version: 3.1.1
|
2017-06-29 17:28:40 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Precision Time Protocol v2 daemon
|
2018-11-26 13:50:11 +01:00
|
|
|
License: GPL-2.0-or-later
|
2017-06-29 17:28:40 +02:00
|
|
|
Group: Productivity/Networking/Other
|
2018-02-08 13:22:32 +01:00
|
|
|
URL: http://linuxptp.sourceforge.net/
|
2020-11-11 08:51:58 +01:00
|
|
|
Source0: %{name}-%{version}.tar.xz
|
2017-06-29 17:28:40 +02:00
|
|
|
Source1: ptp4l.service
|
|
|
|
Source2: sysconfig.ptp4l
|
|
|
|
Source4: linuxptp-howto.txt
|
|
|
|
Source5: phc2sys.service
|
|
|
|
Source6: sysconfig.phc2sys
|
2017-06-30 09:49:47 +02:00
|
|
|
BuildRequires: kernel-devel
|
2017-06-30 08:48:47 +02:00
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
Requires(pre): %fillup_prereq
|
2017-06-29 17:28:40 +02:00
|
|
|
Provides: ptp-timekeeping
|
|
|
|
%{?systemd_requires}
|
|
|
|
|
|
|
|
%description
|
|
|
|
This software is an implementation of the Precision Time Protocol (PTP)
|
2017-07-10 13:53:08 +02:00
|
|
|
according to the IEEE1588 standard for Linux.
|
2017-06-29 17:28:40 +02:00
|
|
|
|
|
|
|
%prep
|
2017-06-30 08:48:47 +02:00
|
|
|
%setup -q
|
2017-06-29 17:28:40 +02:00
|
|
|
|
|
|
|
%build
|
2017-06-30 08:48:47 +02:00
|
|
|
export EXTRA_CFLAGS="%{optflags} -Iusr/include"
|
2017-06-29 17:28:40 +02:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
cp %{SOURCE4} .
|
|
|
|
|
|
|
|
%install
|
2017-06-30 08:48:47 +02:00
|
|
|
make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}/%{_mandir} install
|
2017-06-29 17:28:40 +02:00
|
|
|
|
2017-06-30 08:48:47 +02:00
|
|
|
install -Dpm 644 %{SOURCE1} %{buildroot}/%{_unitdir}/ptp4l.service
|
|
|
|
install -Dpm 644 %{SOURCE5} %{buildroot}/%{_unitdir}/phc2sys.service
|
|
|
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcptp4l
|
|
|
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcphc2sys
|
2017-06-29 17:28:40 +02:00
|
|
|
|
2018-11-26 13:50:11 +01:00
|
|
|
install -Dpm 644 configs/default.cfg %{buildroot}/%{_sysconfdir}/ptp4l.conf
|
2017-06-29 17:28:40 +02:00
|
|
|
|
2017-11-23 16:11:36 +01:00
|
|
|
install -Dpm 644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.ptp4l
|
|
|
|
install -Dpm 644 %{SOURCE6} %{buildroot}%{_fillupdir}/sysconfig.phc2sys
|
2017-06-29 17:28:40 +02:00
|
|
|
|
|
|
|
%pre
|
|
|
|
%service_add_pre ptp4l.service phc2sys.service
|
|
|
|
|
|
|
|
%post
|
|
|
|
%{fillup_only -n ptp4l}
|
|
|
|
%{fillup_only -n phc2sys}
|
|
|
|
%service_add_post ptp4l.service phc2sys.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun ptp4l.service phc2sys.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun ptp4l.service phc2sys.service
|
|
|
|
|
|
|
|
%files
|
2018-11-26 13:50:11 +01:00
|
|
|
%license COPYING
|
|
|
|
%doc README.org linuxptp-howto.txt configs
|
2017-06-29 17:28:40 +02:00
|
|
|
%{_unitdir}/ptp4l.service
|
|
|
|
%{_unitdir}/phc2sys.service
|
|
|
|
%{_sbindir}/rcptp4l
|
|
|
|
%{_sbindir}/rcphc2sys
|
|
|
|
%config %{_sysconfdir}/ptp4l.conf
|
|
|
|
%{_sbindir}/hwstamp_ctl
|
|
|
|
%{_sbindir}/phc2sys
|
|
|
|
%{_sbindir}/phc_ctl
|
|
|
|
%{_sbindir}/pmc
|
|
|
|
%{_sbindir}/ptp4l
|
2018-11-26 13:50:11 +01:00
|
|
|
%{_sbindir}/nsm
|
2017-06-29 17:28:40 +02:00
|
|
|
%{_sbindir}/timemaster
|
2020-11-11 08:51:58 +01:00
|
|
|
%{_sbindir}/ts2phc
|
2018-11-26 13:50:11 +01:00
|
|
|
%{_mandir}/man8/hwstamp_ctl.8%{?ext_man}
|
2020-11-11 08:51:58 +01:00
|
|
|
%{_mandir}/man8/nsm.8%{?ext_man}
|
2018-11-26 13:50:11 +01:00
|
|
|
%{_mandir}/man8/phc2sys.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/phc_ctl.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pmc.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/ptp4l.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/timemaster.8%{?ext_man}
|
2020-11-11 08:51:58 +01:00
|
|
|
%{_mandir}/man8/ts2phc.8%{?ext_man}
|
2017-11-23 16:11:36 +01:00
|
|
|
%{_fillupdir}/sysconfig.ptp4l
|
|
|
|
%{_fillupdir}/sysconfig.phc2sys
|
2017-06-29 17:28:40 +02:00
|
|
|
|
|
|
|
%changelog
|