File likwid.spec of Package likwid

#
# spec file for package likwid
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# 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/
#

Name:           likwid
Version:        3.1.3
Release:        0
Summary:        Lightweight Performance Tools
License:        GPL-3.0
Group:          System/Monitoring
Url:            https://code.google.com/p/likwid/
Source:         http://ftp.fau.de/pub/likwid/likwid-%{version}.tar.gz
Patch0:         likwid-32bit.patch
Patch1:         likwid-optflags.patch
Patch2:         likwid-libdir.patch
Patch3:         likwid-perlapp.patch
Patch4:		likwid-3.1.3-loadData-for-i386.patch
Patch5:		likwid-fix-i586.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64


%description
Likwid stands for Like I knew what I am doing. This project contributes easy to
use command line tools for Linux to support programmers in developing high
performance multi threaded programs.

%package devel
Summary:        Lightweight Performance Tools
Group:          Development/Libraries/C and C++

%description devel
Likwid stands for Like I knew what I am doing. This project contributes easy to
use command line tools for Linux to support programmers in developing high
performance multi threaded programs.

%prep
%setup -q
%ifarch i586
%patch0 -p1
%endif
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

%build
# don't use -j, breaks build
make \
    PREFIX="%{_prefix}" \
    LIBDIR="%{_libdir}" \
    MANPREFIX="%{_mandir}" \
    MSRDAEMON=NO \
    OPTFLAGS="%{optflags}" \
    Q=""

%install
make %{?_smp_mflags} \
    PREFIX="%{buildroot}%{_prefix}" \
    LIBDIR="%{buildroot}%{_libdir}" \
    MANPREFIX="%{buildroot}%{_mandir}" \
    MSRDAEMON=NO \
    OPTFLAGS="%{optflags}" \
    Q="" \
    install

mv "%{buildroot}%{_bindir}/feedGnuplot" \
      "%{buildroot}%{_bindir}/%{name}-feedGnuplot"


%files
%defattr(-,root,root)
%doc COPYING README
%{_bindir}/likwid-*
%{_sbindir}/likwid-*
%{_libdir}/liblikwidpin.so
%{_datadir}/likwid
%{_mandir}/man1/likwid-*.1*
%{_mandir}/man1/feedGnuplot.1*

%files devel
%defattr(-,root,root)
%{_includedir}/likwid.h
%dir %{_includedir}/likwid
%{_includedir}/likwid/*.h
%{_includedir}/likwid/perfmon_*.txt
%{_libdir}/liblikwid.a

%changelog
openSUSE Build Service is sponsored by