File schedtop.spec of Package schedtop

#
# spec file for package schedtop
#
# Copyright (c) 2011 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 http://bugs.opensuse.org/
#


%define rpmrel 1
%if 0%{?suse_version} > 1100
%define boostdeps boost-devel
%else
%if 0%{?suse_version} == 1110
%define boostdeps boost-devel libboost_regex1_36 libboost_program_options1_36 libboost_filesystem1_36
%else
%define boostdeps boost
%endif
%endif
BuildRequires:  %{boostdeps}
BuildRequires:  gcc-c++
BuildRequires:  ncurses-devel
Summary:        Displays Scheduler Statistics
License:        GPL-2.0+
Group:          System/Monitoring

Name:           schedtop
Version:        1.1
Release:        0
Requires:       ncurses
Source:         %{name}-%{version}.tar.gz
Patch0:         schedtop-cxxflags.patch
Patch1:         schedtop-boost_filesystem_changes.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This utility will process statistics from /proc/schedstat such that the
busiest stats will bubble up to the top.  It can alternately be sorted by
the largest stat, or by name.  Stats can be included or excluded based on
reg-ex pattern matching.

Authors
--------------------------
  Gregory Haskins <ghaskins@novell.com>

%prep
%setup -q
%patch0
%patch1

%build
make CXXFLAGS="%{optflags}"

%install
make install PREFIX=$RPM_BUILD_ROOT
# Install documentation  
%{__mkdir_p} %{buildroot}/%{_defaultdocdir}/schedtop  
%{__mkdir_p} %{buildroot}/%{_mandir}/man1  
%{__gzip} *.1  
%{__cp} *.1.gz %{buildroot}/%{_mandir}/man1  

%clean
make clean

%files
%defattr(-,root,root)
/usr/bin/schedtop
%{_mandir}/man1/*  
%{_defaultdocdir}/*

%changelog