1 Summary: Library for error values used by GnuPG components
5 URL: ftp://ftp.gnupg.org/gcrypt/libgpg-error/
6 Source0: ftp://ftp.gnupg.org/gcrypt/libgpg-error/%{name}-%{version}.tar.bz2
7 Group: System/Libraries
9 BuildRequires: gawk, gettext-tools
10 Requires(post): /sbin/ldconfig
11 Requires(postun): /sbin/ldconfig
14 This is a library that defines common error values for all GnuPG
15 components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt,
16 pinentry, SmartCard Daemon and possibly more in the future.
19 Summary: Development files for the %{name} package
20 Group: Development/Libraries
21 Requires: %{name} = %{version}-%{release}
24 This is a library that defines common error values for all GnuPG
25 components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt,
26 pinentry, SmartCard Daemon and possibly more in the future. This package
27 contains files necessary to develop applications using libgpg-error.
31 # The config script already suppresses the -L if it's /usr/lib, so cheat and
32 # set it to a value which we know will be suppressed.
33 sed -i -e 's|^libdir=@libdir@$|libdir=@exec_prefix@/lib|g' src/gpg-error-config.in
36 %configure --disable-static --enable-malloc0returnsnull
40 rm -fr $RPM_BUILD_ROOT
42 rm -rf $RPM_BUILD_ROOT/%{_datadir}/common-lisp
46 # Relocate the shared libraries to /%{_lib}.
47 mkdir -p $RPM_BUILD_ROOT/%{_lib}
48 for shlib in $RPM_BUILD_ROOT/%{_libdir}/*.so* ; do
49 if test -L "$shlib" ; then
52 mv "$shlib" $RPM_BUILD_ROOT/%{_lib}/
55 # Figure out where /%{_lib} is relative to %{_libdir}.
56 touch $RPM_BUILD_ROOT/root_marker
58 while ! test -f $RPM_BUILD_ROOT/%{_libdir}/$relroot/root_marker ; do
61 # Overwrite development symlinks.
62 pushd $RPM_BUILD_ROOT/%{_libdir}
63 for shlib in $relroot/%{_lib}/lib*.so.* ; do
64 shlib=`echo "$shlib" | sed -e 's,//,/,g'`
65 target=`basename "$shlib" | sed -e 's,\.so.*,,g'`.so
69 # Add the soname symlink.
70 /sbin/ldconfig -n $RPM_BUILD_ROOT/%{_lib}/
71 rm -f $RPM_BUILD_ROOT/root_marker
77 rm -fr $RPM_BUILD_ROOT
79 %post -p /sbin/ldconfig
81 %postun -p /sbin/ldconfig
83 %files -f %{name}.lang
86 /%{_lib}/libgpg-error.so.*
90 %{_bindir}/gpg-error-config
91 %{_libdir}/libgpg-error.so
92 %{_includedir}/gpg-error.h
93 %{_datadir}/aclocal/gpg-error.m4