File intel-cmt-cat.spec of Package intel-cmt-cat

#
# spec file for package intel-cmt-cat
#
# Copyright (c) 2016 Intel Corporation
# Copyright (c) 2017 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/
#


Name:           intel-cmt-cat
Version:        0.1.5
Release:        0
Summary:        Provides command line interface to CMT, MBM, CAT and CDP technologies
License:        BSD-3-Clause
Group:          Development/Tools
Url:            https://github.com/01org/%{name}
Source0:        %{name}-%{version}.tar.gz
Patch0:         fix-dynlib-generation.patch
Patch1:         fix-ldconfig-call.patch
BuildRequires:  doxygen
ExclusiveArch:  x86_64 i686 i586

# Since they ship libpqos and the binaries in one package but do not simultatious
# updates libversion can differ from binaries version.
%global libversion 0.1.16
%global libname libpqos0

%global make_flags EXTRA_CFLAGS="%{optflags}" SHARED=y PREFIX=%{buildroot}/%{_prefix} MAN_DIR=%{buildroot}/%{_mandir}/man8 LIB_INSTALL_DIR=%{buildroot}%{_libdir}/

%description
This software package provides basic support for
Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
Cache Allocation Technology (CAT) and Code Data Prioratization (CDP).

CMT, MBM and CAT are configured using Model Specific Registers (MSRs)
to measure last level cache occupancy, set up the class of service masks and
manage the association of the cores/logical threads to a class of service.
The software executes in user space, and access to the MSRs is
obtained through a standard Linux* interface. The virtual file system
provides an interface to read and write the MSR registers but
it requires root privileges.

%package     -n %{libname}
Version:        %{libversion}
Release:        0
Summary:        Runtime qpos library
Group:          System/Libraries

%description -n %{libname}
This package contains the shared qpos library.

%package     -n %{libname}-devel
Version:        %{libversion}
Release:        0
Summary:        Development package for %{libname}
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{libversion}

%description    -n %{libname}-devel
This package contains all that is needed to develop/compile
applications that use Qpos.

%prep
%setup
%patch0 -p1
%patch1 -p1

%build
make %{?_smp_mflags} %{make_flags}

%install
make %{make_flags} install

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%files
%defattr(-, root, root, -)
%doc LICENSE ChangeLog
%{_bindir}/pqos
%{_mandir}/man8/pqos.8.gz
%{_bindir}/rdtset
%{_mandir}/man8/rdtset.8.gz

%files -n %{libname}-devel
%defattr(-, root, root, -)
%{_includedir}/pqos.h
%{_libdir}/*.so

%files     -n %{libname}
%defattr(-, root, root, -)
%{_libdir}/*.so.*

%changelog
openSUSE Build Service is sponsored by