diff --git a/README b/README index d5cd727c5..da4c4987a 100644 --- a/README +++ b/README @@ -70,6 +70,10 @@ binary gpg but a gpg2 so that this package won't conflict with a GnuPG In case of problem please ask on the gnupg-users@gnupg.org mailing list for advise. +Instruction on how to build for Windows can be found in the file +doc/HACKING in the section "How to build an installer for Windows". +This requires some experience as developer. + Note that the PKITS tests are always skipped unless you copy the PKITS test data file into the tests/pkits directory. There is no need to run these test and some of them may even fail because the test scripts diff --git a/build-aux/speedo.mk b/build-aux/speedo.mk index 1bebd8b28..1ef160003 100644 --- a/build-aux/speedo.mk +++ b/build-aux/speedo.mk @@ -46,19 +46,24 @@ SPEEDO_MK := $(realpath $(lastword $(MAKEFILE_LIST))) -# Set this to "git" or "release". +# Set this to "git" to build from git, +# to "release" from tarballs, +# to "this" from the unpacked sources. WHAT=git # Set target to "native" or "w32" TARGETOS=w32 -# Set to the location of the directory with traballs of +# Set to the location of the directory with tarballs of # external packages. TARBALLS=$(shell pwd)/../tarballs # Number of parallel make jobs MAKE_J=3 +# Name to use for the w32 installer and sources +INST_NAME=gnupg-w32 + # =====BEGIN LIST OF PACKAGES===== # The packages that should be built. The order is also the build order. # Fixme: Do we need to build pkg-config for cross-building? @@ -172,7 +177,8 @@ pkg2rep = $(TARBALLS) # Note that you can override the defaults in this file in a local file # "config.mk" -ifeq ($(WHAT),git) +ifeq ($(WHAT),this) +else ifeq ($(WHAT),git) speedo_pkg_libgpg_error_git = $(gitrep)/libgpg-error speedo_pkg_libgpg_error_gitref = master speedo_pkg_npth_git = $(gitrep)/npth @@ -191,7 +197,7 @@ ifeq ($(WHAT),git) speedo_pkg_gpa_gitref = master speedo_pkg_gpgex_git = $(gitrep)/gpgex speedo_pkg_gpgex_gitref = master -else +else ifeq ($(WHAT),release) speedo_pkg_libgpg_error_tar = \ $(pkgrep)/libgpg-error/libgpg-error-$(libgpg_error_ver).tar.bz2 speedo_pkg_npth_tar = \ @@ -210,6 +216,8 @@ else $(pkgrep)/gpa/gpa-$(gpa_ver).tar.bz2 speedo_pkg_gpgex_tar = \ $(pkgrep)/gpex/gpgex-$(gpa_ver).tar.bz2 +else + $(error invalid value for WHAT (use on of: git release this)) endif speedo_pkg_pkg_config_tar = $(pkg2rep)/pkg-config-$(pkg_config_ver).tar.gz @@ -529,7 +537,9 @@ $(stampdir)/stamp-$(1)-00-unpack: $(stampdir)/stamp-directories @echo "speedo: */" @(set -e; cd $(sdir); \ $(call SETVARS,$(1)); \ - if [ "$(1)" = "gnupg" ]; then \ + if [ "$(WHAT)" = "this" ]; then \ + echo "speedo: using included source"; \ + elif [ "$(1)" = "gnupg" ]; then \ cd $$$${pkgsdir}; \ if [ -f config.log ]; then \ echo "GnuPG has already been build in-source" >&2 ;\ @@ -782,11 +792,13 @@ clean-speedo: dist-source: all for i in 00 01 02 03; do sleep 1;touch PLAY/stamps/stamp-*-${i}-*;done (set -e;\ - tarname="gnupg-w32-$(INST_VERSION)_$(BUILD_ISODATE).tar" ;\ + tarname="$(INST_NAME)-$(INST_VERSION)_$(BUILD_ISODATE).tar" ;\ [ -f "$$tarname" ] && rm "$$tarname" ;\ tar -C $(topsrc) -cf "$$tarname" --exclude-backups --exclude-vc \ + --transform='s,^\./,$(INST_NAME)-$(INST_VERSION)/,' \ --anchored --exclude './PLAY' . ;\ tar --totals -rf "$$tarname" --exclude-backups --exclude-vc \ + --transform='s,^,$(INST_NAME)-$(INST_VERSION)/,' \ PLAY/stamps/stamp-*-00-unpack PLAY/src ;\ xz "$$tarname" ;\ ) @@ -823,10 +835,11 @@ installer: all w32_insthelpers $(bdir)/inst-options.ini $(bdir)/README.txt -DTOP_SRCDIR=$(topsrc) \ -DW32_SRCDIR=$(w32src) \ -DBUILD_ISODATE=$(BUILD_ISODATE) \ + -DNAME=$(INST_NAME) \ -DVERSION=$(INST_VERSION) \ -DPROD_VERSION=$(INST_PROD_VERSION) \ $(w32src)/inst.nsi - @echo "Ready: $(idir)/gnupg-w32-$(INST_VERSION)" + @echo "Ready: $(idir)/$(INST_NAME)-$(INST_VERSION)" # # Mark phony targets diff --git a/build-aux/speedo/w32/inst.nsi b/build-aux/speedo/w32/inst.nsi index 30b3871e7..5f8c55cfc 100644 --- a/build-aux/speedo/w32/inst.nsi +++ b/build-aux/speedo/w32/inst.nsi @@ -23,6 +23,7 @@ # TOP_SRCDIR # W32_SRCDIR # BUILD_ISODATE +# NAME # VERSION # PROD_VERSION @@ -93,7 +94,7 @@ SetCompressor lzma Name "${PRETTY_PACKAGE}" # Set the output filename. -OutFile "gnupg-w32-${VERSION}.exe" +OutFile "$(NAME)-${VERSION}.exe" #Fixme: Do we need a logo #Icon "${TOP_SRCDIR}/doc/logo/gnupg-logo-icon.ico" diff --git a/doc/HACKING b/doc/HACKING index 8116c3f3a..252bc4216 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -93,12 +93,47 @@ appear in the ChangeLog. need. If you really need to do it, use a separate commit for such a change. +* Windows +** How to build an installer for Windows + + Your best bet is to use a decent Debian System for development. + You need to install a long list of tools for building. This list + still needs to be compiled. However, the build process will stop + if a tool is missing. GNU make is required (on non GNU systems + often installed as "gmake"). The installer requires a couple of + extra software to be available either as tarballs or as local git + repositories. In case this file here is part of a gnupg-w32-2.*.xz + complete tarball as distributed from the same place as a binary + installer, all such tarballs are already included. + + Cd to the GnuPG source directory and use one of one of these + command: + + - If sources are included (gnupg-w32-*.tar.xz) + + make -f build-aux/speedo.mk WHAT=this installer + + - To build from tarballs + + make -f build-aux/speedo.mk WHAT=release TARBALLS=TARDIR installer + + - To build from local GIT repos + + make -f build-aux/speedo.mk WHAT=git TARBALLS=TARDIR installer + + Note that also you need to supply tarballs with supporting + libraries even if you build from git. The makefile expects only + the core GnuPG software to be available as local GIT repositories. + speedo.mk has the versions of the tarballs and the branch names of + the git repositories. In case of problems, don't hesitate to ask + on the gnupg-devel mailing for help. + + * Debug hints See the manual for some hints. * Standards - ** RFCs 1423 Privacy Enhancement for Internet Electronic Mail: @@ -120,6 +155,8 @@ appear in the ChangeLog. 4880 Current OpenPGP specification. +6337 Elliptic Curve Cryptography (ECC) in OpenPGP + * Various information ** Directory Layout