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
|
|
|
#
|
2015-06-01 12:27:20 +02:00
|
|
|
# Copyright (c) 2015 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.
|
|
|
|
|
2007-11-06 04:43:27 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2008-11-17 17:52:07 +01:00
|
|
|
|
2007-11-06 04:43:27 +01:00
|
|
|
Name: ptpd
|
2015-06-01 12:27:20 +02:00
|
|
|
Version: 2.3.0
|
2011-10-28 19:42:28 +02:00
|
|
|
Release: 0
|
2015-06-01 12:27:20 +02:00
|
|
|
Summary: Implements the Precision Time protocol as defined by IEEE 1588 standard
|
2011-12-06 18:53:47 +01:00
|
|
|
License: BSD-3-Clause
|
2007-11-06 04:43:27 +01:00
|
|
|
Group: System/Daemons
|
|
|
|
Url: http://ptpd.sourceforge.net/
|
2015-06-01 12:27:20 +02:00
|
|
|
Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
|
|
|
|
Source1: ptpd2.service
|
|
|
|
Source2: ptpd2.conf
|
|
|
|
Source3: conf.sysconfig.ptpd
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: libpcap-devel
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: net-snmp-devel
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
BuildRequires: zlib-devel
|
2007-11-06 04:43:27 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-06-01 12:27:20 +02:00
|
|
|
%{?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
|
|
|
|
to work properly with other IEEE 1588 implementations. The source code
|
|
|
|
for PTPd is freely available under a BSD-style license. Thanks to
|
|
|
|
contributions from users, PTPd is becoming an increasingly portable,
|
|
|
|
interoperable, and stable IEEE 1588 implementation.
|
|
|
|
|
|
|
|
PTPd can run on most 32-bit little- or big-endian processors. It does
|
|
|
|
not require an FPU, so it is great for embedded processors. PTPd
|
|
|
|
currently runs on Linux, uClinux, FreeBSD, and NetBSD. It should also
|
|
|
|
be easy to port to other platforms.
|
|
|
|
|
|
|
|
PTPd is free. Everyone is invited to use and contribute to PTPd.
|
|
|
|
|
|
|
|
%prep
|
2008-11-17 17:52:07 +01:00
|
|
|
%setup -q
|
2015-06-01 12:27:20 +02:00
|
|
|
autoreconf -fiv
|
2007-11-06 04:43:27 +01:00
|
|
|
|
|
|
|
%build
|
2015-06-01 12:27:20 +02:00
|
|
|
%configure \
|
|
|
|
--enable-statistics \
|
|
|
|
--enable-ntpdc \
|
|
|
|
--enable-sigusr2=counters
|
2007-11-06 04:43:27 +01:00
|
|
|
|
|
|
|
%install
|
2015-06-01 12:27:20 +02:00
|
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
|
|
|
install -D -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}2.service
|
|
|
|
ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}2
|
|
|
|
install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}2.conf
|
|
|
|
install -D -m 644 %{SOURCE3} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.ptpd2
|
|
|
|
# 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
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
2015-06-01 12:27:20 +02:00
|
|
|
%doc COPYRIGHT ChangeLog README
|
|
|
|
%config %{_sysconfdir}/%{name}2.conf
|
2007-11-06 04:43:27 +01:00
|
|
|
%{_sbindir}/*
|
2015-06-01 12:27:20 +02:00
|
|
|
%{_mandir}/man8/*
|
|
|
|
%{_mandir}/man5/*
|
|
|
|
%{_libexecdir}/systemd/system/ptpd2.service
|
|
|
|
%{_localstatedir}/adm/fillup-templates/*
|
|
|
|
%config %ghost %{_localstatedir}/log/ptpd2_kernelclock.drift
|
|
|
|
|
|
|
|
%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
|
|
|
|
2007-11-06 04:43:27 +01:00
|
|
|
%changelog
|