Name: libgcrypt Version: 1.4.0 Release: 1 Source0: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2 Source1: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2.sig Patch0: libgcrypt-%{version}-aix.patch License: LGPL Summary: A general-purpose cryptography library. BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: libgpg-error-devel pkg-config Group: System Environment/Libraries %description Libgcrypt is a general purpose crypto library based on the code used in GNU Privacy Guard. The library is available as 32-bit and 64-bit. %package devel Summary: Development files for the %{name} package. Group: Development/Libraries PreReq: /sbin/install-info Requires: info Requires: libgpg-error-devel Requires: %{name} = %{version}-%{release} %description devel Libgcrypt is a general purpose crypto library based on the code used in GNU Privacy Guard. This package contains files needed to develop applications using libgcrypt. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64". %prep %setup -q %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="cc -q64" ./configure \ --prefix=%{_prefix} \ --infodir=%{_prefix}/info \ --enable-shared --enable-static \ --disable-asm # ugly patch to make shared libraries work # libcpiher.a and libmpi.a are not linked onto the shared library by default cd src patch -s < %{PATCH0} cd .. make %{?_smp_mflags} cp src/.libs/libgcrypt.so.11 . make distclean # now build the 32-bit version export CC="cc" ./configure \ --prefix=%{_prefix} \ --infodir=%{_prefix}/info \ --enable-static --enable-shared \ --disable-asm # ugly patch to make shared libraries work # libcpiher.a and libmpi.a are not linked onto the shared library by default cd src patch -s < %{PATCH0} cd .. make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q src/.libs/libgcrypt.a ./libgcrypt.so.11 %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir gzip -9 ${RPM_BUILD_ROOT}/%{_infodir}/gcrypt.info %post devel /sbin/install-info %{_infodir}/gcrypt.info.gz %{_infodir}/dir %preun devel if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/gcrypt.info.gz %{_infodir}/dir fi %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,system) %{_bindir}/dumpsexp %{_libdir}/*.a %files devel %defattr(-,root,system) %{_bindir}/%{name}-config %{_includedir}/* %{_libdir}/*.la %{_datadir}/aclocal/* %{_infodir}/gcrypt.info* %changelog * Fri Feb 22 2008 Michael Perzl - 1.4.0-1 - updated to version 1.4.0 * Thu Jan 03 2008 Michael Perzl - 1.2.4-2 - included both 32-bit and 64-bit shared objects * Fri Oct 05 2007 Michael Perzl - 1.2.4-1 - first version for AIX V5.1 and higher