# versioned documentation for old releases %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/mpdecimal-%{version}} Name: mpdecimal250-compat Version: 2.5.0 Release: 1.0.riscv64%{?dist} Summary: Library for general decimal arithmetic License: BSD URL: http://www.bytereef.org/mpdecimal/index.html Source0: http://www.bytereef.org/software/mpdecimal/releases/mpdecimal-%{version}.tar.gz Source1: http://speleotrove.com/decimal/dectest.zip BuildRequires: make BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: unzip # Patch provided by upstream Patch0: mpdecimal-2.5.0-tests-fix.patch %description The package contains a library limpdec implementing General Decimal Arithmetic Specification. The specification, written by Mike Cowlishaw from IBM, defines a general purpose arbitrary precision data type together with rigorously specified functions and rounding behavior. %package doc Summary: Documentation for mpdecimal library # docs is FBSDDL # bundles underscore.js: MIT # bundles jquery: MIT or GPLv2 # jquery bundles sizzle.js: MIT and BSD and GPL License: FBSDDL and BSD and GPL BuildArch: noarch Provides: bundled(js-jquery) = 1.7.2 Provides: bundled(js-underscore) = 1.4.4 %description doc The package contains documentation for the mpdecimal library. %prep %setup -n mpdecimal-%{version} %patch0 -p1 unzip -d tests/testdata %{SOURCE1} %build # Force -ffat-lto-objects so that configure tests are assembled which # is required for ASM configure tests. -ffat-lto-objects is the default # for F33, but will not be the default in F34 #define _lto_cflags -flto=auto -ffat-lto-objects %configure make %{?_smp_mflags} %check make check %install %make_install rm -f %{buildroot}%{_libdir}/*.a # license will go into dedicated directory rm -f %{buildroot}%{_docdir}/%{name}/LICENSE.txt # relocate documentation if versioned documentation is used if [ "%{_pkgdocdir}" != "%{_docdir}/%{name}" ]; then install -d -m 0755 %{buildroot}%{_pkgdocdir} mv -v %{buildroot}%{_docdir}/%{name}/* %{buildroot}%{_pkgdocdir}/ fi rm -rfv \ %{buildroot}%{_libdir}/libmpdec.so \ %{buildroot}%{_libdir}/libmpdec++.so \ %{buildroot}%{_includedir}/mpdecimal.h \ %{buildroot}%{_includedir}/decimal.hh %files %license LICENSE.txt %{_libdir}/libmpdec.so.* %{_libdir}/libmpdec++.so.* %files doc %license doc/LICENSE.txt %doc %{_pkgdocdir} %ldconfig_scriptlets %changelog * Tue Sep 27 2022 David Abdurachmanov - 2.5.0-4.0.riscv64 - Initial version. Only for Fedora/RISCV (bootstrap).