# # spec file for package libtommath # # Copyright (c) 2024 SUSE LLC # Copyright (c) 2009 Exata T.I., Maringa, PR, Brasil. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: libtommath %define libsoname %{name}1 Version: 1.3.0 Release: 1.3 Summary: Routines For a Integer Based Number Theoretic Applications License: Unlicense Group: System/Libraries URL: https://github.com/libtom/libtommath Source: https://github.com/libtom/libtommath/releases/download/v%{version}/ltm-%{version}.tar.xz Source2: https://github.com/libtom/libtommath/releases/download/v%{version}/ltm-%{version}.tar.xz.asc Source3: %{name}.keyring Source4: baselibs.conf Source5: libtommath-rpmlintrc BuildRequires: dos2unix BuildRequires: libtool BuildRequires: pkg-config BuildRequires: xz BuildRoot: %{_tmppath}/%{name}-%{version}-build %{?suse_build_hwcaps_libs} %description LibTomMath provides highly optimized and portable routines for a vast majority of integer based number theoretic applications (including public key cryptography). LibTomMath is not a cryptographic toolkit itself but it can be used to write one [Used in LibTomCrypt for RSA, DH and ECC public key routines]. %package -n %{libsoname} Summary: Routines For a Integer Based Number Theoretic Applications Group: System/Libraries %description -n %{libsoname} LibTomMath provides highly optimized and portable routines for a vast majority of integer based number theoretic applications (including public key cryptography). LibTomMath is not a cryptographic toolkit itself but it can be used to write one [Used in LibTomCrypt for RSA, DH and ECC public key routines]. %package devel Summary: Development files for LibTomMath Group: Development/Libraries/C and C++ Requires: %{libsoname} = %{version} Provides: libtommath0-devel = %{version} Obsoletes: libtommath0-devel < 1 %description devel Headers and other development files for TomMath library. LibTomMath provides highly optimized and portable routines for a vast majority of integer based number theoretic applications (including public key cryptography). LibTomMath is not a cryptographic toolkit itself but it can be used to write one [Used in LibTomCrypt for RSA, DH and ECC public key routines]. %package examples Summary: Example files for LibTomMath Group: Development/Libraries/Other Provides: libtommath0-examples = %{version} Obsoletes: libtommath0-examples < 1 BuildArch: noarch %description examples Demo *.c files showing how to use TomMath library. LibTomMath provides highly optimized and portable routines for a vast majority of integer based number theoretic applications (including public key cryptography). LibTomMath is not a cryptographic toolkit itself but it can be used to write one [Used in LibTomCrypt for RSA, DH and ECC public key routines]. %prep %setup -q %build export CFLAGS="%{optflags}" make %{?_smp_mflags} LIBPATH=%{_libdir} -f makefile.shared %check make %{?_smp_mflags} test_standalone ./test rm -f demo/*.o %install dos2unix etc/timer.asm make DESTDIR=%{buildroot} LIBPATH=%{_libdir} INCPATH=%{_includedir} %{?_smp_mflags} -f makefile.shared install # we don't want to ship any static libraries or .la files find %{buildroot} -type f \( -name '*.a' -o -name '*.la' \) -delete -print chmod +x %{buildroot}%{_libdir}/libtommath.so.* %post -n %{libsoname} -p /sbin/ldconfig %postun -n %{libsoname} -p /sbin/ldconfig %files -n %{libsoname} %defattr(-,root,root) %if (0%{?suse_version} >= 1500) || (0%{?sle_version} >= 120300) %license LICENSE %else %doc LICENSE %endif %doc changes.txt %{_libdir}/libtommath.so.* %files devel %defattr(-,root,root) %attr(0644,root,root) %{_includedir}/tommath*.h %{_libdir}/libtommath.so %{_libdir}/pkgconfig/libtommath.pc %files examples %defattr(-,root,root) %doc demo etc mtest pre_gen %changelog * Mon Apr 22 2024 Dirk Müller - update to 1.3.0: * Deprecate more APIs which are replaced in develop * Add support for CMake (PR #573) * Add support for GitHub Actions (PR #573) * Wed Oct 18 2023 Dominique Leuenberger - Update to version 1.2.1 (bsc#1214927, CVE-2023-36328): + Bugfix release because of potential integer overflow ( CVE-2023-36328). - Drop 546.patch: fixed upstream. - Update libtommath.keyring to contain gpg key 7B24BC73AFEEFA69A5BDE9C53FAA94B3BD9016D9. * Wed Jun 28 2023 Michal Kubecek - handle rpmlint warnings/errors: * update rpmlintrc to address new Factory warnings * make libtommath-examples noarch * make shared library executable * Wed Jun 28 2023 Michal Kubecek - specfile style changes enforced by hard to avoid format_spec_file service * Wed Jun 28 2023 Dominique Leuenberger - Add 546.patch: Fix possible integer overflow. * Fri Mar 10 2023 Martin Pluskal - Build AVX2 enabled hwcaps library for x86_64-v3 * Fri Nov 8 2019 Michal Kubeček - update License tag in specfile (project relicensed to Unlicense in upstream v1.1.0-rc1) * Thu Oct 24 2019 Michal Kubeček - upgrade to version 1.2.0 * API refactoring, some functions marked as deprecated * functions returning a value marked with "warn on unused result" * FIPS 186.4 complient prime checking * two's complement functions and mp_{set,get}_double() * mp_rand() has multiple native random provider implementations * add mp_decr(), mp_incr() and mp_log_u32() * various improvements * provide pkgconfig file - adjust build and install section to match upstream changes * Tue Jul 5 2016 mpluskal@suse.com - Run internal testsuite - Simplify cleanup of unwanted files a bit * Thu Apr 28 2016 mkubecek@suse.cz - more specfile cleanup * use one line version of post/postun scriptlets; less readable but preferred by Factory maintainers * remove info about author from description (requested by Factory maintainers) * more pointless changes requested by spec-cleaner * copy general info about TomMath to subpackages * Fri Apr 22 2016 mkubecek@suse.cz - upgrade to version 1.0 * new functions * performance improvements * fix build issues for Linux x32 ABI - better conform to shared library packaging guidelines - some more specfile cleanup - add tarball signature - add baselibs.conf - add provides/obsoletes for clean upgrade - libtommath0-makefile.shared.patch: removed (fixed in upstream) - explicitly set doc permissions to fix build on SLE11 * Mon Oct 20 2014 mkubecek@suse.cz - libtommath0.spec: fix License tag to one from OBS list (WTFPL is the license according to upstream web) * Mon Jan 9 2012 jengelh@medozas.de - Remove redundant tags/sections (cf. specfile guidelines) * Mon Jan 9 2012 mkubecek@suse.cz - add libtool to BuildRequires (needed for Factory) - add trailing slash to URL * Thu Aug 12 2010 alexandre@exatati.com.br - Update to 0.42.0; - Spec file cleaned with spec-cleaner; - Fixed doc permissions in spec file.