Blame SPECS/mpdecimal.spec

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