File blktrace.spec of Package blktrace

# spec file for package blktrace
# 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

%{!?_without_docs: %global with_docs 1}

Name:           blktrace
Summary:        Block IO tracer
License:        GPL-2.0
Group:          Development/Tools/Other
Version:        1.1.0
Release:        0
Url:  ;a=summary
Patch0:         blkparse-track-smallest-sequence-read-per-device.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gcc
BuildRequires:  libaio-devel
%if 0%{?with_docs}
BuildRequires:  texlive
BuildRequires:  texlive-latex
%if 0%{?suse_version} > 1220
BuildRequires:  texlive-amsfonts
BuildRequires:  texlive-cm
BuildRequires:  texlive-cm-super
BuildRequires:  texlive-dvipdfm
BuildRequires:  texlive-dvipdfmx
BuildRequires:  texlive-pdftex
BuildRequires:  tex(multirow.sty)
BuildRequires:  tex(placeins.sty)
BuildRequires:  te_latex
BuildRequires:  tetex

blktrace is a block layer IO tracing mechanism which provides detailed
information about request queue operations up to user space. This is
valuable for diagnosing and fixing performance or application problems
relating to block layer io.

%setup -q
%patch0 -p1

make CFLAGS="%{optflags}" all %{?with_docs: docs} -j1

make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} mandir=%{_mandir} install
# move blktrace to /bin (bug #300186)
mkdir -p %{buildroot}/bin
mv %{buildroot}%{_bindir}/{blktrace,blkparse,btrace} \

%doc README %{?with_docs: doc/blktrace.pdf btreplay/doc/btreplay.pdf btt/doc/btt.pdf}