From d524edce8b7176c2642a69f0217909fb5d3d0c7e Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Tue, 17 Jan 2023 14:59:58 +0100 Subject: [PATCH] RHEL: Import from Fedora Resolves: rhbz#2157620 --- .gitignore | 2 + mpdecimal.spec | 96 ++++++++++++++++++++++++++++++++++++++++++ sources | 2 + tests/tests_python.yml | 17 ++++++++ 4 files changed, 117 insertions(+) create mode 100644 mpdecimal.spec create mode 100644 sources create mode 100644 tests/tests_python.yml diff --git a/.gitignore b/.gitignore index e69de29..79eaebd 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/dectest.zip +/mpdecimal-2.5.1.tar.gz diff --git a/mpdecimal.spec b/mpdecimal.spec new file mode 100644 index 0000000..a18309d --- /dev/null +++ b/mpdecimal.spec @@ -0,0 +1,96 @@ +# versioned documentation for old releases +%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} + +Name: mpdecimal +Version: 2.5.1 +Release: 1%{?dist} +Summary: Library for general decimal arithmetic +License: BSD + +URL: http://www.bytereef.org/mpdecimal/index.html +Source0: http://www.bytereef.org/software/mpdecimal/releases/mpdecimal-%{version}.tar.gz +Source1: http://speleotrove.com/decimal/dectest.zip + +BuildRequires: make +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: unzip + +%description +The package contains a library limpdec implementing General Decimal Arithmetic +Specification. The specification, written by Mike Cowlishaw from IBM, defines +a general purpose arbitrary precision data type together with rigorously +specified functions and rounding behavior. + +%package devel +Requires: %{name}%{?_isa} = %{version}-%{release} +Summary: Development headers for mpdecimal library + +%description devel +The package contains development headers for the mpdecimal library. + +%package doc +Summary: Documentation for mpdecimal library +# docs is FBSDDL +# bundles underscore.js: MIT +# bundles jquery: MIT or GPLv2 +# jquery bundles sizzle.js: MIT and BSD and GPL +License: FBSDDL and BSD and GPL +BuildArch: noarch +Provides: bundled(js-jquery) = 1.7.2 +Provides: bundled(js-underscore) = 1.4.4 + +%description doc +The package contains documentation for the mpdecimal library. + +%prep +%autosetup +unzip -d tests/testdata %{SOURCE1} + +%build +# Force -ffat-lto-objects so that configure tests are assembled which +# is required for ASM configure tests. -ffat-lto-objects is the default +# for F33, but will not be the default in F34 +#define _lto_cflags -flto=auto -ffat-lto-objects + +%configure +make %{?_smp_mflags} + +%check +make check + +%install +%make_install +rm -f %{buildroot}%{_libdir}/*.a + +# license will go into dedicated directory +rm -f %{buildroot}%{_docdir}/%{name}/LICENSE.txt + +# relocate documentation if versioned documentation is used +if [ "%{_pkgdocdir}" != "%{_docdir}/%{name}" ]; then + install -d -m 0755 %{buildroot}%{_pkgdocdir} + mv -v %{buildroot}%{_docdir}/%{name}/* %{buildroot}%{_pkgdocdir}/ +fi + +%files +%license LICENSE.txt +%{_libdir}/libmpdec.so.%{version} +%{_libdir}/libmpdec.so.3 +%{_libdir}/libmpdec++.so.%{version} +%{_libdir}/libmpdec++.so.3 + +%files devel +%{_libdir}/libmpdec.so +%{_libdir}/libmpdec++.so +%{_includedir}/mpdecimal.h +%{_includedir}/decimal.hh + +%files doc +%license doc/LICENSE.txt +%doc %{_pkgdocdir} + +%ldconfig_scriptlets + +%changelog +* Tue Jan 17 2023 Charalampos Stratakis - 2.5.1-1 +- Import into RHEL diff --git a/sources b/sources new file mode 100644 index 0000000..39a51e8 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (dectest.zip) = 05f9d12aec1ebfc9ca211b01705b41c5cd1bbc54d9aa6c4799b40fb3ab1835433fd1a277735d26d2530c3793c58b107b3abb1c31f64340e5e9d7856d92c821cf +SHA512 (mpdecimal-2.5.1.tar.gz) = 710cb5cb71dbcf3e170ca15869c148df0547b848400c6b6dd70c67d9961dbe1190af8fb4d1623bfb0ca2afe44f369a42e311ab5225ed89d4031cb49a3bd70f30 diff --git a/tests/tests_python.yml b/tests/tests_python.yml new file mode 100644 index 0000000..e1292bb --- /dev/null +++ b/tests/tests_python.yml @@ -0,0 +1,17 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/python.git" + dest: "python" + tests: + - python_selftest: + dir: python/selftest + run: X="test_decimal" ./parallel.sh + required_packages: + - python3-tkinter # for selftest + - python3-test # for selftest + - python3-rpm-macros # for dynamic python version