File blktrace.spec of Package blktrace.8658

# spec file for package blktrace
# 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
# 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
Version:        1.1.0+git.20170126
Release:        0
Summary:        Block IO tracer
License:        GPL-2.0
Group:          Development/Tools/Other
Url:  ;a=summary
Source0:        %{name}-%{version}.tar.xz
Patch0:         blkparse-track-smallest-sequence-read-per-device.patch
Patch1:		btt-make-device-devno-use-path_max-to-avoid-overflow.patch
BuildRequires:  gcc
BuildRequires:  libaio-devel
# Required for older releases
BuildRequires:  xz
%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
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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
%patch1 -p1

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

make DESTDIR=%{buildroot} 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}

openSUSE Build Service is sponsored by