- Switch on _multibuild with the separate test step (to minimize

dependencies).

OBS-URL: https://build.opensuse.org/package/show/science/mpdecimal?expand=0&rev=3
This commit is contained in:
Matej Cepl 2021-09-02 13:08:26 +00:00 committed by Git OBS Bridge
parent 1d08a161f5
commit da436e1a4a
3 changed files with 34 additions and 6 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Sep 2 13:07:52 UTC 2021 - Matej Cepl <mcepl@suse.com>
- Switch on _multibuild with the separate test step (to minimize
dependencies).
-------------------------------------------------------------------
Tue Aug 10 00:04:52 UTC 2021 - Stefan Krah <skrah@bytereef.org>

View File

@ -1,5 +1,5 @@
#
# spec file for package mpdecimal
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -16,7 +16,15 @@
#
Name: mpdecimal
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: mpdecimal%{psuffix}
Version: 2.5.1
Release: 0
Summary: C/C++ libraries for arbitrary precision decimal floating point arithmetic
@ -29,7 +37,9 @@ BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: make
%if %{with test}
BuildRequires: unzip
%endif
%description
libmpdec is a C implementation of the General Decimal Arithmetic
@ -78,8 +88,11 @@ The package contains documentation and development headers for
libmpdec and libmpdec++.
%prep
%autosetup
%autosetup -p1 -n mpdecimal-%{version}
%if %{with test}
unzip -d tests/testdata %{SOURCE1}
%endif
%build
# NOTE: without -ffat-lto-objects the inline assembly tests in ./configure
@ -89,14 +102,19 @@ export CXXFLAGS="$CFLAGS"
%configure --docdir="%{_defaultdocdir}/%{name}"
%make_build
%check
%make_build check
%install
%if !%{with test}
%make_install
rm -f "%{buildroot}/%{_libdir}"/*.a
%fdupes -s %{buildroot}/%{_docdir}/%{name}
%endif
%check
%if %{with test}
%make_build check
%endif
%if !%{with test}
%post -n libmpdec3 -p /sbin/ldconfig
%post -n libmpdec++3 -p /sbin/ldconfig
%postun -n libmpdec3 -p /sbin/ldconfig
@ -118,5 +136,6 @@ rm -f "%{buildroot}/%{_libdir}"/*.a
%{_libdir}/libmpdec++.so
%{_includedir}/mpdecimal.h
%{_includedir}/decimal.hh
%endif
%changelog