2007-11-06 04:43:27 +01:00
|
|
|
#
|
2011-10-28 19:42:28 +02:00
|
|
|
# spec file for package ptpd
|
2007-11-06 04:43:27 +01:00
|
|
|
#
|
2018-01-25 09:06:52 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-11-06 04:43:27 +01:00
|
|
|
#
|
2008-11-17 17:52:07 +01: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.
|
|
|
|
|
2018-11-26 10:06:39 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-11-06 04:43:27 +01:00
|
|
|
#
|
|
|
|
|
2008-11-17 17:52:07 +01:00
|
|
|
|
2007-11-06 04:43:27 +01:00
|
|
|
Name: ptpd
|
2016-05-12 21:34:31 +02:00
|
|
|
Version: 2.3.1
|
2011-10-28 19:42:28 +02:00
|
|
|
Release: 0
|
2018-11-26 10:06:39 +01:00
|
|
|
Summary: Implementation of the Precision Time protocol (IEEE 1588)
|
2011-12-06 18:53:47 +01:00
|
|
|
License: BSD-3-Clause
|
2007-11-06 04:43:27 +01:00
|
|
|
Group: System/Daemons
|
2018-11-21 15:43:36 +01:00
|
|
|
Url: https://github.com/ptpd/ptpd
|
2016-05-12 21:34:31 +02:00
|
|
|
Source0: https://github.com/ptpd/ptpd/archive/ptpd-%{version}.tar.gz
|
2015-06-01 12:27:20 +02:00
|
|
|
Source1: ptpd2.service
|
|
|
|
Source3: conf.sysconfig.ptpd
|
2016-07-13 12:42:57 +02:00
|
|
|
# PATCH-FIX-UPSTREAM ptpd2-net-snmp_U64.patch gh#ptpd/ptpd#25
|
|
|
|
Patch0: ptpd2-net-snmp_U64.patch
|
2018-11-21 15:43:36 +01:00
|
|
|
# PATCH-FIX-UPSTREAM resolve EVP_MD_CTX name conflict
|
|
|
|
Patch1: ptpd-evp-md-ctx.patch
|
2015-06-01 12:27:20 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: libpcap-devel
|
|
|
|
BuildRequires: libtool
|
2016-07-13 12:42:57 +02:00
|
|
|
BuildRequires: net-snmp-devel
|
2015-06-01 12:27:20 +02:00
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
BuildRequires: zlib-devel
|
|
|
|
%{?systemd_requires}
|
2007-11-06 04:43:27 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
The PTP daemon (PTPd) implements the Precision Time protocol (PTP) as
|
|
|
|
defined by the IEEE 1588 standard. PTP was developed to provide very
|
|
|
|
precise time coordination of LAN connected computers.
|
|
|
|
|
|
|
|
PTPd is a complete implementation of the IEEE 1588 specification for a
|
|
|
|
standard (non-boundary) clock. PTPd has been tested with and is known
|
2018-11-26 10:06:39 +01:00
|
|
|
to work properly with other IEEE 1588 implementations.
|
2007-11-06 04:43:27 +01:00
|
|
|
|
|
|
|
%prep
|
2016-05-12 21:34:31 +02:00
|
|
|
%setup -q -n %{name}-%{name}-%{version}
|
2016-07-13 12:42:57 +02:00
|
|
|
%patch0
|
2018-11-21 15:43:36 +01:00
|
|
|
%patch1 -p1
|
2007-11-06 04:43:27 +01:00
|
|
|
|
|
|
|
%build
|
2016-05-12 21:34:31 +02:00
|
|
|
autoreconf -fiv
|
2015-06-01 12:27:20 +02:00
|
|
|
%configure \
|
2018-11-09 08:54:50 +01:00
|
|
|
--enable-statistics \
|
|
|
|
--enable-experimental-options
|
|
|
|
make %{?_smp_mflags}
|
2007-11-06 04:43:27 +01:00
|
|
|
|
|
|
|
%install
|
2016-07-10 09:45:37 +02:00
|
|
|
%make_install
|
2018-03-08 14:37:26 +01:00
|
|
|
install -Dpm 0644 %{SOURCE1} \
|
|
|
|
%{buildroot}/%{_unitdir}/%{name}2.service
|
2015-06-01 12:27:20 +02:00
|
|
|
ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}2
|
2018-03-08 14:37:26 +01:00
|
|
|
# Generate default config
|
|
|
|
install -d %{buildroot}%{_sysconfdir}
|
|
|
|
./src/ptpd2 --default-config > %{buildroot}%{_sysconfdir}/%{name}2.conf
|
|
|
|
install -Dpm 0644 %{SOURCE3} \
|
|
|
|
%{buildroot}%{_fillupdir}/sysconfig.ptpd2
|
2015-06-01 12:27:20 +02:00
|
|
|
# have to create the below, else ptpd will not log drift
|
|
|
|
install -d %{buildroot}%{_localstatedir}/log
|
|
|
|
touch %{buildroot}%{_localstatedir}/log/ptpd2_kernelclock.drift
|
2007-11-06 04:43:27 +01:00
|
|
|
|
2015-06-01 12:27:20 +02:00
|
|
|
%pre
|
|
|
|
%service_add_pre %{name}2.service
|
2007-11-06 04:43:27 +01:00
|
|
|
|
2007-11-09 00:40:01 +01:00
|
|
|
%preun
|
2015-06-01 12:27:20 +02:00
|
|
|
%service_del_preun %{name}2.service
|
2007-11-09 00:40:01 +01:00
|
|
|
|
2007-11-06 04:43:27 +01:00
|
|
|
%post
|
2015-06-01 12:27:20 +02:00
|
|
|
%service_add_post %{name}2.service
|
|
|
|
%{fillup_only -n ptpd2}
|
2007-11-09 00:40:01 +01:00
|
|
|
|
|
|
|
%postun
|
2015-06-01 12:27:20 +02:00
|
|
|
%service_del_postun %{name}2.service
|
2008-11-17 17:52:07 +01:00
|
|
|
|
2016-05-12 21:34:31 +02:00
|
|
|
%files
|
2018-03-08 14:37:26 +01:00
|
|
|
%license COPYRIGHT
|
|
|
|
%doc ChangeLog README
|
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}2.conf
|
2016-07-10 09:45:37 +02:00
|
|
|
%{_sbindir}/ptpd2
|
|
|
|
%{_sbindir}/rcptpd2
|
2018-11-09 08:54:50 +01:00
|
|
|
%{_mandir}/man5/ptpd2.conf.5%{?ext_man}
|
|
|
|
%{_mandir}/man8/ptpd2.8%{?ext_man}
|
2016-05-12 21:34:31 +02:00
|
|
|
%{_datadir}/ptpd
|
|
|
|
%{_libexecdir}/systemd/system/ptpd2.service
|
2017-11-23 16:11:41 +01:00
|
|
|
%{_fillupdir}/*
|
2016-05-12 21:34:31 +02:00
|
|
|
%config %ghost %{_localstatedir}/log/ptpd2_kernelclock.drift
|
|
|
|
|
2007-11-06 04:43:27 +01:00
|
|
|
%changelog
|