forked from pool/qclib
Accepting request 483470 from openSUSE:Factory:zSystems
Per Factory First policy, package for SLES12 SP3. Please also make me maintainer of the package in hardware project. Thanks. OBS-URL: https://build.opensuse.org/request/show/483470 OBS-URL: https://build.opensuse.org/package/show/hardware/qclib?expand=0&rev=1
This commit is contained in:
128
qclib.spec
Normal file
128
qclib.spec
Normal file
@@ -0,0 +1,128 @@
|
||||
#
|
||||
# spec file for package qclib
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX 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://bugzilla.suse.com/
|
||||
|
||||
Name: qclib
|
||||
Version: 1.2.0
|
||||
Release: 0
|
||||
Url: http://www.ibm.com/developerworks/linux/linux390/qclib.html
|
||||
Summary: Query Capacity library
|
||||
License: BSD-3-Clause
|
||||
Group: Development/System
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: doxygen
|
||||
%if 0%{?suse_version} > 1300
|
||||
BuildRequires: glibc-devel-static
|
||||
%else
|
||||
BuildRequires: glibc-devel
|
||||
%endif
|
||||
|
||||
Source: %{name}-%{version}.tgz
|
||||
Patch1: qclib.makefile.libdir.patch
|
||||
Patch2: qclib.correctly.interpret.sthyi.check.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
ExclusiveArch: s390 s390x
|
||||
|
||||
%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'.
|
||||
|
||||
%package -n libqclib1
|
||||
Summary: Query Capacity Library shared library
|
||||
%description -n libqclib1
|
||||
qclib provides a C API for extraction of system information for Linux on z
|
||||
Systems.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for Query Capacity library
|
||||
Requires: libqclib1 = %{version}-%{release}
|
||||
%description devel
|
||||
qclib provides a C API for extraction of system information for Linux on z
|
||||
Systems.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
MYCFLAGS=$(grep ^CFLAGS Makefile | cut -f2 -d=)
|
||||
make all CFLAGS="${MYCFLAGS} ${RPM_OPT_FLAGS}"
|
||||
make doc
|
||||
|
||||
%check
|
||||
make test
|
||||
make test-sh
|
||||
|
||||
%install
|
||||
%ifarch s390x
|
||||
LIBDIR=lib64
|
||||
%else
|
||||
LIBDIR=lib
|
||||
%endif
|
||||
|
||||
%make_install LIBDIR=${LIBDIR} V=1
|
||||
make installdoc DESTDIR=${RPM_BUILD_ROOT} V=1
|
||||
|
||||
%post -n libqclib1
|
||||
ldconfig
|
||||
|
||||
%postun -n libqclib1
|
||||
ldconfig
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%dir %{_docdir}/%{name}
|
||||
%{_docdir}/%{name}/*
|
||||
|
||||
%files -n libqclib1
|
||||
%{_libdir}/libqc.so.*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/*.h
|
||||
%{_libdir}/libqc.a
|
||||
%{_libdir}/libqc.so
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user