%define major 0 %define libname %mklibname tomcrypt %{major} %define libname_devel %mklibname tomcrypt -d %define libname_static_devel %mklibname tomcrypt -d -s %define tommath_version 1.0 Name: libtomcrypt Version: 1.17 %define subrel 1 Release: %mkrel 11 Summary: Comprehensive, portable cryptographic toolkit Group: System/Libraries License: Public Domain URL: http://www.libtom.org/LibTomCrypt/ Source0: https://github.com/libtom/libtomcrypt/releases/download/%{version}/crypt-%{version}.tar.bz2 Patch0: libtomcrypt-1.17-mga-test-link.patch Patch1: libtomcrypt-1.17-deb-respect-ldflags.patch Patch2: CVE-2016-6129.patch Patch3: CVE-2018-0739.patch Patch4: CVE-2018-12437.patch BuildRequires: ghostscript BuildRequires: libtool BuildRequires: tetex-dvips BuildRequires: tetex-latex BuildRequires: ghostscript-dvipdf BuildRequires: tommath-devel >= %{tommath_version} %description A comprehensive, modular and portable cryptographic toolkit that provides developers with a vast array of well known published block ciphers, one-way hash functions, chaining modes, pseudo-random number generators, public key cryptography and a plethora of other routines. Designed from the ground up to be very simple to use. It has a modular and standard API that allows new ciphers, hashes and PRNGs to be added or removed without change to the overall end application. It features easy to use functions and a complete user manual which has many source snippet examples. %package -n %{libname} Summary: Comprehensive, portable cryptographic toolkit Group: System/Libraries %description -n %{libname} A comprehensive, modular and portable cryptographic toolkit that provides developers with a vast array of well known published block ciphers, one-way hash functions, chaining modes, pseudo-random number generators, public key cryptography and a plethora of other routines. Designed from the ground up to be very simple to use. It has a modular and standard API that allows new ciphers, hashes and PRNGs to be added or removed without change to the overall end application. It features easy to use functions and a complete user manual which has many source snippet examples. %package -n %{libname_devel} Summary: Development files for %{name} Group: Development/C Requires: %{libname} = %{version}-%{release} Requires: tommath-devel >= %{tommath_version} Provides: tomcrypt-devel = %{version}-%{release} %description -n %{libname_devel} The %{libname_devel} package contains libraries and header files for developing applications that use %{name}. %prep %setup -q %autopatch -p1 # Be verbose when calling latex so we can see what's breaking sed -i -e 's|> /dev/null||g' makefile # Latex syntax update sed -i \ -e 's|\[here\]|\[ht\]|g' \ -e 's|\[here!\]|\[h!\]|g' \ -e 's|\[!here\]|\[!ht\]|g' \ *.{pl,tex} %build %setup_compile_flags export CFLAGS="%{optflags} -DLTM_DESC -DUSE_LTM" %make_build LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile docs %make_build LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared %check %setup_compile_flags export CFLAGS="%{optflags} -DLTM_DESC -DUSE_LTM" %__make LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared test ./test %install # Because of buggy support of libtool dependencies in the makefile most files # are recompiled during check and install, so ensure that the environment is # complete for compiling here. %setup_compile_flags export CFLAGS="%{optflags} -DLTM_DESC -DUSE_LTM" # There is no configure script that ships with libtomcrypt but it does # have understand DESTDIR and its installs via that and the # INSTALL_USER and INSTALL_GROUP environment variables. export INSTALL_USER=$(id -un) export INSTALL_GROUP=$(id -gn) %make_install INCPATH=%{_includedir}/tomcrypt LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared find %{buildroot} -name "*.la" -delete find %{buildroot} -name '*.a' -delete %files -n %{libname} %doc LICENSE %{_libdir}/lib*.so.%{major}{,.*} %files -n %{libname_devel} %doc doc/crypt.pdf %{_includedir}/tomcrypt %{_libdir}/lib*.so %changelog * Sat Jul 21 2018 danf <danf> 1.17-11.1.mga6 (not released yet) + Revision: 1244757 - Back-ported two security fixes (bug #23335): - Fix Side Channel Based ECDSA Key Extraction (CVE-2018-12437) - Fix potential stack overflow when DER flexi-decoding (CVE-2018-0739) * Mon Oct 31 2016 daviddavid <daviddavid> 1.17-11.mga6 + Revision: 1064253 - add debian patch to fix CVE-2016-6129 (mga#19305) * Thu Oct 20 2016 daviddavid <daviddavid> 1.17-10.mga6 + Revision: 1062817 - fix build against new texlive 2016 * Sat Apr 09 2016 philippem <philippem> 1.17-9.mga6 + Revision: 999894 - rebuild for new libtommath * Thu Feb 11 2016 umeabot <umeabot> 1.17-8.mga6 + Revision: 955799 - Mageia 6 Mass Rebuild + danf <danf> - Updated URLs * Wed Oct 15 2014 umeabot <umeabot> 1.17-7.mga5 + Revision: 746159 - Second Mageia 5 Mass Rebuild * Sun Oct 05 2014 danf <danf> 1.17-6.mga5 + Revision: 736939 - Added respect-ldflags.patch to use the standard LDFLAGS during the build * Sun Oct 05 2014 danf <danf> 1.17-5.mga5 + Revision: 736931 - Removed static library subpackage which doesn't build - Enabled the test suite - Import Mandriva package