Blame SPECS/mpdecimal.spec

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