gnupg: Make SPRx332 work under Windows.
[gpg4win.git] / Makefile.am
1 # Makefile.am - Installer for GnuPG 4 Windows Makefile.
2 # Copyright (C) 2005, 2008, 2012 g10 Code GmbH
3 #
4 # This file is part of GPG4Win.
5 #
6 # GPG4Win is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # GPG4Win is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
18
19 ACLOCAL_AMFLAGS = -I m4
20 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
21 DISTCHECK_CONFIGURE_FLAGS = --host=i686-w64-mingw32
22
23 SUBDIRS = po packages doc src
24
25 EXTRA_DIST = autogen.sh README.GIT ONEWS \
26         doc/license-page doc/GPLv3 \
27         build-aux/git-log-footer build-aux/git-log-fix \
28         patches/pthreads-w32-2-8-0-release/01-make.patch \
29  patches/pthreads-w32-2-8-0-release/02-mingw_w64_timespec_compatibility.patch \
30         patches/glib-2.20.0/01-socket.patch \
31         patches/glib-2.24.0/01-socket.patch \
32         patches/glib-2.34.3/01-socket.patch \
33         patches/glib-2.34.3/02-no-kill.patch \
34         patches/gtk+-2.24.17/01-utf-conv-crash.patch \
35         patches/gtk+-2.24.17/02-crlf.patch \
36         patches/libxml2-2.7.8/01-cve-2012-5134 \
37         patches/gnupg2/01-version.patch.in \
38         patches/gnupg2-2.0.20/02-allow-mark-trusted.patch \
39         patches/gnupg2-2.0.21/01-scd-varlen.patch \
40         patches/gnupg2-2.0.21/02-scd-spr532.patch \
41         patches/dirmngr-1.1.0/01-mmap.patch \
42         patches/gpgol-1.1.3/01-w64-ming64.patch  \
43         patches/gpgol-1.1.3/02-off_t.postcfg-build \
44         patches/libetpan-0.57/01-gnutls_compat.patch \
45         patches/claws-mail-3.9.1/01-w64-mingw32.patch \
46         patches/claws-mail-3.9.1/02-ldap-opt.patch \
47         patches/claws-mail-3.9.1/03-all-crypto.patch \
48         patches/claws-mail-3.9.1/20-c416e89d.patch \
49         patches/claws-mail-3.9.1/21-66aa06c7.patch \
50         patches/claws-mail-3.9.1/50-configure.patch \
51         patches/claws-mail-3.9.1/51-version-file.patch \
52         patches/claws-mail-3.9.1/80-src-makefile.postcfg-build \
53         patches/gtkhtml2_viewer-0.34/80-src-makefile.postcfg-build \
54         patches/gnutls-2.12.21/01-openssl-wincrypt.patch \
55         patches/libgpg-error-1.12/01-fix-get-string.patch \
56         patches/gpa-0.9.4/01-bin-encrypt.patch \
57         patches/gpa-0.9.4/02-cms-detection.patch \
58         patches/gpa-0.9.4/02-x509-import.patch \
59         patches/gpa-0.9.4/03-homedir-via-gpgconf.patch \
60         patches/gpa-0.9.4/04-utf-clip-crash.patch \
61         patches/gpa-0.9.4/05-event-done.patch \
62         patches/gpgme-1.4.3/01-card-edit.patch
63
64 copy-news:
65         cp NEWS doc/website/NEWS.last
66
67
68 copy-release: gpg4win-$(VERSION).tar.bz2 src/gpg4win-$(VERSION).exe \
69               src/gpg4win-light-$(VERSION).exe \
70               src/gpg4win-vanilla-$(VERSION).exe
71         @echo Copying $(VERSION) to $(RELEASEHOST) >&2
72         @set -e;\
73         if ssh "$$(echo $(RELEASEHOST)|cut -d: -f -1)" \
74         test -f "$$(echo $(RELEASEHOST)/gpg4win-$(VERSION).exe|cut -d: -f2-)";\
75         then echo "This release has already been copied to the server" >&2 ;\
76         else scp gpg4win-$(VERSION).tar.bz2 \
77                  src/gpg4win-$(VERSION).exe \
78                  src/gpg4win-light-$(VERSION).exe \
79                  src/gpg4win-vanilla-$(VERSION).exe \
80                  src/gpg4win-src-$(VERSION).exe  $(RELEASEHOST)/ ;\
81              for f in en de ; do \
82                scp src/README.$$f.txt \
83                      $(RELEASEHOST)/README-$(VERSION).$$f.txt; \
84              done;\
85         fi
86
87 dist-hook: gen-ChangeLog
88
89 gen_start_date = 2012-03-26T00:00:00
90 .PHONY: gen-ChangeLog
91 gen-ChangeLog:
92         set -e;                                                         \
93         if test -d $(top_srcdir)/.git; then                             \
94           (cd $(top_srcdir) &&                                          \
95             $(GITLOG_TO_CHANGELOG) --append-dot --tear-off              \
96             --amend=build-aux/git-log-fix                               \
97             --since=$(gen_start_date) ) > $(distdir)/cl-t;              \
98           cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
99           rm -f $(distdir)/ChangeLog;                                   \
100           mv $(distdir)/cl-t $(distdir)/ChangeLog;                      \
101         fi