2017-03-30 10:14:07 +02:00
|
|
|
#
|
|
|
|
# spec file for package qclib
|
|
|
|
#
|
2020-01-21 19:54:26 +01:00
|
|
|
# Copyright (c) 2017-2020 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-03-30 10:14:07 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-04-30 23:40:06 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-03-30 10:16:42 +02:00
|
|
|
#
|
|
|
|
|
2017-03-30 10:14:07 +02:00
|
|
|
|
|
|
|
Name: qclib
|
2020-01-21 19:54:26 +01:00
|
|
|
Version: 2.0.1
|
2017-03-30 10:14:07 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Query Capacity library
|
|
|
|
License: BSD-3-Clause
|
2017-03-30 10:16:42 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2019-04-30 23:40:06 +02:00
|
|
|
URL: http://www.ibm.com/developerworks/linux/linux390/qclib.html
|
2017-03-30 19:11:43 +02:00
|
|
|
Source: %{name}-%{version}.tgz
|
|
|
|
Source1: %{name}-rpmlintrc
|
2017-03-30 10:16:42 +02:00
|
|
|
Patch1: qclib.makefile.libdir.patch
|
2017-03-30 10:14:07 +02:00
|
|
|
BuildRequires: doxygen
|
2017-03-30 10:16:42 +02:00
|
|
|
BuildRequires: gcc-c++
|
|
|
|
ExclusiveArch: s390 s390x
|
2017-03-30 10:14:07 +02:00
|
|
|
%if 0%{?suse_version} > 1300
|
|
|
|
BuildRequires: glibc-devel-static
|
|
|
|
%else
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
qclib provides a C API for extraction of system information for Linux on z
|
|
|
|
Systems.
|
|
|
|
|
|
|
|
For instance, it will provide the number of CPUs
|
|
|
|
* on the machine (CEC, Central Electronic Complex) layer
|
|
|
|
* on the PR/SM (Processor Resource/Systems Manager) layer, i.e. visible to
|
|
|
|
LPARs
|
|
|
|
* in z/VM hosts, guests and CPU pools
|
|
|
|
* in KVM hosts and guests
|
|
|
|
This allows calculating the upper limit of CPU resources a highest level guest
|
|
|
|
can use.
|
|
|
|
|
|
|
|
E.g.: If an LPAR on a z13 provides 4 CPUs to a z/VM hypervisor, and the
|
|
|
|
hypervisor provides 8 virtual CPUs to a guest, qclib can be used to retrieve
|
|
|
|
all of these numbers, and it can be concluded that not more capacity than 4
|
|
|
|
CPUs can be used by the software running in the guest.
|
|
|
|
|
|
|
|
qclib uses various interfaces and provides this data through a common and
|
|
|
|
consistent API (Application Programming Interface), using information provided
|
|
|
|
by:
|
|
|
|
* STSI (Store System Information) instruction - for more details, refer to
|
|
|
|
the z/Architecture Principles of Operation (SA22-7832)
|
|
|
|
* STHYI (Store Hypervisor Information) instruction as provided by a z/VM
|
|
|
|
hypervisor - for more information, refer to z/VM: V6R3 CP Programming
|
|
|
|
Service (SC24-6179), chapter 'Store Hypervisor Information (STHYI)
|
|
|
|
Instruction'.
|
|
|
|
* hypfs file system - for more information, refer to 'Device Drivers,
|
|
|
|
Features, and Commands', chapter 'S/390 hypervisor file system'.
|
|
|
|
|
2019-11-26 21:04:30 +01:00
|
|
|
%package -n libqc2
|
2017-03-30 10:14:07 +02:00
|
|
|
Summary: Query Capacity Library shared library
|
2017-04-07 21:38:53 +02:00
|
|
|
Group: System/Libraries
|
2019-11-26 21:04:30 +01:00
|
|
|
Obsoletes: libqc1
|
|
|
|
Provides: libqc1
|
2017-03-30 10:16:42 +02:00
|
|
|
|
2019-11-26 21:04:30 +01:00
|
|
|
%description -n libqc2
|
2017-03-30 10:14:07 +02:00
|
|
|
qclib provides a C API for extraction of system information for Linux on z
|
|
|
|
Systems.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for Query Capacity library
|
2017-04-07 21:38:53 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2019-11-26 21:04:30 +01:00
|
|
|
Requires: libqc2 = %{version}-%{release}
|
2017-03-30 10:16:42 +02:00
|
|
|
|
2017-03-30 10:14:07 +02:00
|
|
|
%description devel
|
|
|
|
qclib provides a C API for extraction of system information for Linux on z
|
|
|
|
Systems.
|
|
|
|
|
2017-04-07 22:26:39 +02:00
|
|
|
%package devel-static
|
|
|
|
Summary: Development files for Query Capacity library
|
2017-12-01 00:24:36 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2019-11-26 21:04:30 +01:00
|
|
|
Requires: libqc2 = %{version}-%{release}
|
2017-04-07 22:32:42 +02:00
|
|
|
Requires: qclib-devel = %{version}-%{release}
|
2017-04-07 22:26:39 +02:00
|
|
|
|
|
|
|
%description devel-static
|
|
|
|
qclib provides a C API for extraction of system information for Linux on z
|
|
|
|
Systems.
|
|
|
|
|
2017-03-30 10:14:07 +02:00
|
|
|
%prep
|
2019-11-26 21:04:30 +01:00
|
|
|
%autosetup -p 1
|
2017-03-30 10:14:07 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
MYCFLAGS=$(grep ^CFLAGS Makefile | cut -f2 -d=)
|
2019-04-30 23:40:06 +02:00
|
|
|
make %{?_smp_mflags} all CFLAGS="${MYCFLAGS} %{optflags}"
|
|
|
|
make %{?_smp_mflags} doc
|
2017-03-30 10:14:07 +02:00
|
|
|
|
|
|
|
%check
|
2019-04-30 23:40:06 +02:00
|
|
|
make %{?_smp_mflags} test
|
|
|
|
make %{?_smp_mflags} test-sh
|
2017-03-30 10:14:07 +02:00
|
|
|
|
|
|
|
%install
|
2017-03-30 10:16:42 +02:00
|
|
|
%make_install LIBDIR=%{_lib} V=1
|
|
|
|
make installdoc DESTDIR=%{buildroot} V=1
|
2017-03-30 10:14:07 +02:00
|
|
|
|
2019-11-26 21:04:30 +01:00
|
|
|
%post -n libqc2 -p /sbin/ldconfig
|
2017-03-30 10:14:07 +02:00
|
|
|
|
2019-11-26 21:04:30 +01:00
|
|
|
%postun -n libqc2 -p /sbin/ldconfig
|
2017-03-30 10:14:07 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_docdir}/%{name}
|
|
|
|
%{_docdir}/%{name}/*
|
|
|
|
|
2019-11-26 21:04:30 +01:00
|
|
|
%files -n libqc2
|
2017-03-30 10:16:42 +02:00
|
|
|
%defattr(-,root,root)
|
2017-03-30 10:14:07 +02:00
|
|
|
%{_libdir}/libqc.so.*
|
|
|
|
|
|
|
|
%files devel
|
2017-03-30 10:16:42 +02:00
|
|
|
%defattr(-,root,root)
|
2017-03-30 10:14:07 +02:00
|
|
|
%{_includedir}/*.h
|
|
|
|
%{_libdir}/libqc.so
|
|
|
|
|
2017-04-07 22:26:39 +02:00
|
|
|
%files devel-static
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libqc.a
|
|
|
|
|
2017-03-30 10:14:07 +02:00
|
|
|
%changelog
|