2007-01-16 00:21:52 +01:00
|
|
|
#
|
2011-10-02 20:44:43 +02:00
|
|
|
# spec file for package libgcrypt
|
2007-01-16 00:21:52 +01:00
|
|
|
#
|
2013-02-03 08:04:40 +01:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-16 00:21:52 +01:00
|
|
|
#
|
2008-11-02 15:42:29 +01: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.
|
|
|
|
|
2007-01-16 00:21:52 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2013-07-25 11:26:56 +02:00
|
|
|
%define build_hmac256 1
|
|
|
|
%define separate_hmac256_binary 0
|
|
|
|
|
2013-12-19 10:11:12 +01:00
|
|
|
%define libsoname %{name}20
|
|
|
|
%define sosuffix 20.0.0
|
2013-07-25 11:26:56 +02:00
|
|
|
|
|
|
|
Name: libgcrypt
|
2012-03-23 12:47:53 +01:00
|
|
|
Url: http://directory.fsf.org/wiki/Libgcrypt
|
2013-12-19 10:11:12 +01:00
|
|
|
Version: 1.6.0
|
2012-02-12 17:27:21 +01:00
|
|
|
Release: 0
|
2007-01-16 00:21:52 +01:00
|
|
|
Summary: The GNU Crypto Library
|
2013-03-22 10:31:45 +01:00
|
|
|
License: GPL-2.0+ and LGPL-2.1+ and GPL-3.0+
|
2007-01-16 00:21:52 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2013-03-19 10:04:38 +01:00
|
|
|
Source: ftp://ftp.gnupg.org/gcrypt/libgcrypt/%{name}-%{version}.tar.bz2
|
|
|
|
Source1: ftp://ftp.gnupg.org/gcrypt/libgcrypt/%{name}-%{version}.tar.bz2.sig
|
2010-01-14 15:27:35 +01:00
|
|
|
Source2: baselibs.conf
|
2013-03-19 10:04:38 +01:00
|
|
|
# http://www.gnupg.org/signature_key.en.html
|
|
|
|
Source4: %{name}.keyring
|
2012-06-13 09:19:23 +02:00
|
|
|
Patch0: %{name}-ppc64.patch
|
|
|
|
Patch1: %{name}-strict-aliasing.patch
|
|
|
|
Patch3: %{name}-1.4.1-rijndael_no_strict_aliasing.patch
|
|
|
|
Patch4: %{name}-sparcv9.diff
|
2013-07-25 11:26:56 +02:00
|
|
|
#PATCH-FIX-UPSTREAM: bnc#701267, explicitly link with $(DL_LIBS)
|
|
|
|
#was: libgcrypt-1.5.0-as-needed.patch
|
|
|
|
Patch5: libgcrypt-unresolved-dladdr.patch
|
|
|
|
#PATCH-FIX-SUSE: bnc#724841, fix a random device opening routine
|
|
|
|
Patch6: libgcrypt-1.5.0-etc_gcrypt_rngseed-symlink.diff
|
|
|
|
#PATCH-FIX-SUSE: N/A
|
|
|
|
Patch7: libgcrypt-1.5.0-LIBGCRYPT_FORCE_FIPS_MODE-env.diff
|
2013-12-19 10:11:12 +01:00
|
|
|
#PATCH-FIX-UPSTREAM: internal functions are supposed to be used inside libgcrypt, mvyskocil@suse.com
|
|
|
|
Patch8: libgcrypt-1.6.0-use-intenal-functions.patch
|
2007-01-16 00:21:52 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2013-03-19 10:04:38 +01:00
|
|
|
BuildRequires: automake >= 1.11
|
2012-06-13 09:19:23 +02:00
|
|
|
BuildRequires: libgpg-error-devel >= 1.8
|
|
|
|
BuildRequires: libtool
|
2013-07-25 11:26:56 +02:00
|
|
|
# not for base packages to avoid huge cycles
|
2013-06-17 15:34:36 +02:00
|
|
|
#BuildRequires: gpg-offline
|
2007-01-16 00:21:52 +01:00
|
|
|
|
|
|
|
%description
|
2013-03-19 10:04:38 +01:00
|
|
|
Libgcrypt is a general purpose library of cryptographic building
|
|
|
|
blocks. It is originally based on code used by GnuPG. It does not
|
|
|
|
provide any implementation of OpenPGP or other protocols. Thorough
|
|
|
|
understanding of applied cryptography is required to use Libgcrypt.
|
2007-01-16 00:21:52 +01:00
|
|
|
|
2012-06-13 09:19:23 +02:00
|
|
|
%package -n %{libsoname}
|
2008-01-18 02:02:35 +01:00
|
|
|
Summary: The GNU Crypto Library
|
2013-02-03 08:04:40 +01:00
|
|
|
License: GPL-2.0+ and LGPL-2.1+
|
2008-01-18 02:02:35 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
2012-06-13 09:19:23 +02:00
|
|
|
%description -n %{libsoname}
|
2008-01-18 02:02:35 +01:00
|
|
|
Libgcrypt is a general purpose crypto library based on the code used in
|
|
|
|
GnuPG (alpha version).
|
|
|
|
|
2007-01-16 00:21:52 +01:00
|
|
|
%package devel
|
|
|
|
Summary: The GNU Crypto Library
|
2013-02-03 08:04:40 +01:00
|
|
|
License: GFDL-1.1 and GPL-2.0+ and LGPL-2.1+ and MIT
|
2007-01-16 00:21:52 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2012-06-13 09:19:23 +02:00
|
|
|
Requires: %{libsoname} = %{version}
|
2012-03-23 12:47:53 +01:00
|
|
|
Requires: glibc-devel
|
2012-06-13 09:19:23 +02:00
|
|
|
Requires: libgpg-error-devel >= 1.8
|
2008-01-18 02:02:35 +01:00
|
|
|
PreReq: %install_info_prereq
|
2007-01-16 00:21:52 +01:00
|
|
|
|
|
|
|
%description devel
|
2013-03-19 10:04:38 +01:00
|
|
|
Libgcrypt is a general purpose library of cryptographic building
|
|
|
|
blocks. It is originally based on code used by GnuPG. It does not
|
|
|
|
provide any implementation of OpenPGP or other protocols. Thorough
|
|
|
|
understanding of applied cryptography is required to use Libgcrypt.
|
2007-01-16 00:21:52 +01:00
|
|
|
|
|
|
|
This package contains needed files to compile and link against the
|
|
|
|
library.
|
|
|
|
|
2013-07-25 11:26:56 +02:00
|
|
|
%if 0%{?separate_hmac256_binary}
|
|
|
|
|
|
|
|
%package hmac256
|
|
|
|
Summary: The GNU Crypto Library
|
|
|
|
License: GPL-2.0+ and LGPL-2.1+
|
|
|
|
Group: Development/Libraries/C and C++
|
2013-12-19 14:54:19 +01:00
|
|
|
Requires: %{libsoname} = %version
|
2013-07-25 11:26:56 +02:00
|
|
|
Requires: libgpg-error-devel
|
|
|
|
PreReq: %install_info_prereq
|
|
|
|
|
|
|
|
%description hmac256
|
|
|
|
Libgcrypt is a general purpose library of cryptographic building
|
|
|
|
blocks. It is originally based on code used by GnuPG. It does not
|
|
|
|
provide any implementation of OpenPGP or other protocols. Thorough
|
|
|
|
understanding of applied cryptography is required to use Libgcrypt.
|
|
|
|
|
|
|
|
%endif # #if separate_hmac256_binary
|
|
|
|
|
2007-01-16 00:21:52 +01:00
|
|
|
%prep
|
2012-06-13 09:19:23 +02:00
|
|
|
%setup -q -n %{name}-%{version}
|
2007-01-16 00:21:52 +01:00
|
|
|
%patch0 -p1
|
|
|
|
%patch1
|
2008-11-17 17:16:05 +01:00
|
|
|
%patch3 -p1
|
2010-07-20 20:17:16 +02:00
|
|
|
%patch4 -p1
|
2013-07-25 11:26:56 +02:00
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
|
|
|
%patch7 -p1
|
2013-12-19 10:11:12 +01:00
|
|
|
%patch8 -p1
|
2007-01-16 00:21:52 +01:00
|
|
|
|
|
|
|
%build
|
2013-07-25 11:26:56 +02:00
|
|
|
echo building with build_hmac256 set to %{build_hmac256}
|
2007-01-16 00:21:52 +01:00
|
|
|
%{?suse_update_config}
|
|
|
|
autoreconf -fi
|
2013-06-17 09:25:49 +02:00
|
|
|
export CFLAGS="%optflags $(getconf LFS_CFLAGS)"
|
2012-02-12 17:27:21 +01:00
|
|
|
%configure --with-pic \
|
2008-01-18 02:02:35 +01:00
|
|
|
--enable-noexecstack \
|
|
|
|
--disable-static \
|
2013-07-25 11:26:56 +02:00
|
|
|
--enable-m-guard \
|
2010-01-14 15:27:35 +01:00
|
|
|
%ifarch %sparc
|
|
|
|
--disable-asm \
|
|
|
|
%endif
|
2013-07-25 11:26:56 +02:00
|
|
|
--enable-hmac-binary-check \
|
|
|
|
--enable-random=linux
|
2013-12-19 10:11:12 +01:00
|
|
|
make %{?_smp_mflags}
|
2008-01-18 02:02:35 +01:00
|
|
|
|
2013-07-25 11:26:56 +02:00
|
|
|
%if 0%{?build_hmac256}
|
|
|
|
# this is a hack that re-defines the __os_install_post macro
|
|
|
|
# for a simple reason: the macro strips the binaries and thereby
|
|
|
|
# invalidates a HMAC that may have been created earlier.
|
|
|
|
# solution: create the hashes _after_ the macro runs.
|
|
|
|
#
|
|
|
|
# this shows up earlier because otherwise the %expand of
|
|
|
|
# the macro is too late.
|
|
|
|
%{expand:%%global __os_install_post {%__os_install_post
|
|
|
|
|
|
|
|
%{buildroot}/%{_bindir}/hmac256 "What am I, a doctor or a moonshuttle conductor?" \
|
|
|
|
< %{buildroot}/%{_bindir}/hmac256 > %{buildroot}/%{_bindir}/.hmac256.hmac
|
|
|
|
%{buildroot}/%{_bindir}/hmac256 "What am I, a doctor or a moonshuttle conductor?" \
|
2013-12-19 14:54:19 +01:00
|
|
|
< %{buildroot}/%{_libdir}/libgcrypt.so.%{sosuffix} > %{buildroot}/%{_libdir}/.libgcrypt.so.20.hmac
|
2013-07-25 11:26:56 +02:00
|
|
|
}}
|
|
|
|
%endif
|
|
|
|
|
2008-01-18 02:02:35 +01:00
|
|
|
%check
|
2007-01-16 00:21:52 +01:00
|
|
|
# Nice idea. however this uses /dev/random, which hangs
|
|
|
|
# on hardware without random feeds.
|
2013-07-25 11:26:56 +02:00
|
|
|
# so lets not run it inside OBS
|
|
|
|
# make check
|
2007-01-16 00:21:52 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
2013-07-25 11:26:56 +02:00
|
|
|
|
2012-06-13 09:19:23 +02:00
|
|
|
rm %{buildroot}%{_libdir}/%{name}.la
|
2007-01-16 00:21:52 +01:00
|
|
|
|
2012-06-13 09:19:23 +02:00
|
|
|
%post -n %{libsoname} -p /sbin/ldconfig
|
2008-01-18 02:02:35 +01:00
|
|
|
|
2012-06-13 09:19:23 +02:00
|
|
|
%postun -n %{libsoname} -p /sbin/ldconfig
|
2007-01-16 00:21:52 +01:00
|
|
|
|
|
|
|
%post devel
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/gcrypt.info.gz
|
2011-10-02 20:44:43 +02:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/gcrypt-1.info.gz
|
2013-03-19 10:04:38 +01:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/gcrypt-2.info.gz
|
2007-01-16 00:21:52 +01:00
|
|
|
|
|
|
|
%postun devel
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gcrypt.info.gz
|
2011-10-02 20:44:43 +02:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gcrypt-1.info.gz
|
2013-03-19 10:04:38 +01:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gcrypt-2.info.gz
|
2007-01-16 00:21:52 +01:00
|
|
|
|
2012-06-13 09:19:23 +02:00
|
|
|
%files -n %{libsoname}
|
2007-01-16 00:21:52 +01:00
|
|
|
%defattr(-,root,root)
|
2013-12-19 10:11:12 +01:00
|
|
|
%doc COPYING.LIB
|
|
|
|
%{_libdir}/%{name}.so.*
|
2013-07-25 11:26:56 +02:00
|
|
|
%if 0%{?build_hmac256}
|
2013-12-19 10:11:12 +01:00
|
|
|
%{_libdir}/.libgcrypt.so.*.hmac
|
2013-07-25 11:26:56 +02:00
|
|
|
%endif # %if 0%{?build_hmac256}
|
2007-01-16 00:21:52 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2013-12-19 10:11:12 +01:00
|
|
|
%doc AUTHORS COPYING COPYING.LIB ChangeLog NEWS README THANKS TODO
|
|
|
|
%{_infodir}/gcrypt.info.gz
|
|
|
|
%{_infodir}/gcrypt.info-1.gz
|
|
|
|
%{_infodir}/gcrypt.info-2.gz
|
|
|
|
%{_bindir}/dumpsexp
|
|
|
|
%{_bindir}/mpicalc
|
|
|
|
%{_bindir}/%{name}-config
|
|
|
|
%{_libdir}/%{name}.so
|
|
|
|
%{_includedir}/gcrypt*.h
|
|
|
|
%{_datadir}/aclocal/%{name}.m4
|
2013-07-25 11:26:56 +02:00
|
|
|
|
2013-12-19 10:11:12 +01:00
|
|
|
%if 0%{?separate_hmac256_binary}
|
2013-07-25 11:26:56 +02:00
|
|
|
%files hmac256
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%endif # %if 0%{?separate_hmac256_binary}
|
|
|
|
%{_bindir}/hmac256
|
|
|
|
%{_bindir}/.hmac256.hmac
|
2013-12-19 10:11:12 +01:00
|
|
|
%doc %{_mandir}/man1/hmac256.1*
|
2007-01-16 00:21:52 +01:00
|
|
|
|
2007-09-13 18:48:03 +02:00
|
|
|
%changelog
|