Spec cleanup.

OBS-URL: https://build.opensuse.org/package/show/hardware/qclib?expand=0&rev=2
This commit is contained in:
Ismail Dönmez 2017-03-30 08:16:42 +00:00 committed by Git OBS Bridge
parent 92671745b5
commit 083aa5c0f8

View File

@ -12,30 +12,30 @@
# 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/
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
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++
Group: Development/Libraries/C and C++
Url: http://www.ibm.com/developerworks/linux/linux390/qclib.html
Source: %{name}-%{version}.tgz
Patch1: qclib.makefile.libdir.patch
Patch2: qclib.correctly.interpret.sthyi.check.patch
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: s390 s390x
%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.
@ -68,6 +68,7 @@ by:
%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.
@ -75,18 +76,19 @@ 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}
%setup -q
%patch1 -p1
%patch2 -p1
%build
MYCFLAGS=$(grep ^CFLAGS Makefile | cut -f2 -d=)
make all CFLAGS="${MYCFLAGS} ${RPM_OPT_FLAGS}"
make all CFLAGS="${MYCFLAGS} %{optflags}"
make doc
%check
@ -94,23 +96,12 @@ make test
make test-sh
%install
%ifarch s390x
LIBDIR=lib64
%else
LIBDIR=lib
%endif
%make_install LIBDIR=%{_lib} V=1
make installdoc DESTDIR=%{buildroot} V=1
%make_install LIBDIR=${LIBDIR} V=1
make installdoc DESTDIR=${RPM_BUILD_ROOT} V=1
%post -n libqclib1 -pldconfig
%post -n libqclib1
ldconfig
%postun -n libqclib1
ldconfig
%clean
rm -rf ${RPM_BUILD_ROOT}
%postun -n libqclib1 -p ldconfig
%files
%defattr(-,root,root)
@ -118,9 +109,11 @@ rm -rf ${RPM_BUILD_ROOT}
%{_docdir}/%{name}/*
%files -n libqclib1
%defattr(-,root,root)
%{_libdir}/libqc.so.*
%files devel
%defattr(-,root,root)
%{_includedir}/*.h
%{_libdir}/libqc.a
%{_libdir}/libqc.so