gpa: Detect homedir via gpgconf.
[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         build-aux/git-log-footer build-aux/git-log-fix \
27         patches/pthreads-w32-2-8-0-release/01-make.patch \
28  patches/pthreads-w32-2-8-0-release/02-mingw_w64_timespec_compatibility.patch \
29         patches/glib-2.20.0/01-socket.patch \
30         patches/glib-2.24.0/01-socket.patch \
31         patches/glib-2.34.3/01-socket.patch \
32         patches/glib-2.34.3/02-no-kill.patch \
33         patches/libxml2-2.7.8/01-cve-2012-5134 \
34         patches/gnupg2/01-version.patch.in \
35         patches/gnupg2-2.0.20/02-allow-mark-trusted.patch \
36         patches/dirmngr-1.1.0/01-mmap.patch \
37         patches/gpgol-1.1.3/01-w64-ming64.patch  \
38         patches/gpgol-1.1.3/02-off_t.postcfg-build \
39         patches/libetpan-0.57/01-gnutls_compat.patch \
40         patches/claws-mail-3.9.1/01-w64-mingw32.patch \
41         patches/claws-mail-3.9.1/02-ldap-opt.patch \
42         patches/claws-mail-3.9.1/03-all-crypto.patch \
43         patches/claws-mail-3.9.1/20-c416e89d.patch \
44         patches/claws-mail-3.9.1/21-66aa06c7.patch \
45         patches/claws-mail-3.9.1/50-configure.patch \
46         patches/claws-mail-3.9.1/51-version-file.patch \
47         patches/claws-mail-3.9.1/80-src-makefile.postcfg-build \
48         patches/gtkhtml2_viewer-0.34/80-src-makefile.postcfg-build \
49         patches/gnutls-2.12.21/01-openssl-wincrypt.patch \
50         patches/libgpg-error-1.12/01-fix-get-string.patch \
51         patches/gpa-0.9.4/01-bin-encrypt.patch \
52         patches/gpa-0.9.4/02-cms-detection.patch \
53         patches/gpa-0.9.4/02-x509-import.patch \
54         patches/gpa-0.9.4/03-homedir-via-gpgconf.patch
55
56 copy-news:
57         cp NEWS doc/website/NEWS.last
58
59
60 copy-release: gpg4win-$(VERSION).tar.bz2 src/gpg4win-$(VERSION).exe \
61               src/gpg4win-light-$(VERSION).exe \
62               src/gpg4win-vanilla-$(VERSION).exe
63         @echo Copying $(VERSION) to $(RELEASEHOST) >&2
64         @set -e;\
65         if ssh "$$(echo $(RELEASEHOST)|cut -d: -f -1)" \
66         test -f "$$(echo $(RELEASEHOST)/gpg4win-$(VERSION).exe|cut -d: -f2-)";\
67         then echo "This release has already been copied to the server" >&2 ;\
68         else scp gpg4win-$(VERSION).tar.bz2 \
69                  src/gpg4win-$(VERSION).exe \
70                  src/gpg4win-light-$(VERSION).exe \
71                  src/gpg4win-vanilla-$(VERSION).exe \
72                  src/gpg4win-src-$(VERSION).exe  $(RELEASEHOST)/ ;\
73              for f in en de ; do \
74                scp src/README.$$f.txt \
75                      $(RELEASEHOST)/README-$(VERSION).$$f.txt; \
76              done;\
77         fi
78
79 dist-hook: gen-ChangeLog
80
81 gen_start_date = 2012-03-26T00:00:00
82 .PHONY: gen-ChangeLog
83 gen-ChangeLog:
84         set -e;                                                         \
85         if test -d $(top_srcdir)/.git; then                             \
86           (cd $(top_srcdir) &&                                          \
87             $(GITLOG_TO_CHANGELOG) --append-dot --tear-off              \
88             --amend=build-aux/git-log-fix                               \
89             --since=$(gen_start_date) ) > $(distdir)/cl-t;              \
90           cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
91           rm -f $(distdir)/ChangeLog;                                   \
92           mv $(distdir)/cl-t $(distdir)/ChangeLog;                      \
93         fi