# # spec file for package libtommath # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # 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 http://bugs.opensuse.org/ # Name: libtommath %define libsoname %{name}1 Version: 1.0 Release: 2.7 Summary: Routines For a Integer Based Number Theoretic Applications License: WTFPL 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: xz BuildRoot: %{_tmppath}/%{name}-%{version}-build %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 %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 -rf demo/demo.o %install dos2unix etc/timer.asm make DESTDIR=%{buildroot} LIBPATH=%{_libdir} %{?_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 644 LICENSE changes.txt for d in tombc demo etc mtest pre_gen; do chmod 755 "$d" chmod 644 "$d"/* done %post -n %{libsoname} -p /sbin/ldconfig %postun -n %{libsoname} -p /sbin/ldconfig %files -n %{libsoname} %defattr(-,root,root) %doc LICENSE changes.txt tombc %{_libdir}/libtommath.so.* %files devel %defattr(-,root,root) %attr(0644,root,root) %{_includedir}/tommath*.h %{_libdir}/libtommath.so %files examples %defattr(-,root,root) %doc demo etc mtest pre_gen %changelog * 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.