[PATCH 3/3] move installed gpg and gpgv when --enable-gpg2-is-gpg

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Mar 30 17:51:03 CEST 2016


* configure.ac: introduce an automake conditional GPG2_IS_GPG, test
  for WinCE there.
* g10/Makefile.am: re-use the WinCE install-exec-hook to move the
  files into the right location when GPG2_IS_GPG is set
---
 configure.ac    | 14 +++++++++++---
 g10/Makefile.am |  5 +++--
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 003e509..30a89cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -211,10 +211,18 @@ test -n "$GNUPG_DIRMNGR_LDAP_PGM" \
 # installed name of gpg.  This option sets "gpg2"'s installed name to
 # just "gpg".  Note that it might be required to rename gpg2 to gpg
 # manually after the build process.
-#
+
 AC_ARG_ENABLE(gpg2-is-gpg,
     AC_HELP_STRING([--enable-gpg2-is-gpg],[Set installed name of gpg2 to gpg]),
-    gpg2_is_gpg=$enableval)
+    gpg2_is_gpg=$enableval,
+    # There has never been a gpg for WindowsCE, so this should default
+    # to true on that platform.
+    [case "${host}" in
+          *-mingw32ce*)
+                  gpg2_is_gpg=yes
+                  ;;
+     esac]
+ )
 if test "$gpg2_is_gpg" = "yes"; then
    name_of_installed_gpg=gpg
 else
@@ -222,7 +230,7 @@ else
 fi
 AC_DEFINE_UNQUOTED(NAME_OF_INSTALLED_GPG, "$name_of_installed_gpg",
                    [The name of the installed GPG tool])
-
+AM_CONDITIONAL([GPG2_IS_GPG], [test x$name_of_installed_gpg = xgpg])
 
 # SELinux support includes tracking of sensitive files to avoid
 # leaking their contents through processing these files by gpg itself
diff --git a/g10/Makefile.am b/g10/Makefile.am
index 473a3ac..e16a2c2 100644
--- a/g10/Makefile.am
+++ b/g10/Makefile.am
@@ -199,9 +199,10 @@ uninstall-local:
 	- at rm $(DESTDIR)$(pkgdatadir)/distsigkey.gpg
 
 
-# There has never been a gpg for WindowsCE, thus we don't need a gpg2 here
-if HAVE_W32CE_SYSTEM
+if GPG2_IS_GPG
 install-exec-hook:
 	mv -f $(DESTDIR)$(bindir)/gpg2$(EXEEXT) \
               $(DESTDIR)$(bindir)/gpg$(EXEEXT)
+	mv -f $(DESTDIR)$(bindir)/gpgv2$(EXEEXT) \
+              $(DESTDIR)$(bindir)/gpgv$(EXEEXT)
 endif
-- 
2.8.0.rc3




More information about the Gnupg-devel mailing list