gnupg: added a release script to build and install gnupg.
authorPat Thoyts <patthoyts@users.sourceforge.net>
Sat, 2 Feb 2013 11:08:35 +0000 (2 11:08 +0000)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Sat, 2 Feb 2013 11:08:35 +0000 (2 11:08 +0000)
When built for Windows gpg expects to find it's helper scripts in the same
directory but the installer places these in the libexec folder so we need
to move these so that 'gpg --refresh-keys' can work.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
src/gnupg/.gitignore [new file with mode: 0644]
src/gnupg/patches/0001-Support-case-insensitive-filenames-for-assembler-pro.patch [new file with mode: 0644]
src/gnupg/release.sh [new file with mode: 0644]

diff --git a/src/gnupg/.gitignore b/src/gnupg/.gitignore
new file mode 100644 (file)
index 0000000..95e3686
--- /dev/null
@@ -0,0 +1,4 @@
+gnupg-*/
+gnupg-*.tar.gz
+gnupg-*.tar.gz.asc
+
diff --git a/src/gnupg/patches/0001-Support-case-insensitive-filenames-for-assembler-pro.patch b/src/gnupg/patches/0001-Support-case-insensitive-filenames-for-assembler-pro.patch
new file mode 100644 (file)
index 0000000..2cdaab9
--- /dev/null
@@ -0,0 +1,28 @@
+From 3d7333df34b22b394ac6ff3253cbf9d311285558 Mon Sep 17 00:00:00 2001
+From: Pat Thoyts <patthoyts@users.sourceforge.net>
+Date: Sat, 2 Feb 2013 00:08:12 +0000
+Subject: [PATCH] Support case-insensitive filenames for assembler processing
+
+Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
+---
+ mpi/Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mpi/Makefile.in b/mpi/Makefile.in
+index 54392c7..603fd11 100644
+--- a/mpi/Makefile.in
++++ b/mpi/Makefile.in
+@@ -641,8 +641,8 @@ uninstall-am:
+ # cancel the default rules used by libtool which do not really
+ # work and add one to cpp .S files
+ .S.o:
+-       $(CPP) $(INCLUDES) $(DEFS) $< | grep -v '^#' > _$*.s
+-       $(COMPILE) $(AM_CCASFLAGS) -c _$*.s
++       $(CPP) -x assembler-with-cpp $(INCLUDES) $(DEFS) $< | grep -v '^#' > _$*.asm
++       $(COMPILE) -x assembler $(AM_CCASFLAGS) -c _$*.asm
+        mv -f _$*.o $*.o
+ .S.lo:
+-- 
+1.8.1.msysgit.1
+
diff --git a/src/gnupg/release.sh b/src/gnupg/release.sh
new file mode 100644 (file)
index 0000000..7f1dee2
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+cd "$(dirname "$0")" && . ../common/update-lib.sh
+
+package=gnupg
+version=1.4.13
+d=$package-$version
+tar=$d.tar.gz
+url=http://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnupg
+sha1=9f2696f3b61cb771053db599e884952c80d2a6e7
+configure_options=
+
+download &&
+test -d $d || {
+       tar xzf $tar && (
+               cd $d &&
+               git init &&
+               git config core.autocrlf false &&
+               git add . &&
+               git commit -m "Import of $tar"
+       )
+} || die "Could not check out gnupg source"
+
+test $(cd $d && git rev-list HEAD | wc -l) -gt 1 ||
+(cd $d && git am ../patches/*) ||
+die "Could not apply patches"
+
+(cd $d &&
+CFLAGS='-O3 -m32 -march=pentium-m -mfpmath=sse' LDFLAGS='-s' \
+       ./configure --prefix=/mingw &&
+make &&
+index=$(/share/msysGit/pre-install.sh) &&
+make install-exec &&
+mv /mingw/libexec/gnupg/* /mingw/bin/ &&
+rmdir /mingw/libexec/gnupg &&
+/share/msysGit/post-install.sh $index "Install $tar"
+) || die "Could not install $tar"