2014-02-19 13:43:23 +00:00
|
|
|
%global _hardened_build 1
|
|
|
|
|
2012-09-21 13:54:54 +00:00
|
|
|
Name: linuxptp
|
2014-02-19 13:34:10 +00:00
|
|
|
Version: 1.4
|
2013-08-02 12:12:21 +00:00
|
|
|
Release: 1%{?dist}
|
2012-09-21 13:54:54 +00:00
|
|
|
Summary: PTP implementation for Linux
|
|
|
|
|
|
|
|
Group: System Environment/Base
|
|
|
|
License: GPLv2+
|
|
|
|
URL: http://linuxptp.sourceforge.net/
|
|
|
|
|
2013-08-02 12:10:33 +00:00
|
|
|
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
|
2012-09-21 13:54:54 +00:00
|
|
|
Source1: phc2sys.service
|
|
|
|
Source2: ptp4l.service
|
2014-02-21 13:20:50 +00:00
|
|
|
# test suite from https://github.com/mlichvar/linuxptp-testsuite.git
|
|
|
|
Source3: testsuite-a1040d.tar.gz
|
|
|
|
# simulator for test suite from https://github.com/mlichvar/clknetsim.git
|
|
|
|
Source4: clknetsim-19a8df.tar.gz
|
2012-09-21 13:54:54 +00:00
|
|
|
|
|
|
|
BuildRequires: systemd-units
|
|
|
|
|
|
|
|
Requires(post): systemd-units
|
|
|
|
Requires(preun): systemd-units
|
|
|
|
Requires(postun): systemd-units
|
|
|
|
|
|
|
|
%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.
|
|
|
|
Supporting legacy APIs and other platforms is not a goal.
|
|
|
|
|
|
|
|
%prep
|
2014-02-21 13:20:50 +00:00
|
|
|
%setup -q -a 3 -a 4
|
|
|
|
mv clknetsim testsuite
|
2012-09-21 13:54:54 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
make %{?_smp_mflags} \
|
2014-02-19 13:43:23 +00:00
|
|
|
EXTRA_CFLAGS="$RPM_OPT_FLAGS" \
|
|
|
|
EXTRA_LDFLAGS="$RPM_LD_FLAGS"
|
2012-09-21 13:54:54 +00:00
|
|
|
|
|
|
|
%install
|
2012-11-09 13:37:46 +00:00
|
|
|
%makeinstall
|
2013-07-19 15:19:15 +00:00
|
|
|
|
2013-07-19 09:53:47 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir}/sysconfig,%{_unitdir},%{_mandir}/man5}
|
2012-11-09 14:04:39 +00:00
|
|
|
install -m 644 -p default.cfg $RPM_BUILD_ROOT%{_sysconfdir}/ptp4l.conf
|
|
|
|
install -m 644 -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}
|
2012-09-21 13:54:54 +00:00
|
|
|
|
|
|
|
echo 'OPTIONS="-f /etc/ptp4l.conf -i eth0"' > \
|
|
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ptp4l
|
2013-07-19 10:24:12 +00:00
|
|
|
echo 'OPTIONS="-w -s eth0"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys
|
2012-09-21 13:54:54 +00:00
|
|
|
|
2013-07-19 09:53:47 +00:00
|
|
|
echo '.so man8/ptp4l.8' > $RPM_BUILD_ROOT%{_mandir}/man5/ptp4l.conf.5
|
|
|
|
|
2014-02-21 13:20:50 +00:00
|
|
|
%check
|
|
|
|
cd testsuite
|
|
|
|
make %{?_smp_mflags} -C clknetsim
|
|
|
|
PATH=..:$PATH ./run
|
|
|
|
|
2012-09-21 13:54:54 +00:00
|
|
|
%post
|
|
|
|
%systemd_post ptp4l.service phc2sys.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%systemd_preun phc2sys.service ptp4l.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%systemd_postun_with_restart ptp4l.service phc2sys.service
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc COPYING README.org default.cfg gPTP.cfg
|
|
|
|
%config(noreplace) %{_sysconfdir}/ptp4l.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/phc2sys
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/ptp4l
|
|
|
|
%{_unitdir}/phc2sys.service
|
|
|
|
%{_unitdir}/ptp4l.service
|
|
|
|
%{_sbindir}/hwstamp_ctl
|
|
|
|
%{_sbindir}/phc2sys
|
|
|
|
%{_sbindir}/pmc
|
|
|
|
%{_sbindir}/ptp4l
|
2013-07-19 09:53:47 +00:00
|
|
|
%{_mandir}/man5/*.5*
|
2012-11-09 13:37:46 +00:00
|
|
|
%{_mandir}/man8/*.8*
|
2012-09-21 13:54:54 +00:00
|
|
|
|
|
|
|
%changelog
|
2013-08-02 12:12:21 +00:00
|
|
|
* Fri Aug 02 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.3-1
|
|
|
|
- update to 1.3
|
|
|
|
|
2013-07-30 13:33:59 +00:00
|
|
|
* Tue Jul 30 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.2-3.20130730git7789f0
|
|
|
|
- update to 20130730git7789f0
|
|
|
|
|
2013-07-19 11:26:52 +00:00
|
|
|
* Fri Jul 19 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.2-2.20130719git46db40
|
|
|
|
- update to 20130719git46db40
|
|
|
|
- drop old systemd scriptlets
|
|
|
|
- add man page link for ptp4l.conf
|
|
|
|
|
2013-04-22 09:39:14 +00:00
|
|
|
* Mon Apr 22 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.2-1
|
|
|
|
- update to 1.2
|
|
|
|
|
2013-02-18 12:21:24 +00:00
|
|
|
* Mon Feb 18 2013 Miroslav Lichvar <mlichvar@redhat.com> 1.1-1
|
|
|
|
- update to 1.1
|
|
|
|
- log phc2sys output
|
|
|
|
|
2013-02-14 05:42:23 +00:00
|
|
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
|
|
2012-12-13 18:11:09 +00:00
|
|
|
* Thu Dec 13 2012 Miroslav Lichvar <mlichvar@redhat.com> 1.0-1
|
|
|
|
- update to 1.0
|
|
|
|
|
2012-11-09 14:27:35 +00:00
|
|
|
* Fri Nov 09 2012 Miroslav Lichvar <mlichvar@redhat.com> 0-0.3.20121109git4e8107
|
|
|
|
- update to 20121109git4e8107
|
|
|
|
- install unchanged default.cfg as ptp4l.conf
|
|
|
|
- drop conflicts from phc2sys service
|
|
|
|
|
2012-09-21 13:54:54 +00:00
|
|
|
* Fri Sep 21 2012 Miroslav Lichvar <mlichvar@redhat.com> 0-0.2.20120920git6ce135
|
|
|
|
- fix issues found in package review (#859193)
|
|
|
|
|
|
|
|
* Thu Sep 20 2012 Miroslav Lichvar <mlichvar@redhat.com> 0-0.1.20120920git6ce135
|
|
|
|
- initial release
|