forked from pool/linuxptp
618ffd6c26
- Use kernel-devel instead full source OBS-URL: https://build.opensuse.org/package/show/network:time/linuxptp?expand=0&rev=3
109 lines
3.5 KiB
RPMSpec
109 lines
3.5 KiB
RPMSpec
#
|
|
# spec file for package linuxptp
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: linuxptp
|
|
Version: 1.8
|
|
Release: 0
|
|
Summary: Precision Time Protocol v2 daemon
|
|
License: GPL-2.0+
|
|
Group: Productivity/Networking/Other
|
|
Url: http://linuxptp.sourceforge.net/
|
|
Source0: https://sourceforge.net/projects/linuxptp/files/v%{version}/linuxptp-%{version}.tgz
|
|
Source1: ptp4l.service
|
|
Source2: sysconfig.ptp4l
|
|
Source3: linuxptp.firewall
|
|
Source4: linuxptp-howto.txt
|
|
Source5: phc2sys.service
|
|
Source6: sysconfig.phc2sys
|
|
BuildRequires: kernel-devel
|
|
BuildRequires: systemd-rpm-macros
|
|
Requires(pre): %fillup_prereq
|
|
Provides: ptp-timekeeping
|
|
%{?systemd_requires}
|
|
|
|
%description
|
|
This software is an implementation of the Precision Time Protocol (PTP)
|
|
according to IEEE standard 1588 for Linux. The dual design goals are to
|
|
provide a robust implementation of the standard and to use the most
|
|
relevant and modern Application Programming Interfaces (API) offered by the
|
|
Linux kernel.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
export EXTRA_CFLAGS="%{optflags} -Iusr/include"
|
|
make %{?_smp_mflags}
|
|
|
|
cp %{SOURCE4} .
|
|
|
|
%install
|
|
make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}/%{_mandir} install
|
|
|
|
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
|
|
|
|
install -Dpm 644 default.cfg %{buildroot}/%{_sysconfdir}/ptp4l.conf
|
|
|
|
install -Dpm 644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.ptp4l
|
|
install -Dpm 644 %{SOURCE6} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.phc2sys
|
|
|
|
install -Dpm 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/linuxptp
|
|
|
|
%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
|
|
%defattr(-,root,root)
|
|
%doc README.org COPYING linuxptp-howto.txt
|
|
%{_unitdir}/ptp4l.service
|
|
%{_unitdir}/phc2sys.service
|
|
%{_sbindir}/rcptp4l
|
|
%{_sbindir}/rcphc2sys
|
|
%config %{_sysconfdir}/ptp4l.conf
|
|
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/linuxptp
|
|
%{_sbindir}/hwstamp_ctl
|
|
%{_sbindir}/phc2sys
|
|
%{_sbindir}/phc_ctl
|
|
%{_sbindir}/pmc
|
|
%{_sbindir}/ptp4l
|
|
%{_sbindir}/timemaster
|
|
%{_mandir}/man8/hwstamp_ctl.8%{ext_man}
|
|
%{_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}
|
|
%{_localstatedir}/adm/fillup-templates/sysconfig.ptp4l
|
|
%{_localstatedir}/adm/fillup-templates/sysconfig.phc2sys
|
|
|
|
%changelog
|