diff --git a/linuxptp.changes b/linuxptp.changes index 054c889..586456f 100644 --- a/linuxptp.changes +++ b/linuxptp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 30 06:45:51 UTC 2017 - mpluskal@suse.com + +- Cleanup spec file with spec-cleaner +- User url for source + ------------------------------------------------------------------- Thu May 25 12:20:17 UTC 2017 - lpechacek@suse.com diff --git a/linuxptp.spec b/linuxptp.spec index f77824b..fb2332f 100644 --- a/linuxptp.spec +++ b/linuxptp.spec @@ -1,7 +1,7 @@ # # spec file for package linuxptp # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# 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 @@ -23,7 +23,7 @@ Summary: Precision Time Protocol v2 daemon License: GPL-2.0+ Group: Productivity/Networking/Other Url: http://linuxptp.sourceforge.net/ -Source0: linuxptp-%{version}.tgz +Source0: https://sourceforge.net/projects/linuxptp/files/v%{version}/linuxptp-%{version}.tgz Source1: ptp4l.service Source2: sysconfig.ptp4l Source3: linuxptp.firewall @@ -31,45 +31,45 @@ Source4: linuxptp-howto.txt Source5: phc2sys.service Source6: sysconfig.phc2sys BuildRequires: kernel-source -BuildRequires: systemd -PreReq: %fillup_prereq +BuildRequires: systemd-rpm-macros +Requires(pre): %fillup_prereq Provides: ptp-timekeeping -BuildRoot: %{_tmppath}/%{name}-%{version}-build %{?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. +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 -%setup0 -q +%setup -q %build -export EXTRA_CFLAGS="$RPM_OPT_FLAGS -Iusr/include" +export EXTRA_CFLAGS="%{optflags} -Iusr/include" # take missing header files form kernel sources -make -C /usr/src/linux headers_install O=$PWD +make %{?_smp_mflags} -C %{_prefix}/src/linux headers_install O=$PWD make %{?_smp_mflags} cp %{SOURCE4} . %install -make prefix=%{buildroot}/usr mandir=%{buildroot}/%{_mandir} install +make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}/%{_mandir} install -%__install -Dm 644 %{SOURCE1} %{buildroot}/%{_unitdir}/ptp4l.service -%__install -Dm 644 %{SOURCE5} %{buildroot}/%{_unitdir}/phc2sys.service -ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcptp4l -ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcphc2sys +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 -Dm 644 default.cfg %{buildroot}/%{_sysconfdir}/ptp4l.conf +install -Dpm 644 default.cfg %{buildroot}/%{_sysconfdir}/ptp4l.conf -%__install -Dm 644 %{SOURCE2} %{buildroot}/var/adm/fillup-templates/sysconfig.ptp4l -%__install -Dm 644 %{SOURCE6} %{buildroot}/var/adm/fillup-templates/sysconfig.phc2sys +install -Dpm 644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.ptp4l +install -Dpm 644 %{SOURCE6} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.phc2sys -%__install -Dm 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/linuxptp +install -Dpm 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/linuxptp %pre %service_add_pre ptp4l.service phc2sys.service @@ -87,6 +87,7 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcphc2sys %files %defattr(-,root,root) +%doc README.org COPYING linuxptp-howto.txt %{_unitdir}/ptp4l.service %{_unitdir}/phc2sys.service %{_sbindir}/rcptp4l @@ -99,14 +100,13 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcphc2sys %{_sbindir}/pmc %{_sbindir}/ptp4l %{_sbindir}/timemaster -%{_mandir}/man8/hwstamp_ctl.8.gz -%{_mandir}/man8/phc2sys.8.gz -%{_mandir}/man8/phc_ctl.8.gz -%{_mandir}/man8/pmc.8.gz -%{_mandir}/man8/ptp4l.8.gz -%{_mandir}/man8/timemaster.8.gz -/var/adm/fillup-templates/sysconfig.ptp4l -/var/adm/fillup-templates/sysconfig.phc2sys -%doc README.org COPYING linuxptp-howto.txt +%{_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