Blame SPECS/mpdecimal.spec

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