Blame SPECS/intel-cmt-cat.spec

c2ce0a
# Copyright (c) 2016-2019, Intel Corporation
c2ce0a
#
fe6370
# Redistribution and use in source and binary forms, with or without
fe6370
# modification, are permitted provided that the following conditions are met:
c2ce0a
#
fe6370
#     * Redistributions of source code must retain the above copyright notice,
fe6370
#       this list of conditions and the following disclaimer.
fe6370
#     * Redistributions in binary form must reproduce the above copyright
fe6370
#       notice, this list of conditions and the following disclaimer in the
fe6370
#       documentation and/or other materials provided with the distribution.
fe6370
#     * Neither the name of Intel Corporation nor the names of its contributors
fe6370
#       may be used to endorse or promote products derived from this software
fe6370
#       without specific prior written permission.
c2ce0a
#
fe6370
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
fe6370
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
fe6370
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
fe6370
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
fe6370
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
fe6370
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
fe6370
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
fe6370
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
fe6370
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
fe6370
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
fe6370
c2ce0a
%global githubname   intel-cmt-cat
c2ce0a
%global githubver    3.0.1
fe6370
c2ce0a
%if %{defined githubsubver}
c2ce0a
%global githubfull   %{githubname}-%{githubver}.%{githubsubver}
fe6370
%else
c2ce0a
%global githubfull   %{githubname}-%{githubver}
fe6370
%endif
fe6370
c2ce0a
# disable producing debuginfo for this package
c2ce0a
%global debug_package %{nil}
fe6370
fe6370
c2ce0a
Summary:            Provides command line interface to CMT, MBM, CAT, CDP and MBA technologies
c2ce0a
Name:               %{githubname}
c2ce0a
Release:            1%{?dist}
c2ce0a
Version:            %{githubver}
fe6370
License:            BSD
fe6370
ExclusiveArch:      x86_64 i686 i586
c2ce0a
%if %{defined githubsubver}
c2ce0a
Source:             https://github.com/01org/%{githubname}/archive/v%{githubver}.%{githubsubver}.tar.gz
fe6370
%else
c2ce0a
Source:             https://github.com/01org/%{githubname}/archive/v%{githubver}.tar.gz
fe6370
%endif
fe6370
URL:                https://github.com/01org/%{githubname}
c2ce0a
BuildRequires:      gcc, make
fe6370
fe6370
%description
fe6370
This software package provides basic support for
fe6370
Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
c2ce0a
Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA),
c2ce0a
and Code Data Prioratization (CDP).
fe6370
fe6370
CMT, MBM and CAT are configured using Model Specific Registers (MSRs)
fe6370
to measure last level cache occupancy, set up the class of service masks and
fe6370
manage the association of the cores/logical threads to a class of service.
fe6370
The software executes in user space, and access to the MSRs is
fe6370
obtained through a standard Linux* interface. The virtual file system
fe6370
provides an interface to read and write the MSR registers but
fe6370
it requires root privileges.
fe6370
c2ce0a
%package -n intel-cmt-cat-devel
c2ce0a
Summary:            Library and sample code to use CMT, MBM, CAT, CDP and MBA technologies
c2ce0a
License:            BSD
c2ce0a
Requires:           intel-cmt-cat == %{version}
c2ce0a
ExclusiveArch:      x86_64 i686 i586
fe6370
c2ce0a
%description -n intel-cmt-cat-devel
c2ce0a
This software package provides basic support for
c2ce0a
Cache Monitoring Technology (CMT), Memory Bandwidth Monitoring (MBM),
c2ce0a
Cache Allocation Technology (CAT), Memory Bandwidth Allocation (MBA),
c2ce0a
and Code Data Prioratization (CDP).
c2ce0a
The package includes library, header file and sample code.
c2ce0a
c2ce0a
For additional information please refer to:
c2ce0a
https://github.com/01org/%{githubname}
c2ce0a
c2ce0a
%prep
fe6370
%autosetup -n %{githubfull}
fe6370
fe6370
%post -p /sbin/ldconfig
c2ce0a
c2ce0a
%postun -p /sbin/ldconfig
fe6370
fe6370
%build
fe6370
make %{?_smp_mflags}
fe6370
fe6370
%install
fe6370
# Not doing make install as it strips the symbols.
fe6370
# Using files from the build directory.
fe6370
install -d %{buildroot}/%{_bindir}
c2ce0a
install -s %{_builddir}/%{githubfull}/pqos/pqos %{buildroot}/%{_bindir}
c2ce0a
install %{_builddir}/%{githubfull}/pqos/pqos-os %{buildroot}/%{_bindir}
c2ce0a
install %{_builddir}/%{githubfull}/pqos/pqos-msr %{buildroot}/%{_bindir}
c2ce0a
sed -i "1s/.*/\#!\/usr\/bin\/bash/" %{buildroot}/%{_bindir}/pqos-*
fe6370
fe6370
install -d %{buildroot}/%{_mandir}/man8
fe6370
install -m 0644 %{_builddir}/%{githubfull}/pqos/pqos.8  %{buildroot}/%{_mandir}/man8
c2ce0a
ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-os.8
c2ce0a
ln -sf %{_mandir}/man8/pqos.8 %{buildroot}/%{_mandir}/man8/pqos-msr.8
fe6370
fe6370
install -d %{buildroot}/%{_bindir}
c2ce0a
install -s %{_builddir}/%{githubfull}/rdtset/rdtset %{buildroot}/%{_bindir}
fe6370
fe6370
install -d %{buildroot}/%{_mandir}/man8
fe6370
install -m 0644 %{_builddir}/%{githubfull}/rdtset/rdtset.8  %{buildroot}/%{_mandir}/man8
fe6370
fe6370
install -d %{buildroot}/%{_licensedir}/%{name}-%{version}
fe6370
install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_licensedir}/%{name}-%{version}
fe6370
c2ce0a
# Install the library
fe6370
install -d %{buildroot}/%{_libdir}
c2ce0a
install -s %{_builddir}/%{githubfull}/lib/libpqos.so.* %{buildroot}/%{_libdir}
c2ce0a
cp -a %{_builddir}/%{githubfull}/lib/libpqos.so %{buildroot}/%{_libdir}
c2ce0a
cp -a %{_builddir}/%{githubfull}/lib/libpqos.so.3 %{buildroot}/%{_libdir}
fe6370
c2ce0a
# Install the header file
c2ce0a
install -d %{buildroot}/%{_includedir}
c2ce0a
install -m 0644 %{_builddir}/%{githubfull}/lib/pqos.h %{buildroot}/%{_includedir}
fe6370
c2ce0a
# Install license and sample code
c2ce0a
install -d %{buildroot}/%{_usrsrc}/%{githubfull}
c2ce0a
install -m 0644 %{_builddir}/%{githubfull}/LICENSE %{buildroot}/%{_usrsrc}/%{githubfull}
fe6370
c2ce0a
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c
c2ce0a
c2ce0a
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
c2ce0a
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/Makefile          %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
c2ce0a
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/reset_app.c       %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
c2ce0a
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l2cat.c  %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
c2ce0a
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_l3cat.c  %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
c2ce0a
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/allocation_app_mba.c  %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
c2ce0a
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CAT_MBA/association_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CAT_MBA
c2ce0a
c2ce0a
install -d %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
c2ce0a
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/Makefile      %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
c2ce0a
install -m 0644 %{_builddir}/%{githubfull}/examples/c/CMT_MBM/monitor_app.c %{buildroot}/%{_usrsrc}/%{githubfull}/c/CMT_MBM
fe6370
fe6370
%files
fe6370
%{_bindir}/pqos
c2ce0a
%{_bindir}/pqos-os
c2ce0a
%{_bindir}/pqos-msr
fe6370
%{_mandir}/man8/pqos.8.gz
c2ce0a
%{_mandir}/man8/pqos-os.8.gz
c2ce0a
%{_mandir}/man8/pqos-msr.8.gz
fe6370
%{_bindir}/rdtset
fe6370
%{_mandir}/man8/rdtset.8.gz
c2ce0a
%{_libdir}/libpqos.so.*
fe6370
fe6370
%{!?_licensedir:%global license %%doc}
fe6370
%license %{_licensedir}/%{name}-%{version}/LICENSE
fe6370
%doc ChangeLog README
fe6370
c2ce0a
%files -n intel-cmt-cat-devel
c2ce0a
%{_libdir}/libpqos.so
c2ce0a
%{_libdir}/libpqos.so.3
c2ce0a
%{_includedir}/pqos.h
c2ce0a
%{_usrsrc}/%{githubfull}/c/CAT_MBA/Makefile
c2ce0a
%{_usrsrc}/%{githubfull}/c/CAT_MBA/reset_app.c
c2ce0a
%{_usrsrc}/%{githubfull}/c/CAT_MBA/association_app.c
c2ce0a
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l2cat.c
c2ce0a
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_l3cat.c
c2ce0a
%{_usrsrc}/%{githubfull}/c/CAT_MBA/allocation_app_mba.c
c2ce0a
%{_usrsrc}/%{githubfull}/c/CMT_MBM/Makefile
c2ce0a
%{_usrsrc}/%{githubfull}/c/CMT_MBM/monitor_app.c
c2ce0a
%doc %{_usrsrc}/%{githubfull}/LICENSE
c2ce0a
fe6370
%changelog
c2ce0a
* Tue May 21 2019 Jiri Olsa <jolsa@redhat.com> 3.1.0-1
c2ce0a
- new version 3.1.0
c2ce0a
- change spec to follow fedora
c2ce0a
- Resolves: rhbz#1643196
c2ce0a
c2ce0a
* Thu Nov 15 2018 Jiri Olsa <jolsa@redhat.com> 2.1.0-1
c2ce0a
- new version 2.1.0
c2ce0a
- change spec to follow fedora
c2ce0a
- Resolves: rhbz#1643196
c2ce0a
fe6370
* Mon May 08 2017 Jiri Olsa <jolsa@redhat.com> 0.1.5-2
fe6370
- new version 0.1.5-1
fe6370
- change spec to follow fedora
fe6370
- Resolves: rhbz#1448539
fe6370
fe6370
* Thu May 04 2017 Jiri Olsa <jolsa@redhat.com> 0.1.5-1
fe6370
- Resolves: rhbz#1315489
fe6370
fe6370
* Thu Mar 30 2017 Jiri Olsa <jolsa@redhat.com> 0.1.4-5
fe6370
- Resolves: rhbz#1315489
fe6370
fe6370
* Fri Feb 17 2017 Gopal Tiwari <gtiwari@redhat.com> 0.1.4-4
fe6370
- Resolves: rhbz#1315489 
fe6370
fe6370
* Tue Apr 19 2016 Tomasz Kantecki <tomasz.kantecki@intel.com> 0.1.4-3
fe6370
- global typo fix
fe6370
- small edits in the description
fe6370
fe6370
* Mon Apr 18 2016 Tomasz Kantecki <tomasz.kantecki@intel.com> 0.1.4-2
fe6370
- LICENSE file added to the package
fe6370
fe6370
* Thu Apr 7 2016 Tomasz Kantecki <tomasz.kantecki@intel.com> 0.1.4-1
fe6370
- initial version of the package