Blame SPECS/mpdecimal.spec

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