devel/gpgme03 gpgme-0.3.16-macro.patch, NONE, 1.1 gpgme-0.3.16-relocate.patch, NONE, 1.1 gpgme03.spec, 1.8, 1.9

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Fri Mar 18 03:02:18 UTC 2005


Author: mschwendt

Update of /cvs/extras/devel/gpgme03
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9120

Modified Files:
	gpgme03.spec 
Added Files:
	gpgme-0.3.16-macro.patch gpgme-0.3.16-relocate.patch 
Log Message:
* Fri Mar 18 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.3.16-8
- Fix build for FC4.
- Remove conflict with gpgme packages (relocate files in -devel
  package, rename .info file and rename macro in .m4 file).
  This is not as clean as I wanted it to be. But other -devel
  packages in FC pollute the linker's search path with leading
  -L%_libdir options, which makes parallel installation of multiple
  library versions unnecessarily complicated.



gpgme-0.3.16-macro.patch:

--- NEW FILE gpgme-0.3.16-macro.patch ---
diff -Nur gpgme-0.3.16-orig/gpgme/ath.c gpgme-0.3.16/gpgme/ath.c
--- gpgme-0.3.16-orig/gpgme/ath.c	2002-09-20 12:44:22.000000000 +0200
+++ gpgme-0.3.16/gpgme/ath.c	2005-03-18 03:29:24.000000000 +0100
@@ -108,7 +108,7 @@
 ath_read (int fd, void *buf, size_t nbytes)
 {
   if (ath_ops && ath_ops->read)
-    return ath_ops->read (fd, buf, nbytes);
+    return (ath_ops->read) (fd, buf, nbytes);
   else
     return read (fd, buf, nbytes);
 }

gpgme-0.3.16-relocate.patch:

--- NEW FILE gpgme-0.3.16-relocate.patch ---
diff -Nur gpgme-0.3.16-orig/gpgme/gpgme.m4 gpgme-0.3.16/gpgme/gpgme.m4
--- gpgme-0.3.16-orig/gpgme/gpgme.m4	2002-08-23 21:48:30.000000000 +0200
+++ gpgme-0.3.16/gpgme/gpgme.m4	2005-03-18 03:42:55.000000000 +0100
@@ -6,7 +6,7 @@
 dnl               [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
 dnl Test for libgpgme and define GPGME_CFLAGS and GPGME_LIBS
 dnl
-AC_DEFUN([AM_PATH_GPGME],
+AC_DEFUN([AM_PATH_GPGME03],
 [ AC_ARG_WITH(gpgme-prefix,
             AC_HELP_STRING([--with-gpgme-prefix=PFX],
                            [prefix where GPGME is installed (optional)]),


Index: gpgme03.spec
===================================================================
RCS file: /cvs/extras/devel/gpgme03/gpgme03.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- gpgme03.spec	3 Mar 2005 21:26:03 -0000	1.8
+++ gpgme03.spec	18 Mar 2005 03:02:16 -0000	1.9
@@ -1,12 +1,17 @@
+# For partial relocation of files to avoid conflict with gpgme package.
+%define rootprefix	%{_libdir}/gpgme03
+
 Summary:        GnuPG Made Easy interface library
 Name:           gpgme03
 Version:        0.3.16
-Release:        7
+Release:        8
 License:        GPL
 Group:          Applications/System
 Source:         ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-0.3.16.tar.gz
 Patch:          gpgme-0.3.16-select.patch
 Patch1:         gpgme-0.3.16-underquoted.patch
+Patch2:         gpgme-0.3.16-macro.patch
+Patch3:         gpgme-0.3.16-relocate.patch
 URL:            http://www.gnupg.org/related_software/gpgme/
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  gnupg >= 1.2.0
@@ -23,7 +28,6 @@
 Requires:       %{name} = %{version}-%{release}
 Requires(post): /sbin/install-info
 Requires(postun): /sbin/install-info
-Conflicts:      gpgme-devel
 
 %description    devel
 Static library, object and header files for GnuPG Made Easy (GPGME).
@@ -33,10 +37,15 @@
 %setup -q -n gpgme-%{version}
 %patch -p1 -b .select
 %patch1 -p1 -b .underquoted
+%patch2 -p1 -b .macro
+%patch3 -p1 -b .relocate
 
 
 %build
-%configure --with-pth=no --without-gpgsm
+%configure --with-pth=no --without-gpgsm \
+    --bindir=%{rootprefix}/bin \
+    --includedir=%{rootprefix}/include \
+    --libdir=%{rootprefix}/lib
 make %{?_smp_mflags}
 
 
@@ -45,6 +54,16 @@
 make install DESTDIR=${RPM_BUILD_ROOT}
 rm -f $RPM_BUILD_ROOT{%{_infodir}/dir,%{_libdir}/*.la}
 
+# Relocation and renaming:
+mv $RPM_BUILD_ROOT%{_datadir}/info/gpgme{.info,03.info}
+mkdir -p $RPM_BUILD_ROOT%{_libdir}
+mv $RPM_BUILD_ROOT%{rootprefix}/lib/libgpgme.so.* $RPM_BUILD_ROOT%{_libdir}
+# Keep run-time libs in original libdir and link build-time lib to there.
+rm -f  $RPM_BUILD_ROOT%{rootprefix}/lib/libgpgme{.so,.la}
+ln -s %{_libdir}/libgpgme.so.6 $RPM_BUILD_ROOT%{rootprefix}/lib/libgpgme.so
+ln -s %{_libdir}/libgpgme.so.6 $RPM_BUILD_ROOT%{rootprefix}/lib/libgpgme03.so
+sed -i 's!lgpgme!lgpgme03!' $RPM_BUILD_ROOT%{rootprefix}/bin/gpgme-config
+
 
 %check || :
 make check
@@ -74,15 +93,24 @@
 
 %files devel
 %defattr(-,root,root,-)
-%{_bindir}/gpgme-config
-%{_includedir}/gpgme.h
-%{_libdir}/libgpgme.a
-%{_libdir}/libgpgme.so
+%{rootprefix}/bin/gpgme-config
+%{rootprefix}/include/gpgme.h
+%{rootprefix}/lib/libgpgme.a
+%{rootprefix}/lib/libgpgme.so
 %{_datadir}/aclocal/gpgme.m4
-%{_infodir}/gpgme.info*
+%{_infodir}/gpgme03.info*
 
 
 %changelog
+* Fri Mar 18 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.3.16-8
+- Fix build for FC4.
+- Remove conflict with gpgme packages (relocate files in -devel
+  package, rename .info file and rename macro in .m4 file).
+  This is not as clean as I wanted it to be. But other -devel
+  packages in FC pollute the linker's search path with leading
+  -L%_libdir options, which makes parallel installation of multiple
+  library versions unnecessarily complicated.
+
 * Sun Jan 16 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.3.16-7
 - Disable GPGSM, remove /usr/bin/gpgsm dependency.
   None of our GPGME 0.3.x API users need this.




More information about the fedora-extras-commits mailing list