forked from pool/libtomcrypt
Marcus Meissner
c470bd9489
OBS-URL: https://build.opensuse.org/package/show/security/libtomcrypt?expand=0&rev=13
117 lines
4.2 KiB
RPMSpec
117 lines
4.2 KiB
RPMSpec
#
|
|
# spec file for package libtomcrypt
|
|
#
|
|
# Copyright (c) 2018 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/
|
|
#
|
|
|
|
|
|
%define soname libtomcrypt1
|
|
Name: libtomcrypt
|
|
Version: 1.18.2
|
|
Release: 0
|
|
Summary: Cryptographic Toolkit Written in Portable C
|
|
License: SUSE-Public-Domain
|
|
Group: System/Libraries
|
|
Url: http://libtom.org
|
|
Source0: https://github.com/libtom/libtomcrypt/releases/download/v%{version}/crypt-%{version}.tar.xz
|
|
Source1: https://github.com/libtom/libtomcrypt/releases/download/v%{version}/crypt-%{version}.tar.xz.asc
|
|
Source2: %{name}.keyring
|
|
Source3: %{name}.changes
|
|
Source4: baselibs.conf
|
|
BuildRequires: libtommath-devel
|
|
BuildRequires: libtool
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: texlive-latex
|
|
|
|
%description
|
|
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
|
|
generators, public key cryptography and a plethora of other routines.
|
|
|
|
%package -n %{soname}
|
|
Summary: Libraries for %{name}
|
|
Group: System/Libraries
|
|
|
|
%description -n %{soname}
|
|
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
|
|
|
|
%package devel
|
|
Summary: Development Files for LibTomCrypt
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{soname} = %{version}
|
|
|
|
%description devel
|
|
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.
|
|
|
|
%package examples
|
|
Summary: Example Files for LibTomCrypt
|
|
Group: Development/Libraries/Other
|
|
Requires: %{name}-devel = %{version}
|
|
|
|
%description examples
|
|
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 example *.c files showing how to use TomCrypt library.
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version}
|
|
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"
|
|
|
|
%build
|
|
export CFLAGS="%{optflags} -DLTM_DESC -DUSE_LTM"
|
|
make %{?_smp_mflags} LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared
|
|
|
|
%install
|
|
make DESTDIR=%{buildroot} LIBPATH=%{_libdir} NODOCS=0 PREFIX=%{_prefix} -f makefile.shared install
|
|
# Remove static libraries (It's upstream bug in makefile.shared I think.)
|
|
rm %{buildroot}%{_libdir}/*.a
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
|
|
|
%check
|
|
|
|
%post -n %{soname} -p /sbin/ldconfig
|
|
%postun -n %{soname} -p /sbin/ldconfig
|
|
|
|
%files -n %{soname}
|
|
%{_libdir}/libtomcrypt.so.*
|
|
%doc LICENSE README.md
|
|
|
|
%files devel
|
|
%attr(0644,root,root) %{_includedir}/tomcrypt*.h
|
|
%{_libdir}/libtomcrypt.so
|
|
%{_libdir}/pkgconfig/libtomcrypt.pc
|
|
|
|
%files examples
|
|
%doc demos
|
|
|
|
%changelog
|