From 84a7e2e1f0c9b1c578aae4120ec0c6ac5db757aa Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Aug 02 2013 12:50:59 +0000 Subject: import linuxptp-1.3-1.el7.src.rpm --- diff --git a/.linuxptp.metadata b/.linuxptp.metadata new file mode 100644 index 0000000..9b9f79b --- /dev/null +++ b/.linuxptp.metadata @@ -0,0 +1 @@ +e55e5ce04bd5078d6ec1c5772ee8085e790efa1c SOURCES/linuxptp-1.3.tgz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/phc2sys.service b/SOURCES/phc2sys.service new file mode 100644 index 0000000..78ed68a --- /dev/null +++ b/SOURCES/phc2sys.service @@ -0,0 +1,11 @@ +[Unit] +Description=Synchronize system clock or PTP hardware clock (PHC) +After=ntpdate.service + +[Service] +Type=simple +EnvironmentFile=-/etc/sysconfig/phc2sys +ExecStart=/usr/sbin/phc2sys $OPTIONS + +[Install] +WantedBy=multi-user.target diff --git a/SOURCES/ptp4l.service b/SOURCES/ptp4l.service new file mode 100644 index 0000000..428394f --- /dev/null +++ b/SOURCES/ptp4l.service @@ -0,0 +1,10 @@ +[Unit] +Description=Precision Time Protocol (PTP) service + +[Service] +Type=simple +EnvironmentFile=-/etc/sysconfig/ptp4l +ExecStart=/usr/sbin/ptp4l $OPTIONS + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/linuxptp.spec b/SPECS/linuxptp.spec new file mode 100644 index 0000000..eaa4e3f --- /dev/null +++ b/SPECS/linuxptp.spec @@ -0,0 +1,105 @@ +Name: linuxptp +Version: 1.3 +Release: 1%{?dist} +Summary: PTP implementation for Linux + +Group: System Environment/Base +License: GPLv2+ +URL: http://linuxptp.sourceforge.net/ + +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz +Source1: phc2sys.service +Source2: ptp4l.service + +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 +%setup -q + +%build +make %{?_smp_mflags} \ + EXTRA_CFLAGS="$RPM_OPT_FLAGS -pie -fpie" \ + EXTRA_LDFLAGS="-Wl,-z,relro,-z,now" + +%install +%makeinstall + +mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir}/sysconfig,%{_unitdir},%{_mandir}/man5} +install -m 644 -p default.cfg $RPM_BUILD_ROOT%{_sysconfdir}/ptp4l.conf +install -m 644 -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir} + +echo 'OPTIONS="-f /etc/ptp4l.conf -i eth0"' > \ + $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ptp4l +echo 'OPTIONS="-w -s eth0"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys + +echo '.so man8/ptp4l.8' > $RPM_BUILD_ROOT%{_mandir}/man5/ptp4l.conf.5 + +%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 +%{_mandir}/man5/*.5* +%{_mandir}/man8/*.8* + +%changelog +* Fri Aug 02 2013 Miroslav Lichvar 1.3-1 +- update to 1.3 + +* Tue Jul 30 2013 Miroslav Lichvar 1.2-3.20130730git7789f0 +- update to 20130730git7789f0 + +* Fri Jul 19 2013 Miroslav Lichvar 1.2-2.20130719git46db40 +- update to 20130719git46db40 +- drop old systemd scriptlets +- add man page link for ptp4l.conf + +* Mon Apr 22 2013 Miroslav Lichvar 1.2-1 +- update to 1.2 + +* Mon Feb 18 2013 Miroslav Lichvar 1.1-1 +- update to 1.1 +- log phc2sys output + +* Thu Feb 14 2013 Fedora Release Engineering - 1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Dec 13 2012 Miroslav Lichvar 1.0-1 +- update to 1.0 + +* Fri Nov 09 2012 Miroslav Lichvar 0-0.3.20121109git4e8107 +- update to 20121109git4e8107 +- install unchanged default.cfg as ptp4l.conf +- drop conflicts from phc2sys service + +* Fri Sep 21 2012 Miroslav Lichvar 0-0.2.20120920git6ce135 +- fix issues found in package review (#859193) + +* Thu Sep 20 2012 Miroslav Lichvar 0-0.1.20120920git6ce135 +- initial release