%define _libdir64 %{_prefix}/lib64 Summary: libgpg-error Name: libgpg-error Version: 1.34 Release: 1 URL: ftp://ftp.gnupg.org/gcrypt/libgpg-error/ Source0: ftp://ftp.gnupg.org/gcrypt/%{name}/%{name}-%{version}.tar.bz2 Source1: ftp://ftp.gnupg.org/gcrypt/%{name}/%{name}-%{version}.tar.bz2.sig Patch0: %{name}-%{version}-aix.patch Group: Development/Libraries Copyright: LGPL BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: gettext, make, sed Requires: gettext %description This is a library that defines common error values for all GnuPG components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, pinentry, SmartCard Daemon and possibly more in the future. The library is available as 32-bit and 64-bit. %package devel Summary: Development files for the %{name} package Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel This is a library that defines common error values for all GnuPG components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, pinentry, SmartCard Daemon and possibly more in the future. This package contains files necessary to develop applications using libgpg-error. 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 "xlc_r -q64" or "gcc -maix64". %prep %setup -q %patch0 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CC="xlc_r" export CFLAGS="-O3 -qstrict" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --enable-shared --enable-static gmake %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --enable-shared --enable-static gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # patch /opt/freeware/include/gpg-error.h for AIX5L V5.1 /opt/freeware/bin/sed -i 's|#include |#if defined(_AIX) \&\& !defined(_AIX52)\n#include \n#else\n#include \n#endif|g' ${RPM_BUILD_ROOT}%{_includedir}/gpg-error.h # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/%{name}.so* # compress the info pages gzip -9 ${RPM_BUILD_ROOT}%{_infodir}/*.info ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc 32bit/COPYING 32bit/COPYING.LIB 32bit/AUTHORS 32bit/README 32bit/NEWS 32bit/ChangeLog %{_bindir}/gpg-error %{_bindir}/gpg-error_* %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* %{_datadir}/%{name} %{_datadir}/locale/* %{_datadir}/common-lisp/* /usr/bin/gpg-error* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system) %{_bindir}/gpg-error-config* %{_bindir}/gpgrt-config* %{_bindir}/yat2m* %{_libdir}/*.la %{_libdir64}/*.la %{_includedir}/* %{_datadir}/aclocal/gpg-error.m4 %{_datadir}/aclocal/gpgrt.m4 %{_mandir}/man1/* %{_infodir}/*.info* /usr/bin/gpg-error-config* /usr/bin/gpgrt-config* /usr/bin/yat2m* /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Thu Mar 21 2019 Michael Perzl - 1.34-1 - updated to version 1.34 * Thu Mar 21 2019 Michael Perzl - 1.33-1 - updated to version 1.33 * Tue Oct 30 2018 Michael Perzl - 1.32-1 - updated to version 1.32 * Thu Jun 21 2018 Michael Perzl - 1.31-1 - updated to version 1.31 * Thu Jun 21 2018 Michael Perzl - 1.30-1 - updated to version 1.30 * Thu Jun 21 2018 Michael Perzl - 1.29-1 - updated to version 1.29 * Thu Jun 21 2018 Michael Perzl - 1.28-1 - added RTL-style shared libraries - updated to version 1.28 * Thu Jul 13 2017 Michael Perzl - 1.27-1 - updated to version 1.27 * Tue Jan 31 2017 Michael Perzl - 1.26-1 - updated to version 1.26 * Tue Jan 31 2017 Michael Perzl - 1.25-1 - updated to version 1.25 * Tue Jan 31 2017 Michael Perzl - 1.24-1 - updated to version 1.24 * Thu Nov 24 2016 Michael Perzl - 1.23-1 - updated to version 1.23 * Wed Dec 23 2015 Michael Perzl - 1.21-1 - updated to version 1.21 * Wed Dec 23 2015 Michael Perzl - 1.20-1 - updated to version 1.20 * Wed Dec 23 2015 Michael Perzl - 1.19-1 - updated to version 1.19 * Tue Feb 03 2015 Michael Perzl - 1.18-1 - updated to version 1.18 * Mon Dec 08 2014 Michael Perzl - 1.17-1 - updated to version 1.17 * Mon Dec 08 2014 Michael Perzl - 1.16-1 - updated to version 1.16 * Thu Sep 18 2014 Michael Perzl - 1.15-1 - updated to version 1.15 * Fri Aug 15 2014 Michael Perzl - 1.13-1 - updated to version 1.13 * Mon Jul 08 2013 Michael Perzl - 1.12-1 - updated to version 1.12 * Fri Apr 05 2013 Michael Perzl - 1.11-1 - updated to version 1.11 * Wed Nov 17 2010 Michael Perzl - 1.10-1 - updated to version 1.10 * Thu Jul 22 2010 Michael Perzl - 1.9-1 - updated to version 1.9 * Mon Jul 05 2010 Michael Perzl - 1.8-2 - removed dependency on gettext >= 0.17 * Wed May 26 2009 Michael Perzl - 1.8-1 - updated to version 1.8 * Tue Mar 10 2009 Michael Perzl - 1.7-1 - updated to version 1.7 * Fri Mar 28 2008 Michael Perzl - 1.6-3 - corrected some SPEC file errors * Thu Jan 03 2008 Michael Perzl - 1.6-2 - included both 32-bit and 64-bit shared objects * Tue Nov 27 2007 Michael Perzl - 1.6-1 - updated to v1.6 * Thu Aug 16 2007 Michael Perzl - 1.5-1 - updated to v1.5 * Tue Jan 03 2006 Michael Perzl - 1.1-1 - first version for AIX V5.1 and higher