Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > f15311d8ec0e684af4fbd6f7c2c74eb7 > files > 5

libtomcrypt-1.17-7.1.mga5.src.rpm

%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 0.41

Name:           libtomcrypt
Version:        1.17
%define subrel  1
Release:        %mkrel 7
Summary:        Comprehensive, portable cryptographic toolkit
Group:          System/Libraries
License:        Public Domain
URL:            http://www.libtom.org/?page=features&newsitems=5&whatfile=crypt
Source0:        http://www.libtom.org/files/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
BuildRequires:  ghostscript
BuildRequires:  libtool
BuildRequires:  tetex-dvips
BuildRequires:  tetex-latex 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
%apply_patches

# Be verbose when calling latex so we can see what's breaking
sed -i -e 's|> /dev/null||g' makefile

%build
%setup_compile_flags
export CFLAGS="%{optflags} -DLTM_DESC -DUSE_LTM -I%{_includedir}/tommath"
%make LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile docs
%make LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared

%check
%setup_compile_flags
export CFLAGS="%{optflags} -DLTM_DESC -DUSE_LTM -I%{_includedir}/tommath"
%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 -I%{_includedir}/tommath"
# 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)

%makeinstall_std INCPATH=%{_includedir}/tomcrypt LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared
rm -f %{buildroot}%{_libdir}/*.la

%files -n %{libname}
%doc LICENSE
%{_libdir}/*.so.%{major}
%{_libdir}/*.so.%{major}.*

%files -n %{libname_devel}
%doc doc/crypt.pdf
%{_includedir}/tomcrypt
%{_libdir}/*.so



%changelog
* Mon Oct 31 2016 daviddavid <daviddavid> 1.17-7.1.mga5
+ Revision: 1064257
- add debian patch to fix CVE-2016-6129 (mga#19305)

* 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


* Sun Sep 09 2012 Per Øyvind Karlsen <peroyvind@mandriva.org> 1.17-4
+ Revision: 816583
- don't drop '-O3 -funroll-loops' from compiler flags
- workaround stripping issue with test for now..
- cleanups

  + Thierry Vignaud <tv@mandriva.org>
    - rebuild

* Sun Aug 17 2008 David Walluck <walluck@mandriva.org> 1.17-2mdv2009.0
+ Revision: 272862
- fix Requires

* Mon Aug 11 2008 David Walluck <walluck@mandriva.org> 1.17-1mdv2009.0
+ Revision: 270853
- BuildRequires: libtool
- really fix Requires
- fix Requires
- fix tommath requirements
- import libtomcrypt