File time.spec of Package time

# spec file for package time
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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.

# Please submit bugfixes or comments via

Name:           time
Version:        1.7
Release:        0
Summary:        Run Programs And Summarize System Resource Usage
License:        GPL-2.0+
Group:          System/Base
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}.rpmlintrc
# Sync with:
# Debian version: 1.7-24, patch naming: s/^/time-debian-/
# Fedora version: 1.7-44, patch naming: s/^time-1.7/^time-fedora/
# PATCH-FIX-OPENSUSE time-alpha.patch -- Fix compilation on Alpha.
Patch1:         time-alpha.patch
# PATCH-FIX-OPENSUSE time-fsf-address.patch -- Fix FSF address.
Patch2:         time-fsf-address.patch
# Patch10 time-fedora-destdir.patch not applied, use Debian patch and autoreconf instead
# PATCH-FEATURE-FEDORA time-fedora-verbose.patch -- Roman Rakus <> - 1.7-33 - Added patch from JW (, less nonverbose output.
Patch11:        time-fedora-verbose.patch
# PATCH-FIX-FEDORA time-fedora-ru_maxrss-is-in-kilobytes-on-Linux.patch Redhat#702826 bnc#836049 -- Petr Pisar <> - 1.7-39 - Fix maximal RSS report.
Patch12:        time-fedora-ru_maxrss-is-in-kilobytes-on-Linux.patch
# Bug Redhat#527276 Recompute CPU usage at microsecond level
# PATCH-FEATURE-FEDORA time-fedora-Recompute-CPU-usage-at-microsecond-level.patch Redhat#527276 -- H.J. Lu <> - Switch to microsecond accuracy if miliseconds arithmetic rounds to zero.
Patch13:        time-fedora-Recompute-CPU-usage-at-microsecond-level.patch
# PATCH-FIX-DEBIAN time-debian-non-normal-exit.patch -- When time exits in a non-normal way, return 128 plus the number of the signal which caused time to stop or abort.
Patch20:        time-debian-non-normal-exit.patch
# Patch21 time-debian-ru_maxrss.patch not applied, Fedora had it earlier.
# PATCH-FIX-DEBIAN time-debian-rusage-portability.patch Debian#144819 -- struct rusage and sys/resource.h portability fix.
Patch22:        time-debian-rusage-portability.patch
# PATCH-FEATURE-DEBIAN time-debian-quiet.patch Debian#56853 -- Add -q,--quiet functionality.
Patch23:        time-debian-quiet.patch
# PATCH-FIX-DEBIAN time-debian-bug-address.patch Debian#542469 -- Update bug reporting address.
Patch24:        time-debian-bug-address.patch
# PATCH-FIX-DEBIAN time-debian-configure.patch -- Modernize the file to current autoconf style.
Patch25:        time-debian-configure.patch
# PATCH-FEATURE-DEBIAN time-debian-info-direntry.patch -- Add a directory entry to the info page.
Patch26:        time-debian-info-direntry.patch
# PATCH-FEATURE-DEBIAN time-debian-info-nav.patch -- Fix info navigation structure. Reported by Russ Allbery. Author: Bob Proulx.
Patch27:        time-debian-info-nav.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  makeinfo
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %install_info_prereq
# Split-provides for openSUSE <= 12.3 and SLE <= 11:
Provides:       util-linux:/usr/bin/time

The "time" command runs another program, then displays information
about the resources used by that program, collected by the system
while the program was running.

%setup -q
%patch1 -p1
%patch2 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch20 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1

autoreconf -f -i
make %{?_smp_mflags}

install -d %{buildroot}%{_mandir}/man1

%install_info --entry="* time: (time). summarizing used system resources" --info-dir="%_infodir" "%_infodir/"

%install_info_delete --info-dir="%_infodir" "%_infodir/"