Blame SPECS/mpdecimal.spec

46a5cd
# versioned documentation for old releases
46a5cd
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
46a5cd
46a5cd
Name:           mpdecimal
46a5cd
Version:        2.5.1
46a5cd
Release:        3%{?dist}
46a5cd
Summary:        Library for general decimal arithmetic
46a5cd
License:        BSD
46a5cd
46a5cd
URL:            http://www.bytereef.org/mpdecimal/index.html
46a5cd
Source0:        http://www.bytereef.org/software/mpdecimal/releases/mpdecimal-%{version}.tar.gz
46a5cd
Source1:        http://speleotrove.com/decimal/dectest.zip
46a5cd
46a5cd
BuildRequires:  make
46a5cd
BuildRequires:  gcc
46a5cd
BuildRequires:  gcc-c++
46a5cd
BuildRequires:  unzip
46a5cd
46a5cd
%description
46a5cd
The package contains a library libmpdec implementing General Decimal
46a5cd
Arithmetic Specification. The specification, written by Mike Cowlishaw from
46a5cd
IBM, defines a general purpose arbitrary precision data type together with
46a5cd
rigorously specified functions and rounding behavior.
46a5cd
46a5cd
%package -n %{name}++
46a5cd
Requires:       %{name}%{?_isa} = %{version}-%{release}
46a5cd
Summary:        Library for general decimal arithmetic (C++)
46a5cd
46a5cd
%description -n %{name}++
46a5cd
The package contains a library libmpdec++ implementing General Decimal
46a5cd
Arithmetic Specification. The specification, written by Mike Cowlishaw from
46a5cd
IBM, defines a general purpose arbitrary precision data type together with
46a5cd
rigorously specified functions and rounding behavior.
46a5cd
46a5cd
%package        devel
46a5cd
Requires:       %{name}%{?_isa} = %{version}-%{release}
46a5cd
Requires:       %{name}++%{?_isa} = %{version}-%{release}
46a5cd
Summary:        Development headers for mpdecimal library
46a5cd
46a5cd
%description devel
46a5cd
The package contains development headers for the mpdecimal library.
46a5cd
46a5cd
%package        doc
46a5cd
Summary:        Documentation for mpdecimal library
46a5cd
# docs is FBSDDL
46a5cd
# bundles underscore.js: MIT
46a5cd
# bundles jquery: MIT
46a5cd
# jquery bundles sizzle.js: MIT
46a5cd
License:        FBSDDL and MIT
46a5cd
BuildArch:      noarch
46a5cd
Provides:       bundled(js-jquery) = 3.4.1
46a5cd
Provides:       bundled(js-underscore) = 1.3.1
46a5cd
46a5cd
%description doc
46a5cd
The package contains documentation for the mpdecimal library.
46a5cd
46a5cd
%prep
46a5cd
%autosetup
46a5cd
unzip -d tests/testdata %{SOURCE1}
46a5cd
46a5cd
%build
46a5cd
# Force -ffat-lto-objects so that configure tests are assembled which
46a5cd
# is required for ASM configure tests.  -ffat-lto-objects is the default
46a5cd
# for F33, but will not be the default in F34
46a5cd
#define _lto_cflags -flto=auto -ffat-lto-objects
46a5cd
46a5cd
%configure
46a5cd
make %{?_smp_mflags}
46a5cd
46a5cd
%check
46a5cd
make check
46a5cd
46a5cd
%install
46a5cd
%make_install
46a5cd
rm -f %{buildroot}%{_libdir}/*.a
46a5cd
46a5cd
# license will go into dedicated directory
46a5cd
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE.txt
46a5cd
46a5cd
# relocate documentation if versioned documentation is used
46a5cd
if [ "%{_pkgdocdir}" != "%{_docdir}/%{name}" ]; then
46a5cd
  install -d -m 0755 %{buildroot}%{_pkgdocdir}
46a5cd
  mv -v %{buildroot}%{_docdir}/%{name}/* %{buildroot}%{_pkgdocdir}/
46a5cd
fi
46a5cd
46a5cd
%files
46a5cd
%license LICENSE.txt
46a5cd
%{_libdir}/libmpdec.so.%{version}
46a5cd
%{_libdir}/libmpdec.so.3
46a5cd
46a5cd
%files -n %{name}++
46a5cd
%{_libdir}/libmpdec++.so.%{version}
46a5cd
%{_libdir}/libmpdec++.so.3
46a5cd
46a5cd
%files devel
46a5cd
%{_libdir}/libmpdec.so
46a5cd
%{_libdir}/libmpdec++.so
46a5cd
%{_includedir}/mpdecimal.h
46a5cd
%{_includedir}/decimal.hh
46a5cd
46a5cd
%files doc
46a5cd
%license doc/LICENSE.txt
46a5cd
%doc %{_pkgdocdir}
46a5cd
46a5cd
%ldconfig_scriptlets
46a5cd
46a5cd
%changelog
46a5cd
* Thu Jan 19 2023 Miro Hrončok <mhroncok@redhat.com> - 2.5.1-3
46a5cd
- Split libmpdec++ into a mpdecimal++ subpackage
46a5cd
- This prevents packages only using the libmpdec library from transitively depending on libstdc++
46a5cd
46a5cd
* Wed Jan 18 2023 Charalampos Stratakis <cstratak@redhat.com> - 2.5.1-2
46a5cd
- Fix license information
46a5cd
46a5cd
* Tue Jan 17 2023 Charalampos Stratakis <cstratak@redhat.com> - 2.5.1-1
46a5cd
- Import into RHEL
46a5cd
- Fedora contributions by:
46a5cd
      Charalampos Stratakis <cstratak@redhat.com>
46a5cd
      Igor Gnatenko <ignatenkobrain@fedoraproject.org>
46a5cd
      Jan Vcelak <jvcelak@fedoraproject.org>
46a5cd
      Jaroslav Škarvada <jskarvad@redhat.com>
46a5cd
      Jeff Law <law@redhat.com>
46a5cd
      Lukas Zachar <lzachar@redhat.com>
46a5cd
      Miro Hrončok <miro@hroncok.cz>
46a5cd
      Tom Stellard <tstellar@redhat.com>