[ptpd] corrections applied as requested by bugzilla 1100256

jondkent jondkent at fedoraproject.org
Fri May 23 15:05:40 UTC 2014


commit f54364c604b4e81643c4502460056dd2a4ef582b
Author: Jon Kent <jon.kent at gmail.com>
Date:   Fri May 23 15:31:50 2014 +0100

    corrections applied as requested by bugzilla 1100256

 ptpd.spec |   48 ++++++++++++++++++++++++++++++++----------------
 1 files changed, 32 insertions(+), 16 deletions(-)
---
diff --git a/ptpd.spec b/ptpd.spec
index b57cce6..fe992b8 100644
--- a/ptpd.spec
+++ b/ptpd.spec
@@ -1,15 +1,17 @@
 Name: ptpd
 Version: 2.2.0	
-Release: 6%{?dist}
+Release: 7%{?dist}
 Summary: PTPd implements the Precision Time protocol (PTP) as defined by the IEEE 1588
 
 Group: System Environment/Daemons
 License: BSD
 URL: http://ptpd.sourceforge.net/
-Source0: http://sourceforge.net/projects/ptpd/files/ptpd/2.2.0/ptpd-2.2.0.tar.gz	
+Source0: http://sourceforge.net/projects/ptpd/files/ptpd/2.2.0/ptpd-2.2.0.tar.gz
 Source1: ptpd-additions.tar.gz
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
 BuildRequires: systemd
 
 %description
@@ -32,27 +34,32 @@ does not require an FPU, so it is great for embedded processors.
 cd src
 CFLAGS="%{optflags}" make ptpd2
 
-
 %install
 rm -rf %{buildroot}
-mkdir -p  %{buildroot}%{_bindir}
-mkdir -p  %{buildroot}%{_sysconfdir}/sysconfig
+mkdir -p %{buildroot}%{_bindir}
+mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
 mkdir -p %{buildroot}%{_mandir}/man8/
 mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
-mkdir -p %{buildroot}/%{_unitdir}
-cp -r lib/systemd/system/ptpd2.service  %{buildroot}/%{_unitdir}
-cp -p etc/sysconfig/ptpd2 %{buildroot}/%{_sysconfdir}/sysconfig
-cp -p src/ptpd2 %{buildroot}/%{_bindir}
-cp -p src/ptpd2.8 %{buildroot}/%{_mandir}/man8/
+mkdir -p %{buildroot}%{_unitdir}
+install -pm 644 lib/systemd/system/ptpd2.service  %{buildroot}%{_unitdir}
+install -pm 644 %{_sysconfdir}/sysconfig/ptpd2 %{buildroot}/%{_sysconfdir}/sysconfig
+install -pm 755 src/ptpd2 %{buildroot}%{_bindir}
+install -pm 644 src/ptpd2.8 %{buildroot}%{_mandir}/man8/
 
-%clean
-rm -rf %{buildroot}
+%post
+%systemd_post ptpd2.service
+
+%preun
+%systemd_preun ptpd2.service
+
+%postun
+%systemd_postun_with_restart ptpd2.service
+/sbin/ldconfig
 
 %files
-%defattr(-,root,root,-)
 %config(noreplace) %{_sysconfdir}/sysconfig/ptpd2
-%attr(664,root,root) %{_unitdir}/*
-%attr(554,root,root) %{_bindir}/*
+%{_unitdir}/*
+%{_bindir}/*
 %doc COPYRIGHT ChangeLog README RELEASE_NOTES
 %{_mandir}/man8/*
 
@@ -60,24 +67,33 @@ rm -rf %{buildroot}
 %changelog
 * Fri Aug 10 2013 Jon Kent <jon.kent at, gmail.com> - 2.2.0-6
 - Removed version from doc directory creation as per pkg standards for fc20
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.2.0-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
+
 * Sat May 18 2013 Jon Kent <jon.kent at, gmail.com> 2.2.0-4
 - added noreplace to sysconfig/ptpd2
+
 * Tue May 14 2013 Jon Kent <jon.kent at, gmail.com> 2.2.0-3
 - corrected sysconfig and systemd file names
+
 * Fri May 10 2013 Jon Kent <jon.kent at, gmail.com> 2.2.0-2
 - correct systemd script and init script to use ptpd2
+
 * Tue Mar 26 2013 Jon Kent <jon.kent at, gmail.com> 2.2.0-1
 - added systemd startup
 - binary name has changed to ptpd2, spec modified to reflect this
+
 * Fri Mar 22 2013 Jon Kent <jon.kent at, gmail.com> 2.2.0-1
 - new upstream version of ptpd
+
 * Wed Dec 01 2010 Jon Kent <jon.kent at, gmail.com> 1.1.0-2
 - Cleaned up description
 - Moved docs to use %doc tag
 - Cleaned up %build section
 - Cleaned up the src and init/sysconfig extraction
+
 * Sun Nov 21 2010 Jon Kent <jon.kent at, gmail.com> 1.1.0-1
 - First release of ptpd for Fedora
+


More information about the scm-commits mailing list