[ttcp] spec clean up

Michal Sekletar msekleta at fedoraproject.org
Fri Aug 19 07:29:57 UTC 2011


commit a3f6d3ad3eca40e68ca68ec8262ad7261efae6cf
Author: Michal Sekletar <msekleta at redhat.com>
Date:   Fri Aug 19 09:25:52 2011 +0200

    spec clean up

 ttcp.spec |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/ttcp.spec b/ttcp.spec
index f0683ce..e2219c1 100644
--- a/ttcp.spec
+++ b/ttcp.spec
@@ -1,7 +1,7 @@
 Summary: A tool for testing TCP connections
 Name: ttcp
 Version: 1.12
-Release: 22%{?dist}
+Release: 23%{?dist}
 URL:	ftp://ftp.sgi.com/sgi/src/ttcp/
 Source0: ftp://ftp.sgi.com/sgi/src/ttcp/ttcp.c
 Source1: ftp://ftp.sgi.com/sgi/src/ttcp/ttcp.1
@@ -12,7 +12,6 @@ Patch2: ttcp-GNU.patch
 BuildRequires: glibc-headers
 Group: Applications/Internet
 License: Public Domain
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
 ttcp is a tool for testing the throughput of TCP connections.  Unlike other
@@ -22,31 +21,31 @@ more accurate results.
 
 %prep
 %setup -c -T -q
-cp %{SOURCE0} %{SOURCE1} %{SOURCE2} .
+cp -a %{SOURCE0} %{SOURCE1} %{SOURCE2} .
 %patch0 -p1 -b .big
 %patch1 -p1 -b .malloc
 %patch2 -p1 -b .GNU
-chmod 644 *
 
 %build
 %{__cc} -o ttcp $RPM_OPT_FLAGS ttcp.c
 
 %install
-[ "$RPM_BUILD_ROOT" != "/" ] && rm -fr $RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT{%{_mandir}/man1,%{_bindir}}
-install -m755 ttcp $RPM_BUILD_ROOT%{_bindir}
-install -m644 ttcp.1 $RPM_BUILD_ROOT%{_mandir}/man1
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+install -p -m755 ttcp $RPM_BUILD_ROOT%{_bindir}
+install -p -m644 ttcp.1 $RPM_BUILD_ROOT%{_mandir}/man1
 
 %files
 %defattr(-,root,root,-)
 %doc README
-%{_bindir}/*
-%{_mandir}/*/*
+%{_bindir}/ttcp
+%{_mandir}/man1/ttcp.1*
 
 %changelog
+* Thu Aug 18 2011 Michal Sekletar <msekleta at redhat.com> - 1.12-23
+- spec clean up
+- added option to cp and install, thus ownership and timestamps are preserved
+- removed BuildRoot tag, clean section and buildroot clean up before install
+
 * Wed Aug 17 2011 Michal Sekletar <msekleta at redhat.com> - 1.12-22
 - Minor fixes, source file ttcp.c can be patched successfully
 - ttcp-inet.patch no longer needed - removed from repository


More information about the scm-commits mailing list