2014-07-03 14:57:19 +00:00
|
|
|
#
|
2014-07-15 12:40:47 +00:00
|
|
|
# spec file for package libtomcrypt
|
2014-07-03 14:57:19 +00:00
|
|
|
#
|
2016-02-18 11:52:02 +00:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-07-03 14:57:19 +00:00
|
|
|
# Copyright (c) 2009 Exata T.I., Maringa, PR, Brasil.
|
|
|
|
#
|
2014-07-15 12:40:47 +00:00
|
|
|
# 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/
|
2014-07-03 14:57:19 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2014-07-15 12:40:47 +00:00
|
|
|
%define soname libtomcrypt0
|
2014-07-03 16:32:06 +00:00
|
|
|
Name: libtomcrypt
|
2014-07-03 14:57:19 +00:00
|
|
|
Version: 1.17
|
2014-07-15 12:40:47 +00:00
|
|
|
Release: 0
|
2014-07-03 14:57:19 +00:00
|
|
|
Summary: Cryptographic Toolkit Written in Portable C
|
2014-07-15 12:40:47 +00:00
|
|
|
License: SUSE-Public-Domain
|
2014-07-03 14:57:19 +00:00
|
|
|
Group: System/Libraries
|
2014-07-15 12:40:47 +00:00
|
|
|
Url: http://libtom.org
|
2016-02-18 11:52:02 +00:00
|
|
|
Source0: https://github.com/libtom/libtomcrypt/releases/download/%{version}/crypt-%{version}.tar.bz2
|
|
|
|
Source1: https://github.com/libtom/libtomcrypt/releases/download/%{version}/crypt-%{version}.tar.bz2.asc
|
|
|
|
Source2: %{name}.keyring
|
|
|
|
Source3: %{name}.changes
|
|
|
|
# PATCH-FIX-UPSTREAM libtomcrypt-makefile.shared.patch
|
2014-07-03 14:57:19 +00:00
|
|
|
Patch0: %{name}-makefile.shared.patch
|
2017-05-29 20:42:12 +00:00
|
|
|
# PATCH-FIX-UPSTREAM https://github.com/libtom/libtomcrypt/pull/222
|
|
|
|
Patch1: reproducible.patch
|
2014-07-15 12:40:47 +00:00
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: texlive-latex
|
2014-07-03 14:57:19 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
2016-02-18 11:52:02 +00:00
|
|
|
LibTomCrypt is a fairly 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
|
2014-07-03 14:57:19 +00:00
|
|
|
generators, public key cryptography and a plethora of other routines.
|
|
|
|
|
|
|
|
|
2014-07-03 16:32:06 +00:00
|
|
|
%package -n %{soname}
|
|
|
|
Summary: Libraries for %{name}
|
2014-07-03 16:38:54 +00:00
|
|
|
Group: System/Libraries
|
2014-07-03 16:32:06 +00:00
|
|
|
|
|
|
|
%description -n %{soname}
|
2016-02-18 11:52:02 +00:00
|
|
|
LibTomCrypt is a fairly 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
|
|
|
|
numbergenerators, public key cryptography and a plethora of other routines.
|
|
|
|
|
|
|
|
This package contains shared libraries
|
2014-07-03 16:32:06 +00:00
|
|
|
|
2014-07-03 14:57:19 +00:00
|
|
|
%package devel
|
|
|
|
Summary: Development Files for LibTomCrypt
|
|
|
|
Group: Development/Libraries/C and C++
|
2014-07-03 16:50:35 +00:00
|
|
|
Requires: %{soname} = %{version}
|
2014-07-03 14:57:19 +00:00
|
|
|
|
|
|
|
%description devel
|
2016-02-18 11:52:02 +00:00
|
|
|
LibTomCrypt is a fairly 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
|
|
|
|
numbergenerators, public key cryptography and a plethora of other routines.
|
|
|
|
|
|
|
|
This package contains headers and other development files.
|
2014-07-03 14:57:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
%package examples
|
|
|
|
Summary: Example Files for LibTomCrypt
|
|
|
|
Group: Development/Libraries/Other
|
2014-07-15 12:40:47 +00:00
|
|
|
Requires: %{name}-devel = %{version}
|
2014-07-03 14:57:19 +00:00
|
|
|
|
|
|
|
%description examples
|
2016-02-18 11:52:02 +00:00
|
|
|
LibTomCrypt is a fairly 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
|
|
|
|
numbergenerators, public key cryptography and a plethora of other routines.
|
2014-07-03 14:57:19 +00:00
|
|
|
|
2016-02-18 11:52:02 +00:00
|
|
|
This package contains example *.c files showing how to use TomCrypt library.
|
2014-07-03 14:57:19 +00:00
|
|
|
|
|
|
|
%prep
|
2016-02-18 11:52:02 +00:00
|
|
|
%setup -q
|
2014-07-03 14:57:19 +00:00
|
|
|
%patch0 -p1
|
2017-05-29 20:42:12 +00:00
|
|
|
%patch1 -p1
|
2016-02-18 11:52:02 +00:00
|
|
|
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE3}")"
|
|
|
|
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
|
|
|
|
TIME="\"$(date -d "${modified}" "+%%R")\""
|
|
|
|
find . -name '*.[ch]' | xargs sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g"
|
2014-07-03 14:57:19 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
make %{?_smp_mflags} LIBPATH=%{_libdir} -f makefile.shared
|
|
|
|
|
|
|
|
%install
|
2014-07-15 12:40:47 +00:00
|
|
|
make DESTDIR=%{buildroot} LIBPATH=%{_libdir} NODOCS=0 -f makefile.shared install
|
2014-07-03 14:57:19 +00:00
|
|
|
# Remove static libraries (It's upstream bug in makefile.shared I think.)
|
2014-07-15 12:40:47 +00:00
|
|
|
rm %{buildroot}%{_libdir}/*.a
|
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2014-07-03 14:57:19 +00:00
|
|
|
|
2014-07-03 16:32:06 +00:00
|
|
|
%post -n %{soname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{soname} -p /sbin/ldconfig
|
2014-07-03 14:57:19 +00:00
|
|
|
|
2014-07-03 16:32:06 +00:00
|
|
|
%files -n %{soname}
|
2014-07-03 14:57:19 +00:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libtomcrypt.so.0
|
|
|
|
%{_libdir}/libtomcrypt.so.0.0.117
|
|
|
|
%{_libdir}/libtomcrypt_prof.so.0
|
|
|
|
%{_libdir}/libtomcrypt_prof.so.0.0.117
|
|
|
|
%doc LICENSE README TODO doc/crypt.pdf
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%attr(0644,root,root) %{_includedir}/tomcrypt*.h
|
|
|
|
%{_libdir}/libtomcrypt.so
|
|
|
|
%{_libdir}/libtomcrypt_prof.so
|
|
|
|
|
|
|
|
%files examples
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc demos
|
|
|
|
|
|
|
|
%changelog
|