3
0
forked from pool/libgcrypt
libgcrypt/libgcrypt.spec
OBS User autobuild b856e12c0f Accepting request 29043 from home:hennevogel:TODO
Copy from home:hennevogel:TODO/libgcrypt based on submit request 29043 from user coolo

OBS-URL: https://build.opensuse.org/request/show/29043
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libgcrypt?expand=0&rev=14
2010-01-14 14:27:35 +00:00

187 lines
4.9 KiB
RPMSpec

#
# spec file for package libgcrypt (Version 1.4.4)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
Name: libgcrypt
BuildRequires: libgpg-error-devel
Url: http://www.gnu.org/directory/Security/libgcrypt.html
Version: 1.4.4
Release: 2
Summary: The GNU Crypto Library
License: GPLv2+ ; LGPLv2.1+
Group: Development/Libraries/C and C++
AutoReqProv: on
Source: %name-%version.tar.bz2
Source2: baselibs.conf
Patch0: %name-ppc64.patch
Patch1: libgcrypt-strict-aliasing.patch
Patch2: libgcrypt-1.4.4-mpicheck.patch
Patch3: libgcrypt-1.4.1-rijndael_no_strict_aliasing.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Libgcrypt is a general purpose crypto library based on the code used in
GnuPG (alpha version).
Authors:
--------
Maintainer: wk@g10code.com
Authors: Werner Koch <wk@gnupg.org>
Matthew Skala <mskala@ansuz.sooke.bc.ca>
Michael Roth <mroth@nessie.de>
Niklas Hernaeus <nh@df.lth.se>
Rémi Guyomarch <rguyom@mail.dotcom.fr>
Timo Schulz <twoaday@freakmail.de>
%package -n libgcrypt11
License: GPLv2+ ; LGPLv2.1+
Summary: The GNU Crypto Library
Group: Development/Libraries/C and C++
# bug437293
%ifarch ppc64
Obsoletes: libgcrypt-64bit
%endif
#
# libgcrypt last used in 10.3
Obsoletes: libgcrypt < %{version}
Provides: libgcrypt = %{version}
%description -n libgcrypt11
Libgcrypt is a general purpose crypto library based on the code used in
GnuPG (alpha version).
Authors:
--------
Maintainer: wk@g10code.com
Authors: Werner Koch <wk@gnupg.org>
Matthew Skala <mskala@ansuz.sooke.bc.ca>
Michael Roth <mroth@nessie.de>
Niklas Hernaeus <nh@df.lth.se>
Rémi Guyomarch <rguyom@mail.dotcom.fr>
Timo Schulz <twoaday@freakmail.de>
%package devel
License: GFDLv1.1 ; GPLv2+ ; LGPLv2.1+ ; MIT
Summary: The GNU Crypto Library
Group: Development/Libraries/C and C++
Requires: libgcrypt11 = %version libgpg-error-devel
# bug437293
%ifarch ppc64
Obsoletes: libgcrypt-devel-64bit
%endif
#
PreReq: %install_info_prereq
%description devel
Libgcrypt is a general purpose crypto library based on the code used in
GnuPG (alpha version).
This package contains needed files to compile and link against the
library.
Authors:
--------
Maintainer: wk@g10code.com
Authors: Werner Koch <wk@gnupg.org>
Matthew Skala <mskala@ansuz.sooke.bc.ca>
Michael Roth <mroth@nessie.de>
Niklas Hernaeus <nh@df.lth.se>
Rémi Guyomarch <rguyom@mail.dotcom.fr>
Timo Schulz <twoaday@freakmail.de>
%prep
%setup -q -n libgcrypt-%version
%patch0 -p1
%patch1
%patch2
%patch3 -p1
%build
# define ciphers to build
ENABLE_CIPHER="arcfour blowfish cast5 des aes twofish serpent rfc2268 seed camellia"
ENABLE_PUBKEY="dsa elgamal rsa ecc"
ENABLE_DIGEST="crc md4 md5 rmd160 sha1 sha256 sha512 tiger whirlpool"
#
%{?suse_update_config}
autoreconf -fi
%configure --with-pic --libdir=/%{_lib} \
--enable-noexecstack \
--disable-static \
%ifarch %sparc
--disable-asm \
%endif
--enable-ciphers="$ENABLE_CIPHER" \
--enable-pubkey-ciphers="$ENABLE_PUBKEY" \
--enable-digests="$ENABLE_DIGEST"
%{__make} %{?jobs:-j%jobs}
%check
# Nice idea. however this uses /dev/random, which hangs
# on hardware without random feeds.
#make check
%install
make DESTDIR=$RPM_BUILD_ROOT install
#
rm $RPM_BUILD_ROOT/%{_lib}/libgcrypt.la
mkdir -p $RPM_BUILD_ROOT%_libdir
%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/%{name}.so) %{buildroot}%{_libdir}/%{name}.so
%{__rm} -v %{buildroot}/%{_lib}/%{name}.so
%clean
rm -rf $RPM_BUILD_ROOT
%post -n libgcrypt11
/sbin/ldconfig
%postun -n libgcrypt11
/sbin/ldconfig
%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/gcrypt.info.gz
%postun devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gcrypt.info.gz
%files -n libgcrypt11
%defattr(-,root,root)
%doc AUTHORS COPYING COPYING.LIB ChangeLog NEWS README THANKS TODO
/%_lib/libgcrypt.so.11*
%files devel
%defattr(-,root,root)
%doc %_infodir/gcrypt.info.gz
%_bindir/dumpsexp
%_bindir/hmac256
%_bindir/libgcrypt-config
%_libdir/libgcrypt.so
%_includedir/gcrypt*.h
%_datadir/aclocal/libgcrypt.m4
%changelog