Page MenuHome GnuPG

No OneTemporary

diff --git a/src/gpg4win.mk.in b/src/gpg4win.mk.in
index d7c829d7..86142807 100644
--- a/src/gpg4win.mk.in
+++ b/src/gpg4win.mk.in
@@ -1,1367 +1,1368 @@
# gpg4win.m4.in - Installer for GnuPG 4 Windows Makefile. -*- makefile -*-
# Copyright (C) 2005, 2009 g10 Code GmbH
#
# This file is part of GPG4Win.
#
# GPG4Win is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# GPG4Win is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
AUTHENTICODE_FILES = \
bin/gpg-error.exe \
bin/gpgex.dll \
bin/gpgme-json.exe \
bin/gpgol-client.exe \
bin/gpgolconfig.exe \
bin/gpgol.dll \
bin/gpgolkeyadder.exe \
bin/gpgol-server.exe \
- bin/gpgpass.exe \
bin/libiconv-2.dll \
bin/kleopatra.exe \
bin/libassuan-9.dll \
bin/libfreetype.dll \
bin/libgpg-error-0.dll \
bin/libgpgme-45.dll \
bin/libgpgmepp-7.dll \
bin/libical.dll \
bin/libicalss.dll \
bin/libicalvcal.dll \
bin/libiconv-2.dll \
bin/libintl-8.dll \
bin/libjpeg-9.dll \
bin/libKF6Archive.dll \
bin/libKF6Bookmarks.dll \
bin/libKF6BreezeIcons.dll \
bin/libKF6CalendarCore.dll \
bin/libKF6Codecs.dll \
bin/libKF6ColorScheme.dll \
bin/libKF6Completion.dll \
bin/libKF6ConfigCore.dll \
bin/libKF6ConfigGui.dll \
bin/libKF6ConfigWidgets.dll \
bin/libKF6Contacts.dll \
bin/libKF6CoreAddons.dll \
bin/libKF6Crash.dll \
bin/libKF6GuiAddons.dll \
bin/libKF6I18n.dll \
bin/libKF6I18nLocaleData.dll \
bin/libKF6IconThemes.dll \
bin/libKF6IconWidgets.dll \
bin/libKF6ItemModels.dll \
bin/libKF6ItemViews.dll \
bin/libKF6JobWidgets.dll \
bin/libKF6KIOCore.dll \
bin/libKF6KIOGui.dll \
bin/libKF6KIOWidgets.dll \
bin/libKF6Parts.dll \
- bin/libKF6Prison.dll \
bin/libKF6Service.dll \
bin/libKF6Solid.dll \
bin/libKF6SonnetCore.dll \
bin/libKF6SonnetUi.dll \
bin/libKF6StatusNotifierItem.dll \
bin/libKF6TextWidgets.dll \
bin/libKF6ThreadWeaver.dll \
bin/libKF6WidgetsAddons.dll \
bin/libKF6WindowSystem.dll \
bin/libKF6XmlGui.dll \
bin/libKPim6Libkleo.dll \
bin/libKPim6Mbox.dll \
bin/libKPim6Mime.dll \
bin/libKPim6MimeTreeParserCore.dll \
bin/libKPim6MimeTreeParserWidgets.dll \
bin/libOkular6Core.dll \
bin/libopenjp2.dll \
bin/libpcre2-16.dll \
bin/libpng16-16.dll \
bin/libpoppler-153.dll \
bin/libpoppler-qt6-3.dll \
bin/libqgpgmeqt6-15.dll \
- bin/libqrencode.dll \
bin/libtiff.dll \
bin/libzstd.dll \
bin/okular.exe \
bin/overlayer.exe \
bin/paperkey.exe \
bin/pinentry.exe \
bin/pinentry-w32.exe \
bin/Qt6Core.dll \
bin/Qt6Gui.dll \
bin/Qt6HttpServer.dll \
bin/Qt6Network.dll \
bin/Qt6PrintSupport.dll \
bin/Qt6Svg.dll \
bin/Qt6WebSockets.dll \
bin/Qt6Widgets.dll \
bin/Qt6Xml.dll \
bin/resolver.exe \
bin/zlib1.dll \
../install-ex/bin/gpgex.dll \
../install-ex/bin/gpgme-json.exe \
../install-ex/bin/gpgol.dll \
../install-ex/bin/libassuan-9.dll \
../install-ex/bin/libgpg-error-0.dll \
../install-ex/bin/libgpgme-45.dll \
../install-ex/bin/libgpgmepp-7.dll \
../install-ex/libexec/gpgme-w32spawn.exe \
libexec/gpgme-w32spawn.exe \
lib/plugins/kf6/kio/kio_file.dll \
lib/plugins/kf6/sonnet/sonnet_ispellchecker.dll \
lib/plugins/kf6/parts/okularpart.dll \
lib/plugins/okular_generators/okularGenerator_poppler.dll \
lib/scute.dll \
../src/libstdc++-6.dll-x \
../src/libwinpthread-1.dll-x \
plugins/iconengines/qsvgicon.dll \
plugins/imageformats/qsvg.dll \
plugins/platforms/qwindows.dll \
plugins/styles/qmodernwindowsstyle.dll \
plugins/iconengines/qsvgicon.dll \
plugins/imageformats/qsvg.dll \
plugins/tls/qschannelbackend.dll \
../src/sha1sum.exe \
../src/sha256sum.exe
+# Some programs are not always build, thus we list them here.
# Not all of these dlls must exist as they are installed by nsis with
# the /nonfatal option.
AUTHENTICODE_FILES_OPTIONAL = \
+ bin/gpgpass.exe \
+ bin/libKF6Prison.dll \
+ bin/libqrencode.dll \
../src/libgcc_s_dw2-1.dll-x \
../src/libgcc_s_sjlj-1.dll-x \
../src/libgcc_s_seh-1.dll-x \
../src/libwinpthread-1.dll-ex
# No servicable parts below this line :)
ifdef GIT_BETASTRING
VSD_VERSION_FILE:=$(VSD_VERSION)-Beta
else
VSD_VERSION_FILE:=$(VSD_VERSION)
endif
ifeq ($(IS_GPD_BUILD),yes)
MSI_FNAME_PREFIX := GnuPG-Desktop
MSI_PRODUCT_NAME := GnuPG Desktop
GNUPG_INSTALL_DIR_REGISTRY_KEY := Install+Directory
KLEOPATRA_APPLICATION_NAME := kleopatra-gpd
KLEOPATRA_ICON_DIR := $(tsdir)/src/icons/gpd
else ifeq ($(IS_VSD_BUILD),yes)
MSI_FNAME_PREFIX := GnuPG-VS-Desktop
MSI_PRODUCT_NAME := GnuPG VS-Desktop
GNUPG_INSTALL_DIR_REGISTRY_KEY := VSD+Install+Directory
KLEOPATRA_APPLICATION_NAME := kleopatra-vsd
KLEOPATRA_ICON_DIR :=
endif
# Common helpers
empty :=
space := $(empty) $(empty)
# We collect the names of all pkg files used.
pkg_files =
# Read signing information from ~/.gnupg-autogen.rc
# See gnupg/build-aux/speedo.mk for a description of this file.
define READ_AUTOGEN_template
$(1) = $$(shell \
if test -f $$$${HOME}/.gnupg-autogen.rc; then \
grep '^[[:blank:]]*$(1)[[:blank:]]*=' $$$${HOME}/.gnupg-autogen.rc \
| cut -d= -f2 | xargs; \
elif test -f $(tsdir)/.gnupg-autogen.rc; then \
grep '^[[:blank:]]*$(1)[[:blank:]]*=' $(tsdir)/.gnupg-autogen.rc \
| cut -d= -f2 | xargs; \
else \
echo "Warning: .gnupg-autogen.rc not found in HOME or $(tsdir)" \
>&2; \
echo ""; \
fi)
endef
$(eval $(call READ_AUTOGEN_template,VERSION_SIGNKEY))
# The key to sign the MSI installer is usually the same as the key used
# to sign the VERSION file.
msi_signkey = $(VERSION_SIGNKEY)
# Frob the name $1 by converting all '-' and '+' characters to '_'.
define FROB_macro
$(subst +,_,$(subst -,_,$(1)))
endef
# Get the variable $(1) (which may contain '-' and '+' characters).
define GETVAR
$($(call FROB_macro,$(1)))
endef
# Set a couple of common variables for the standard build architecture.
# Most of them describe package specific directories and are derived
# from the the macros set in the Makefile.am.
define SETVARS
set -e; \
pkg="$(call GETVAR,gpg4win_pkg_$(1))"; \
pkg_version="$(1)-$(call GETVAR,gpg4win_pkg_$(1)_version)"; \
pkgsdir="$(bdir)/$$$${pkg_version}"; \
pkgbdir="$(bdir)/$$$${pkg_version}-build"; \
pkgpatdir="$(patdir)/$$$${pkg_version}"; \
pkgpatbdir="$(patdir)/$(1)"; \
pkgidir="$(ipdir)/$$$${pkg_version}"; \
pkg_dev="$(call GETVAR,gpg4win_pkg_$(1)_dev)"; \
pkg_version_dev="$(1)-dev-$(call GETVAR,gpg4win_pkg_$(1)_version)"; \
pkgidir_dev="$(ipdir)/$$$${pkg_version_dev}"; \
pkgcfg="$(call GETVAR,gpg4win_pkg_$(1)_configure)"; \
pkgextracflags="$(call GETVAR,gpg4win_pkg_$(1)_extracflags)"; \
pkgmkargs="$(call GETVAR,gpg4win_pkg_$(1)_make_args)"; \
pkgmkargs_inst="$(call GETVAR,gpg4win_pkg_$(1)_make_args_inst)";\
pkgmkdir="$(call GETVAR,gpg4win_pkg_$(1)_make_dir)"; \
pkgmkdir_inst="$(call GETVAR,gpg4win_pkg_$(1)_make_dir)"; \
pkg_conf_subdir="$(call GETVAR,gpg4win_pkg_$(1)_conf_subdir)"; \
export PKG_CONFIG_PATH="$(idir)/lib/pkgconfig"; \
export PKG_CONFIG_LIBDIR="$(idir)/lib/pkgconfig"; \
export PATH="$(idir)/bin:$(nat_idir)/bin:$${PATH}"; \
export LD_LIBRARY_PATH=$(nat_idir)/lib:$(nat_idir)/lib64; \
export SYSROOT="$(idir)"; \
export CONFIG_SITE="$(tsdir)/src/config.site"
endef
# Set variables for building in an additional architecture
define SETVARS_EX
set -e; \
pkg="$(call GETVAR,gpg4win_pkg_$(1))"; \
pkg_version="$(1)-$(call GETVAR,gpg4win_pkg_$(1)_version)"; \
pkgsdir="$(bdir)/$$$${pkg_version}"; \
pkgbdir="$(bdir)/$$$${pkg_version}-ex-build"; \
pkgpatdir="$(patdir)/$$$${pkg_version}"; \
pkgpatbdir="$(patdir)/$(1)"; \
pkgidir="$(ex_ipdir)/$$$${pkg_version}"; \
pkgidir_dev="$(ex_ipdir)/$$$${pkg_version_dev}"; \
pkgcfg="$(call GETVAR,gpg4win_pkg_$(1)_ex_configure)"; \
pkgextracflags="$(call GETVAR,gpg4win_pkg_$(1)_ex_extracflags)"; \
pkgmkargs="$(call GETVAR,gpg4win_pkg_$(1)_ex_make_args)"; \
pkgmkargs_inst="$(call GETVAR,gpg4win_pkg_$(1)_ex_make_args_inst)"; \
pkgmkdir="$(call GETVAR,gpg4win_pkg_$(1)_ex_make_dir)"; \
pkgmkdir_inst="$(call GETVAR,gpg4win_pkg_$(1)_ex_make_dir)"; \
export PKG_CONFIG_PATH="$(ex_idir)/lib/pkgconfig"; \
export PKG_CONFIG_LIBDIR="$(ex_idir)/lib/pkgconfig"; \
export PATH="$(ex_idir)/bin:$(nat_idir)/bin:$${PATH}"; \
export LD_LIBRARY_PATH=$(nat_idir)/lib:$(nat_idir)/lib64; \
export SYSROOT="$(ex_idir)"
endef
# Set variables for building additional build tools for the native
# (i.e. build system) architecture.
define SETVARS_NATIVE
set -e; \
pkg="$(call GETVAR,gpg4win_pkg_$(1))"; \
pkg_version="$(1)-$(call GETVAR,gpg4win_pkg_$(1)_version)"; \
pkgsdir="$(bdir)/$$$${pkg_version}"; \
pkgbdir="$(bdir)/$$$${pkg_version}-native-build"; \
pkgpatdir="$(patdir)/$$$${pkg_version}"; \
pkgpatbdir="$(patdir)/$(1)"; \
pkgidir="$(nat_ipdir)/$$$${pkg_version}"; \
pkgidir_dev="$(nat_ipdir)/$$$${pkg_version_dev}"; \
pkgcfg="$(call GETVAR,gpg4win_pkg_$(1)_native_configure)"; \
pkgextracflags="$(call GETVAR,gpg4win_pkg_$(1)_native_extracflags)"; \
pkgmkargs="$(call GETVAR,gpg4win_pkg_$(1)_native_make_args)"; \
pkgmkargs_inst="$(call GETVAR,gpg4win_pkg_$(1)_native_make_args_inst)";\
pkgmkdir="$(call GETVAR,gpg4win_pkg_$(1)_native_make_dir)"; \
pkgmkdir_inst="$(call GETVAR,gpg4win_pkg_$(1)_native_make_dir)"; \
export PKG_CONFIG_PATH="$(nat_idir)/lib/pkgconfig"; \
export PKG_CONFIG_LIBDIR=""; \
export PATH="$(nat_idir)/bin:$${PATH}"; \
export LD_LIBRARY_PATH=$(nat_idir)/lib:$(nat_idir)/lib64; \
export SYSROOT="$(nat_idir)"
endef
# Support macro. Unpack the archive $(1).
define DEFLATE_macro
if [ -L "$$$${pkgsdir}" ]; then \
echo "Not overwriting symlink $$$${pkgsdir}"; \
else \
rm -rf $$$${pkgsdir}; \
tc=J; tf=""; \
case "$(1)" in \
*/qtbase*.*.tar.xz) \
tf='s,^qtbase-everywhere-src,qtbase,' ;; \
*/qttools*.*.tar.xz) \
tf='s,^qttools-everywhere-src,qttools,' ;; \
*/qtwinextras*.*.tar.xz) \
tf='s,^qtwinextras-everywhere-src,qtwinextras,' ;; \
*/qtsvg*.*.tar.xz) \
tf='s,^qtsvg-everywhere-src,qtsvg,' ;; \
*/qttranslations*.*.tar.xz) \
tf='s,^qttranslations-everywhere-src,qttranslations,' ;; \
*/qthttpserver*.*.tar.xz) \
tf='s,^qthttpserver-everywhere-src,qthttpserver,' ;; \
*/qtwebsockets*.*.tar.xz) \
tf='s,^qtwebsockets-everywhere-src,qtwebsockets,' ;; \
*.tar.gz | *.tgz) tc=z ;; \
*.tar.bz2 | *.tbz2 | *.tbz) tc=j ;; \
*.tar.xz ) tc=J ;; \
*.exe ) cp "$(1)" . ; tc="" ;; \
*.zip) $(UNZIP) -o "$(1)"; tc="" ;;\
esac; \
[ -n "$$$$tf" ] && tf="--transform=$$$$tf"; \
if [ -n "$$$$tc" -a -n "$(1)" ]; then \
$(TAR) -x$$$$tc $$$$tf -f "$(1)" ; \
fi; \
fi
endef
# Support macro. Strip all exe files below $(1).
define STRIP_macro
if test -z '$(DEBUG)'; then \
(cd $(1); \
for f in `find . -name \*.exe -o -name \*.dll`; do \
echo Calling $(STRIP) "$$$${pkg_version}/$$$${f}"; \
$(STRIP) "$$$${f}";\
done);\
fi
endef
# Support macro. Strip all exe files below $(1) using STRIP_EX.
define STRIP_EX_macro
if test -z '$(DEBUG)'; then \
(cd $(1); \
for f in `find . -name \*.exe -o -name \*.dll`; do \
echo Calling $(STRIP_EX) "$$$${pkg_version}/$$$${f}"; \
$(STRIP_EX) "$$$${f}";\
done); \
fi
endef
define GETDEPS
$(addprefix $(stampdir)/stamp-final-, $(call GETVAR,gpg4win_pkg_$(1)_deps))
endef
define GETDEPS_EX
$(addprefix $(stampdir)/stamp-final-ex-, $(call GETVAR,gpg4win_pkg_$(1)_ex_deps))
endef
define GETDEPS_NATIVE
$(addprefix $(stampdir)/stamp-final-native-, $(call GETVAR,gpg4win_pkg_$(1)_native_deps))
endef
# Template for source packages to build for an additional host
define EXPKG_template_
pkg_files += $(call GETVAR,gpg4win_pkg_$(1))
$(stampdir)/stamp-$(1)-ex-00-unpack: \
$(stampdir)/stamp-$(1)-00-unpack \
$(call GETDEPS_EX,$(1))
touch $(stampdir)/stamp-$(1)-ex-00-unpack
$(stampdir)/stamp-$(1)-ex-01-patch: \
$(stampdir)/stamp-$(1)-ex-00-unpack \
$(stampdir)/stamp-$(1)-01-patch
touch $(stampdir)/stamp-$(1)-ex-01-patch
$(stampdir)/stamp-$(1)-ex-02-configure: $(stampdir)/stamp-$(1)-ex-01-patch
($(call SETVARS_EX,$(1)); \
mkdir -p "$$$${pkgbdir}"; \
cd "$$$${pkgbdir}"; \
eval "../$$$${pkg_version}/configure" \
--prefix="$$$${pkgidir}" \
--libdir="$$$${pkgidir}/lib" \
--host=$(GPGEX_ADD_HOST) \
--build=$(build) \
$$$${pkgcfg} CFLAGS=\"-fcommon $$$${pkgextracflags}\"\
|| exit 1; \
shopt -s nullglob; \
for pfile in "$$$${pkgpatbdir}"/*.postcfg \
"$$$${pkgpatdir}"/*.postcfg ; do \
(cd "$$$${pkgsdir}"; "$$$${pfile}") \
done; \
for pfile in "$$$${pkgpatbdir}"/*.postcfg-build \
"$$$${pkgpatdir}"/*.postcfg-build ; do \
(cd "$$$${pkgbdir}"; "$$$${pfile}") \
done)
touch $(stampdir)/stamp-$(1)-ex-02-configure
$(stampdir)/stamp-$(1)-ex-03-make: $(stampdir)/stamp-$(1)-ex-02-configure
($(call SETVARS_EX,$(1)); \
cd "$$$${pkgbdir}"; \
test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
$(MAKE) $(AM_MAKEFLAGS) $(GPG4WIN_PARALLEL) $$$${pkgmkargs} \
)
touch $(stampdir)/stamp-$(1)-ex-03-make
# Note that post_install must come last because it may be empty and
# "; ;" is a syntax error.
$(stampdir)/stamp-$(1)-ex-04-install: $(stampdir)/stamp-$(1)-ex-03-make
($(call SETVARS_EX,$(1)); \
cd "$$$${pkgbdir}"; \
$(MAKE) $(AM_MAKEFLAGS) $$$${pkgmkargs_inst} install; \
$(call STRIP_EX_macro,"$$$${pkgidir}"); \
rm -f "$$$${pkgidir}/share/info/dir"; \
$(call gpg4win_pkg_$(call FROB_macro,$(1))_ex_post_install))
touch $(stampdir)/stamp-$(1)-ex-04-install
$(stampdir)/stamp-$(1)-ex-05-stow: $(stampdir)/stamp-$(1)-ex-04-install
($(call SETVARS_EX,$(1)); \
cd $(ex_ipdir); \
$(STOW) -t `readlink -f $(ex_idir)` "$$$${pkg_version}")
touch $(stampdir)/stamp-$(1)-ex-05-stow
$(stampdir)/stamp-final-ex-$(1): $(stampdir)/stamp-$(1)-ex-05-stow
touch $(stampdir)/stamp-final-ex-$(1)
$(1)-ex: $(stampdir)/stamp-final-ex-$(1)
.PHONY : clean-ex-$(1)
clean-ex-$(1):
($(call SETVARS_EX,$(1)); \
(cd $(ex_ipdir) && \
($(STOW) -D "$$$${pkg_version}" || true; \
rm -fR "$$$${pkg_version}")); \
rm -fR "$$$${pkgsdir}" "$$$${pkgbdir}")
rm -f $(stampdir)/stamp-final-ex-$(1) $(stampdir)/stamp-$(1)-ex-*
endef
define EXPKG_template
$(if $(filter-out no, $(call GETVAR,gpg4win_pkg_$(1))),
$(call EXPKG_template_,$1))
endef
# Template for source packages.
define SPKG_template_
pkg_files += $(call GETVAR,gpg4win_pkg_$(1))
$(stampdir)/stamp-$(1)-00-unpack: \
$(stampdir)/stamp-directories $(call GETDEPS,$(1))
(cd $(bdir); \
$(call SETVARS,$(1)); \
$(call DEFLATE_macro,$$$${pkg}))
touch $(stampdir)/stamp-$(1)-00-unpack
$(stampdir)/stamp-$(1)-01-patch: $(stampdir)/stamp-$(1)-00-unpack
(shopt -s nullglob; \
$(call SETVARS,$(1)); \
if [ ! -L "$$$${pkgsdir}" ]; then \
for pfile in "$$$${pkgpatbdir}"/*.patch \
"$$$${pkgpatdir}"/*.patch; do \
echo "applying $$$${pkgsdir}/$$$${pfile}"; \
(cd "$$$${pkgsdir}"; /bin/sh "$$$${pfile}";) \
done \
else \
echo "Not patching symlinked $(1)"; \
fi)
touch $(stampdir)/stamp-$(1)-01-patch
$(stampdir)/stamp-$(1)-02-configure: $(stampdir)/stamp-$(1)-01-patch
($(call SETVARS,$(1)); \
mkdir -p "$$$${pkgbdir}"; \
cd "$$$${pkgbdir}"; \
eval "../$$$${pkg_version}/configure" \
--prefix="$$$${pkgidir}" \
--host=$(host) \
--build=$(build) \
$$$${pkgcfg} CFLAGS=\"-fcommon $$$${pkgextracflags}\" \
|| exit 1; \
shopt -s nullglob; \
for pfile in "$$$${pkgpatbdir}"/*.postcfg \
"$$$${pkgpatdir}"/*.postcfg ; do \
(cd "$$$${pkgsdir}"; "$$$${pfile}") \
done; \
for pfile in "$$$${pkgpatbdir}"/*.postcfg-build \
"$$$${pkgpatdir}"/*.postcfg-build ; do \
(cd "$$$${pkgbdir}"; "$$$${pfile}") \
done)
touch $(stampdir)/stamp-$(1)-02-configure
$(stampdir)/stamp-$(1)-03-make: $(stampdir)/stamp-$(1)-02-configure
($(call SETVARS,$(1)); \
cd "$$$${pkgbdir}"; \
test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
$(MAKE) $(AM_MAKEFLAGS) $(GPG4WIN_PARALLEL) $$$${pkgmkargs})
touch $(stampdir)/stamp-$(1)-03-make
# Note that post_install must come last because it may be empty and
# "; ;" is a syntax error.
$(stampdir)/stamp-$(1)-04-install: $(stampdir)/stamp-$(1)-03-make
($(call SETVARS,$(1)); \
cd "$$$${pkgbdir}"; \
cd "$$$${pkgmkdir_inst}"; \
$(MAKE) $(AM_MAKEFLAGS) $$$${pkgmkargs_inst} install; \
$(call STRIP_macro,"$$$${pkgidir}"); \
rm -f "$$$${pkgidir}/share/info/dir"; \
$(call gpg4win_pkg_$(call FROB_macro,$(1))_post_install))
touch $(stampdir)/stamp-$(1)-04-install
$(stampdir)/stamp-$(1)-05-stow: $(stampdir)/stamp-$(1)-04-install
($(call SETVARS,$(1)); \
cd $(ipdir); \
$(STOW) "$$$${pkg_version}")
touch $(stampdir)/stamp-$(1)-05-stow
$(stampdir)/stamp-final-$(1): $(stampdir)/stamp-$(1)-05-stow
touch $(stampdir)/stamp-final-$(1)
$(1): $(stampdir)/stamp-final-$(1)
.PHONY : clean-$(1)
clean-$(1):
($(call SETVARS,$(1)); \
(cd $(ipdir) && \
($(STOW) -D "$$$${pkg_version}" || true; \
rm -fR "$$$${pkg_version}")); \
rm -fR "$$$${pkgsdir}" "$$$${pkgbdir}")
rm -f $(stampdir)/stamp-final-$(1) $(stampdir)/stamp-$(1)-0*
endef
define SPKG_template
$(if $(filter-out no, $(call GETVAR,gpg4win_pkg_$(1))),
$(call SPKG_template_,$1))
endef
# Template for source packages using only make and no build
# directory.
define MPKG_template_
pkg_files += $(call GETVAR,gpg4win_pkg_$(1))
$(stampdir)/stamp-$(1)-00-unpack: $(stampdir)/stamp-directories $(call GETDEPS,$(1))
(cd $(bdir); \
$(call SETVARS,$(1)); \
$(call DEFLATE_macro,$$$${pkg}))
touch $(stampdir)/stamp-$(1)-00-unpack
$(stampdir)/stamp-$(1)-01-patch: $(stampdir)/stamp-$(1)-00-unpack
(shopt -s nullglob; \
$(call SETVARS,$(1)); \
if [ ! -L "$$$${pkgsdir}" ]; then \
for pfile in "$$$${pkgpatbdir}"/*.patch \
"$$$${pkgpatdir}"/*.patch ; do \
echo "applying $$$${pkgsdir}/$$$${pfile}"; \
(cd "$$$${pkgsdir}"; /bin/sh "$$$${pfile}") \
done \
else \
echo "Not patching symlinked $(1)"; \
fi)
touch $(stampdir)/stamp-$(1)-01-patch
$(stampdir)/stamp-$(1)-03-make: $(stampdir)/stamp-$(1)-01-patch
($(call SETVARS,$(1)); \
cd "$$$${pkgsdir}"; \
test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
$(MAKE) $(AM_MAKEFLAGS) $$$${pkgmkargs})
touch $(stampdir)/stamp-$(1)-03-make
$(stampdir)/stamp-$(1)-04-install: $(stampdir)/stamp-$(1)-03-make
($(call SETVARS,$(1)); \
cd "$$$${pkgsdir}"; \
$(MAKE) $(AM_MAKEFLAGS) $$$${pkgmkargs_inst} install; \
$(call STRIP_macro,"$$$${pkgidir}"); \
$(call gpg4win_pkg_$(call FROB_macro,$(1))_post_install))
touch $(stampdir)/stamp-$(1)-04-install
$(stampdir)/stamp-$(1)-05-stow: $(stampdir)/stamp-$(1)-04-install
($(call SETVARS,$(1)); \
cd $(ipdir); \
$(STOW) "$$$${pkg_version}")
touch $(stampdir)/stamp-$(1)-05-stow
$(stampdir)/stamp-final-$(1): $(stampdir)/stamp-$(1)-05-stow
touch $(stampdir)/stamp-final-$(1)
$(1): $(stampdir)/stamp-final-$(1)
.PHONY : clean-$(1)
clean-$(1):
($(call SETVARS,$(1)); \
(cd $(ipdir) && \
($(STOW) -D "$$$${pkg_version}" || true; \
rm -fR "$$$${pkg_version}")); \
rm -fR "$$$${pkgsdir}")
rm -f $(stampdir)/stamp-final-$(1) $(stampdir)/stamp-$(1)-0*
endef
define MPKG_template
$(if $(filter-out no, $(call GETVAR,gpg4win_pkg_$(1))),
$(call MPKG_template_,$1))
endef
# Template for binary packages.
define BPKG_template_
pkg_files += $(call GETVAR,gpg4win_pkg_$(1))
pkg_files += $(call GETVAR,gpg4win_pkg_$(1)_dev)
$(stampdir)/stamp-$(1)-00-install: \
$(stampdir)/stamp-directories $(call GETDEPS,$(1))
($(call SETVARS,$(1)); \
test -d "$$$${pkgidir}" || $(MKDIR) "$$$${pkgidir}";\
cd $$$${pkgidir}; \
$(call DEFLATE_macro,$$$${pkg}))
touch $(stampdir)/stamp-$(1)-00-install
# Note that post_install must come last because it may be empty and
# "; ;" is a syntax error.
$(stampdir)/stamp-$(1)-01-install-dev: $(stampdir)/stamp-$(1)-00-install
($(call SETVARS,$(1)); \
test -d "$$$${pkgidir_dev}" || $(MKDIR) "$$$${pkgidir_dev}";\
(cd $$$${pkgidir_dev}; \
$(call DEFLATE_macro,$$$${pkg_dev})); \
$(call gpg4win_pkg_$(call FROB_macro,$(1))_post_install))
touch $(stampdir)/stamp-$(1)-01-install-dev
$(stampdir)/stamp-$(1)-02-stow: $(stampdir)/stamp-$(1)-01-install-dev
($(call SETVARS,$(1)); \
cd $(ipdir); \
$(STOW) "$$$${pkg_version}")
touch $(stampdir)/stamp-$(1)-02-stow
$(stampdir)/stamp-$(1)-03-stow-dev: $(stampdir)/stamp-$(1)-02-stow
($(call SETVARS,$(1)); \
cd $(ipdir); \
$(STOW) "$$$${pkg_version_dev}")
touch $(stampdir)/stamp-$(1)-03-stow-dev
$(stampdir)/stamp-final-$(1): $(stampdir)/stamp-$(1)-03-stow-dev
touch $(stampdir)/stamp-final-$(1)
$(1): $(stampdir)/stamp-final-$(1)
.PHONY : clean-$(1)
clean-$(1):
($(call SETVARS,$(1)); \
cd $(ipdir) && \
($(STOW) -D "$$$${pkg_version}" || true; \
$(STOW) -D "$$$${pkg_version_dev}" || true; \
rm -fR "$$$${pkg_version}" "$$$${pkg_version_dev}"))
rm -f $(stampdir)/stamp-final-$(1) $(stampdir)/stamp-$(1)-0*
endef
# (end BPKG_template_)
define BPKG_template
$(if $(filter-out no, $(call GETVAR,gpg4win_pkg_$(1))),
$(call BPKG_template_,$1))
endef
# Template for Qt packages.
define QTPKG_template_
pkg_files += $(call GETVAR,gpg4win_pkg_$(1))
$(stampdir)/stamp-$(1)-00-unpack: $(stampdir)/stamp-directories $(call GETDEPS,$(1))
(cd $(bdir); \
$(call SETVARS,$(1)); \
$(call DEFLATE_macro,$$$${pkg}))
touch $(stampdir)/stamp-$(1)-00-unpack
$(stampdir)/stamp-$(1)-01-patch: $(stampdir)/stamp-$(1)-00-unpack
(shopt -s nullglob; \
$(call SETVARS,$(1)); \
if [ ! -L "$$$${pkgsdir}" ]; then \
for pfile in "$$$${pkgpatbdir}"/*.patch \
"$$$${pkgpatdir}"/*.patch ; do \
echo "applying $$$${pkgsdir}/$$$${pfile}"; \
(cd "$$$${pkgsdir}"; /bin/sh "$$$${pfile}") \
done \
else \
echo "Not patching symlinked $(1)"; \
fi)
touch $(stampdir)/stamp-$(1)-01-patch
$(stampdir)/stamp-$(1)-02-configure: $(stampdir)/stamp-$(1)-01-patch
($(call SETVARS,$(1)); \
mkdir -p "$$$${pkgbdir}"; \
cd "$$$${pkgbdir}"; \
$$$${pkgcfg}) && \
touch $(stampdir)/stamp-$(1)-02-configure
$(stampdir)/stamp-$(1)-03-make: $(stampdir)/stamp-$(1)-02-configure
($(call SETVARS,$(1)); \
cd "$$$${pkgbdir}"; \
test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
$(MAKE) $(AM_MAKEFLAGS) $(GPG4WIN_PARALLEL) $$$${pkgmkargs})
touch $(stampdir)/stamp-$(1)-03-make
# Note that post_install must come last because it may be empty and
# "; ;" is a syntax error.
$(stampdir)/stamp-$(1)-04-install: $(stampdir)/stamp-$(1)-03-make
($(call SETVARS,$(1)); \
$(call gpg4win_pkg_$(call FROB_macro,$(1))_post_install))
touch $(stampdir)/stamp-$(1)-04-install
$(stampdir)/stamp-$(1)-05-stow: $(stampdir)/stamp-$(1)-04-install
($(call SETVARS,$(1)); \
cd $(ipdir); \
$(STOW) "$$$${pkg_version}")
touch $(stampdir)/stamp-$(1)-05-stow
$(stampdir)/stamp-final-$(1): $(stampdir)/stamp-$(1)-05-stow
touch $(stampdir)/stamp-final-$(1)
$(1): $(stampdir)/stamp-final-$(1)
.PHONY : clean-$(1)
clean-$(1):
($(call SETVARS,$(1)); \
(cd $(ipdir) && \
($(STOW) -D "$$$${pkg_version}" || true; \
rm -fR "$$$${pkg_version}")); \
rm -fR "$$$${pkgsdir}" "$$$${pkgbdir}")
rm -f $(stampdir)/stamp-final-$(1) $(stampdir)/stamp-$(1)-0*
endef
# (end QTPKG_template_)
define QTPKG_template
$(if $(filter-out no, $(call GETVAR,gpg4win_pkg_$(1))),
$(call QTPKG_template_,$1))
endef
define HOWTO_template
HOWTO-$(1).$(2).txt : $(tsdir)/doc/HOWTO-$(1).$(2).txt
sed -e '/^;.*/d' \
-e 's,!VERSION!,$(VERSION),g' \
-e 's,!BUILD_ISODATE!,$(BUILD_ISODATE),g' \
< $(tsdir)/doc/HOWTO-$(1).$(2).txt \
| awk '{printf "%s\r\n", $$$$0}' > HOWTO-$(1).$(2).txt
endef
# Template for source packages of KDE software
define KDEPKG_template_
pkg_files += $(call GETVAR,gpg4win_pkg_$(1))
$(stampdir)/stamp-$(1)-00-unpack: $(stampdir)/stamp-directories $(call GETDEPS,$(1))
(cd $(bdir); \
$(call SETVARS,$(1)); \
$(call DEFLATE_macro,$$$${pkg}))
touch $(stampdir)/stamp-$(1)-00-unpack
$(stampdir)/stamp-$(1)-01-patch: $(stampdir)/stamp-$(1)-00-unpack
(shopt -s nullglob; \
$(call SETVARS,$(1)); \
if [ ! -L "$$$${pkgsdir}" ]; then \
cd "$$$${pkgsdir}"; \
if [ -e "CMakeLists.txt" ]; then \
sed -i 's/set(KF_MIN_VERSION.*)/set(KF_MIN_VERSION "6.3.0")/' CMakeLists.txt; \
sed -i 's/find_package(ECM .* NO_MODULE)/find_package(ECM 6.3.0 NO_MODULE)/' CMakeLists.txt; \
sed -i 's/set(KF_DEP_VERSION.*)/set(KF_DEP_VERSION "6.3.0")/' CMakeLists.txt; \
sed -i 's/set(KMIME_VERSION.*)/set(KMIME_VERSION "6.1.0")/' CMakeLists.txt; \
sed -i 's/set(KPIM_MIME_VERSION.*)/set(KPIM_MIME_VERSION "6.1.0")/' CMakeLists.txt; \
sed -i 's/set(KPIM_MBOX_VERSION.*)/set(KPIM_MBOX_VERSION "6.1.0")/' CMakeLists.txt; \
sed -i 's/set(MIMETREEPARSER_VERSION.*)/set(MIMETREEPARSER_VERSION "6.1.0")/' CMakeLists.txt; \
fi; \
for pfile in "$$$${pkgpatbdir}"/*.patch \
"$$$${pkgpatdir}"/*.patch ; do \
echo "applying $$$${pkgsdir}/$$$${pfile}"; \
(cd "$$$${pkgsdir}"; /bin/sh "$$$${pfile}") \
done \
else \
echo "Not patching symlinked $(1)"; \
fi)
touch $(stampdir)/stamp-$(1)-01-patch
$(stampdir)/stamp-$(1)-02-configure: $(stampdir)/stamp-$(1)-01-patch
($(call SETVARS,$(1)); \
mkdir -p "$$$${pkgbdir}"; \
cd "$$$${pkgbdir}"; \
$(CMAKE) \
--fresh \
-DCMAKE_INSTALL_PREFIX="$$$${pkgidir}" \
-DCMAKE_PREFIX_PATH="$$$${pkgidir}" \
-DQT_MAJOR_VERSION="6" \
-DCMAKE_TOOLCHAIN_FILE=$(abs_top_builddir)/src/toolchain.cmake \
-DKDE_INSTALL_DATADIR="$$$${pkgidir}/share" \
-DBUILD_TESTING=False \
-DUSE_QML=off \
$(CMAKE_GENERATOR_FLAGS) \
$$$${pkgcfg} $$$${pkgextracflags} "../$$$${pkg_version}$$$${pkg_conf_subdir}") && \
touch $(stampdir)/stamp-$(1)-02-configure
$(stampdir)/stamp-$(1)-03-make: $(stampdir)/stamp-$(1)-02-configure
($(call SETVARS,$(1)); \
cd "$$$${pkgbdir}"; \
test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
$(MAKETOOL) $(AM_MAKEFLAGS) $(GPG4WIN_PARALLEL) $$$${pkgmkargs})
touch $(stampdir)/stamp-$(1)-03-make
# Note that post_install must come last because it may be empty and
# "; ;" is a syntax error.
$(stampdir)/stamp-$(1)-04-install: $(stampdir)/stamp-$(1)-03-make
($(call SETVARS,$(1)); \
cd "$$$${pkgbdir}"; \
cd "$$$${pkgmkdir_inst}"; \
$(MAKETOOL) $(AM_MAKEFLAGS) $$$${pkgmkargs_inst} install; \
$(call STRIP_macro,"$$$${pkgidir}"); \
$(call gpg4win_pkg_$(call FROB_macro,$(1))_post_install))
touch $(stampdir)/stamp-$(1)-04-install
$(stampdir)/stamp-$(1)-05-stow: $(stampdir)/stamp-$(1)-04-install
($(call SETVARS,$(1)); \
cd $(ipdir); \
$(STOW) "$$$${pkg_version}")
touch $(stampdir)/stamp-$(1)-05-stow
$(stampdir)/stamp-final-$(1): $(stampdir)/stamp-$(1)-05-stow
touch $(stampdir)/stamp-final-$(1)
$(1): $(stampdir)/stamp-final-$(1)
.PHONY : clean-$(1)
clean-$(1):
($(call SETVARS,$(1)); \
(cd $(ipdir) && \
($(STOW) -D "$$$${pkg_version}" || true; \
rm -fR "$$$${pkg_version}")); \
rm -fR "$$$${pkgsdir}" "$$$${pkgbdir}")
rm -f $(stampdir)/stamp-final-$(1) $(stampdir)/stamp-$(1)-0*
endef
# (end KDEPKG_template_)
define KDEPKG_template
$(if $(filter-out no, $(call GETVAR,gpg4win_pkg_$(1))),
$(call KDEPKG_template_,$1))
endef
# Template for source packages using CMake to build for an additional host
define EXCMKPKG_template_
pkg_files += $(call GETVAR,gpg4win_pkg_$(1))
$(stampdir)/stamp-$(1)-ex-00-unpack: \
$(stampdir)/stamp-$(1)-00-unpack \
$(call GETDEPS_EX,$(1))
touch $(stampdir)/stamp-$(1)-ex-00-unpack
$(stampdir)/stamp-$(1)-ex-01-patch: \
$(stampdir)/stamp-$(1)-ex-00-unpack \
$(stampdir)/stamp-$(1)-01-patch
touch $(stampdir)/stamp-$(1)-ex-01-patch
$(stampdir)/stamp-$(1)-ex-02-configure: $(stampdir)/stamp-$(1)-ex-01-patch
($(call SETVARS_EX,$(1)); \
mkdir -p "$$$${pkgbdir}"; \
cd "$$$${pkgbdir}"; \
$(CMAKE) \
--fresh \
-DCMAKE_INSTALL_PREFIX="$$$${pkgidir}" \
-DCMAKE_PREFIX_PATH="$$$${pkgidir}" \
-DQT_MAJOR_VERSION="6" \
-DCMAKE_TOOLCHAIN_FILE=$(abs_top_builddir)/src/toolchain-ex.cmake \
-DKDE_INSTALL_DATADIR="$$$${pkgidir}/share" \
-DBUILD_TESTING=OFF \
$(CMAKE_GENERATOR_FLAGS) \
$$$${pkgcfg} $$$${pkgextracflags} "../$$$${pkg_version}$$$${pkg_conf_subdir}") && \
touch $(stampdir)/stamp-$(1)-ex-02-configure
$(stampdir)/stamp-$(1)-ex-03-make: $(stampdir)/stamp-$(1)-ex-02-configure
($(call SETVARS_EX,$(1)); \
cd "$$$${pkgbdir}"; \
test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
$(MAKETOOL) $(AM_MAKEFLAGS) $(GPG4WIN_PARALLEL) $$$${pkgmkargs})
touch $(stampdir)/stamp-$(1)-ex-03-make
# Note that post_install must come last because it may be empty and
# "; ;" is a syntax error.
$(stampdir)/stamp-$(1)-ex-04-install: $(stampdir)/stamp-$(1)-ex-03-make
($(call SETVARS_EX,$(1)); \
cd "$$$${pkgbdir}"; \
cd "$$$${pkgmkdir_inst}"; \
$(MAKETOOL) $(AM_MAKEFLAGS) $$$${pkgmkargs_inst} install; \
$(call STRIP_EX_macro,"$$$${pkgidir}"); \
$(call gpg4win_pkg_$(call FROB_macro,$(1))_ex_post_install))
touch $(stampdir)/stamp-$(1)-ex-04-install
$(stampdir)/stamp-$(1)-ex-05-stow: $(stampdir)/stamp-$(1)-ex-04-install
($(call SETVARS_EX,$(1)); \
cd $(ex_ipdir); \
$(STOW) -t `readlink -f $(ex_idir)` "$$$${pkg_version}")
touch $(stampdir)/stamp-$(1)-ex-05-stow
$(stampdir)/stamp-final-ex-$(1): $(stampdir)/stamp-$(1)-ex-05-stow
touch $(stampdir)/stamp-final-ex-$(1)
$(1)-ex: $(stampdir)/stamp-final-ex-$(1)
.PHONY : clean-ex-$(1)
clean-ex-$(1):
($(call SETVARS_EX,$(1)); \
(cd $(ex_ipdir) && \
($(STOW) -D "$$$${pkg_version}" || true; \
rm -fR "$$$${pkg_version}")); \
rm -fR "$$$${pkgsdir}" "$$$${pkgbdir}")
rm -f $(stampdir)/stamp-final-ex-$(1) $(stampdir)/stamp-$(1)-ex-*
endef
# (end EXCMKPKG_template_)
define EXCMKPKG_template
$(if $(filter-out no, $(call GETVAR,gpg4win_pkg_$(1))),
$(call EXCMKPKG_template_,$1))
endef
# Template for tools which should be compiled natively on
# the build system
define NATIVEPKG_template
$(stampdir)/stamp-$(1)-native-00-unpack: $(stampdir)/stamp-directories $(call GETDEPS_NATIVE,$(1))
(cd $(bdir); \
$(call SETVARS_NATIVE,$(1)); \
$(call DEFLATE_macro,$$$${pkg}))
touch $(stampdir)/stamp-$(1)-native-00-unpack
$(stampdir)/stamp-$(1)-native-01-patch: $(stampdir)/stamp-$(1)-native-00-unpack
(shopt -s nullglob; \
$(call SETVARS_NATIVE,$(1)); \
if [ ! -L "$$$${pkgsdir}" ]; then \
cd "$$$${pkgsdir}"; \
for pfile in "$$$${pkgpatbdir}"/*-native.patch \
"$$$${pkgpatdir}"/*-native.patch ; do \
(cd "$$$${pkgsdir}"; /bin/sh "$$$${pfile}") \
done \
else \
echo "Not patching symlinked $(1)"; \
fi)
touch $(stampdir)/stamp-$(1)-native-01-patch
$(stampdir)/stamp-$(1)-native-02-configure: $(stampdir)/stamp-$(1)-native-01-patch
($(call SETVARS_NATIVE,$(1)); \
mkdir -p "$$$${pkgbdir}"; \
cd "$$$${pkgbdir}"; \
$(CMAKE) \
--fresh \
-DCMAKE_INSTALL_PREFIX="$$$${pkgidir}" \
-DCMAKE_PREFIX_PATH="$(nat_idir)" \
-DCMAKE_TOOLCHAIN_FILE=$(abs_top_builddir)/src/toolchain-native.cmake \
-DQT_MAJOR_VERSION="6" \
-DKDE_INSTALL_DATADIR="$$$${pkgidir}/share" \
-DBUILD_TESTING=False \
-DUSE_QML=off \
$(CMAKE_GENERATOR_FLAGS) \
$$$${pkgcfg} $$$${pkgextracflags} "../$$$${pkg_version}$$$${pkg_conf_subdir}") && \
touch $(stampdir)/stamp-$(1)-native-02-configure
$(stampdir)/stamp-$(1)-native-03-make: $(stampdir)/stamp-$(1)-native-02-configure
($(call SETVARS_NATIVE,$(1)); \
cd "$$$${pkgbdir}"; \
test -n "$$$${pkgmkdir}" && cd "$$$${pkgmkdir}"; \
$(MAKETOOL) $(AM_MAKEFLAGS) $(GPG4WIN_PARALLEL) $$$${pkgmkargs})
touch $(stampdir)/stamp-$(1)-native-03-make
# Note that post_install must come last because it may be empty and
# "; ;" is a syntax error.
$(stampdir)/stamp-$(1)-native-04-install: $(stampdir)/stamp-$(1)-native-03-make
($(call SETVARS_NATIVE,$(1)); \
cd "$$$${pkgbdir}"; \
cd "$$$${pkgmkdir_inst}"; \
$(MAKETOOL) $(AM_MAKEFLAGS) $$$${pkgmkargs_inst} install; \
test -d "$$$${pkgidir}" && $(call STRIP_macro,"$$$${pkgidir}"); \
$(call gpg4win_pkg_$(call FROB_macro,$(1))_native_post_install))
touch $(stampdir)/stamp-$(1)-native-04-install
$(stampdir)/stamp-$(1)-native-05-stow: $(stampdir)/stamp-$(1)-native-04-install
($(call SETVARS_NATIVE,$(1)); \
cd $(nat_ipdir); \
$(STOW) "$$$${pkg_version}")
touch $(stampdir)/stamp-$(1)-native-05-stow
$(stampdir)/stamp-final-native-$(1): $(stampdir)/stamp-$(1)-native-05-stow
touch $(stampdir)/stamp-final-native-$(1)
$(1)-native: $(stampdir)/stamp-final-native-$(1)
.PHONY : clean-$(1)-native
clean-$(1)-native:
($(call SETVARS_NATIVE,$(1)); \
(cd $(nat_ipdir) && \
($(STOW) -D "$$$${pkg_version}" || true; \
rm -fR "$$$${pkg_version}")); \
rm -fR "$$$${pkgsdir}" "$$$${pkgbdir}")
rm -f $(stampdir)/stamp-final-native-$(1) $(stampdir)/stamp-$(1)-native-*
endef
#
# End Template definitions
#
# Sign the file $1 and save the result as $2
define AUTHENTICODE_sign
$(RUNCMD) gpg-authcode-sign "$(1)" "$(2)"
endef
# Generic MSI targets (same for each flavor)
$(MSI_FNAME_PREFIX)-$(VERSION).wxs: $(common_nsi) $(stampdir)/stamp-final \
$(foosum_exe) gpgwrap.exe \
$(sdir)/make-msi.pl \
$(addsuffix /VERSION.sig,$(addprefix $(msidir)/,$(msi_targets)))
cp $(sdir)/make-msi.guids make-msi.guids
perl $(sdir)/make-msi.pl --guids make-msi.guids \
--manifest gpg4win-$(VERSION).files \
--version $(VSD_VERSION) \
--name "$(MSI_PRODUCT_NAME)" \
--win64 -DTOP_SRCDIR=$(tsdir) -DTOP_BLDDIR=$(root) \
-DSRCDIR=$(tsdir)/src -DBLDDIR=$(root) -DVSDDIR=$(vsddir) \
$(sdir)/nsis/gpg4win.nsi > $(MSI_FNAME_PREFIX)-$(VERSION).wxs
$(idir)/$(MSI_FNAME_PREFIX)-$(VERSION).wixlib: \
$(stampdir)/stamp-final \
$(foosum_exe) \
license.blurb \
WixUI_Gpg4win.wxs \
$(MSI_FNAME_PREFIX)-$(VERSION).wxs \
$(stampdir)/stamp-additional-signedfiles
echo "Gpg4win" > $(root)/VERSION; \
echo "$(VERSION)" >> $(root)/VERSION; \
$(RUNCMD) litcandle std \
$(VERSION) $(MSI_FNAME_PREFIX) $(idir) $(ex_idir)
# Custom targets for each msi_target flavor.
# Processed via eval as most other templates.
define MSI_template
$(1)-package: installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi
# Copy the reqquired files to the Windows Host, run light.exe on that host
# and copy the result into the installers directory.
installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi: \
$(stampdir)/stamp-msi-base $(idir)/$(1).wixlib \
$(vsddir)/$(1)/license.rtf $(idir)/$(MSI_FNAME_PREFIX)-$(VERSION).wixlib
$(RUNCMD) cptowinhost $(VERSION) $(vsddir)/$(1)/license.rtf \
$(idir)/$(1)-$(VERSION).wixlib \
$(vsddir)/../$(call GETVAR,msi_target_$(1)_branding)/*.bmp \
$(idir)/$(MSI_FNAME_PREFIX)-$(VERSION).wixlib
$(RUNCMD) lightwinhost $(VERSION) $(MSI_FNAME_PREFIX) $(1) \
$(subst $(space),%20,$(call GETVAR,msi_target_$(1)_l10n)) \
$(gpg4win_pkg_gnupg_msi_version)
$(RUNCMD) cpfromwinhost $(VERSION) $(MSI_FNAME_PREFIX) $(1) \
$(VSD_VERSION_FILE)
# Running light.exe in WINE triggers the error:
# 12627.235:0024:err:msidb:msi_commit_streams failed to write stream
# L"\430b\4131\4735\443e\4336\41ac\47a8\43e7\482f" (hr = 0x80030102)
#
# Below code does not work with wine 9.14 and wixtools 3.11 / 3.14
# See T7248 for details. The default MSI targets still require a
# WINHOST this is only optional to assist in debugging.
$(1)-wine: installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1)-wine.msi
installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1)-wine.msi: $(stampdir)/stamp-msi-base $(idir)/$(1).wixlib \
$(vsddir)/$(1)/license.rtf $(idir)/$(MSI_FNAME_PREFIX)-$(VERSION).wixlib
(
( set -x; set -e;\
workdir="$(idir)/$(1)-msi" || exit 1; \
mkdir -p $$$$workdir || exit 1; \
cp $(tsdir)/packages/gnupg-msi-$(gpg4win_pkg_gnupg_msi_version)-bin.wixlib \
$$$$workdir || exit 1; \
cp $(tsdir)/src/icons/shield.ico $$$$workdir || exit 1; \
cp $(tsdir)/doc/logo/gpg4win-msi-header_install-493x58.bmp \
$$$$workdir/header.bmp || exit 1; \
cp $(tsdir)/doc/logo/gpg4win-msi-wizard_install-493x312.bmp \
$$$$workdir/dialog.bmp || exit 1; \
cp $(tsdir)/doc/logo/gpg4win-msi-wizard_install-493x312.bmp \
$$$$workdir/dialog.bmp || exit 1; \
cp $(tsdir)/doc/logo/gpg4win-msi-wizard_install-info-32x32.bmp \
$$$$workdir/info.bmp || exit 1; \
cp $(tsdir)/doc/logo/gpg4win-msi-wizard_install-exclamation-32x32.bmp \
$$$$workdir/exclamation.bmp || exit 1; \
cp $(tsdir)/po/gpg4win-en.wxl $$$$workdir || exit 1; \
cp $(tsdir)/po/gpg4win-de.wxl $$$$workdir || exit 1; \
cp $(call GETVAR,msi_target_$(1)_branding)/*.bmp . || exit 1;\
cp WixUI_Gpg4win.wxs $$$$workdir || exit 1; \
ln -sf $$$$workdir $$$$WINEINST || exit 1; \
cd $$$$workdir || exit 1; \
ln -sf $(idir)/$(1).wixlib || exit 1; \
ln -sf $(vsddir)/$(1)/license.rtf || exit 1;\
ln -sf $(idir)/$(MSI_FNAME_PREFIX)-$(VERSION).wixlib || exit 1; \
LC_ALL=C WINEDEBUG=+timestamp,+loaddll,+debugstr,msi+all $(WINE) $$$$WIXPREFIX2/light.exe \
-cc . \
-ct 1 \
-reusecab \
-spdb \
-ext WixUIExtension \
-ext WixUtilExtension \
-out k:\\$(MSI_FNAME_PREFIX)-$(VERSION)-$(1).msi\
$(call GETVAR,msi_target_$(1)_l10n) \
-dcl:none\
-pedantic \
\
k:\\$(MSI_FNAME_PREFIX)-$(VERSION).wixlib \
k:\\gnupg-msi-$(gpg4win_pkg_gnupg_msi_version)-bin.wixlib \
k:\\$(1).wixlib | grep -v "ICE80" | grep -v "ICE57" || exit 1; \
cd $(abs_top_builddir)/src/installers || exit 1; \
ln -sf $$$$workdir/$(MSI_FNAME_PREFIX)-$(VERSION)-$(1).msi || exit 1; \
) || ERR=1; rm -f $$$$WINEINST; \
if [ -n "$$$$ERR" ]; then \
exit 1; \
fi \
)
$(idir)/$(1).wixlib: $(msidir)/$(1)/$(1).wxs
$(RUNCMD) litcandle ui $(VERSION) $(1) $(idir) $(ex_idir)
# This is generated by make-msi.pl
$(msidir)/$(1)/$(1).wxs: $(msidir)/$(1)/VERSION.sig \
$(sdir)/make-msi.pl \
$(MSI_FNAME_PREFIX)-$(VERSION).wxs
cp $(sdir)/make-msi.guids make-msi.guids
perl $(sdir)/make-msi.pl --guids make-msi.guids \
--manifest gpg4win-$(VERSION).files \
--version $(VSD_VERSION) \
--name "$(MSI_PRODUCT_NAME)" \
--win64 -DTOP_SRCDIR=$(tsdir) -DTOP_BLDDIR=$(root) \
-DSRCDIR=$(tsdir)/src -DBLDDIR=$(root) -DVSDDIR=$(vsddir) \
$(sdir)/nsis/gpg4win.nsi > /dev/null
$(msidir)/$(1)/VERSION.sig: $(msidir)/$(1)/VERSION
echo "----------SIGNING----------"
echo "using key: $(VERSION_SIGNKEY)"
cat $(msidir)/$(1)/VERSION
$(RUNCMD) gpg --yes -o $(msidir)/$(1)/VERSION.sig -bau $(VERSION_SIGNKEY) $(msidir)/$(1)/VERSION
$(msidir)/$(1)/VERSION: $(vsddir)/custom.mk $(stampdir)/stamp-betanum
[ -d $(msidir)/$(1) ] || mkdir -p $(msidir)/$(1)
echo "[Kleopatra]" > $(msidir)/$(1)/VERSION
if [ "$(call GETVAR,msi_target_$(1)_VERSION)" = "VS-Desktop-$(VSD_VERSION)" ]; then \
echo "version=VS-Desktop-$(VSD_VERSION_FILE)" >> $(msidir)/$(1)/VERSION; \
else \
echo "version=$(call GETVAR,msi_target_$(1)_VERSION)" >> $(msidir)/$(1)/VERSION;\
fi
echo "shortDescription=$(call GETVAR,msi_target_$(1)_DESC)" >> $(msidir)/$(1)/VERSION
echo "otherText=$(call GETVAR,msi_target_$(1)_DESC_SHORT)" >> $(msidir)/$(1)/VERSION
echo "bugAddress=$(VSD_BUG_REPORT)" >> $(msidir)/$(1)/VERSION
echo "homepage=$(VSD_HOMEPAGE)" >> $(msidir)/$(1)/VERSION
echo "copyrightStatement=<pre><pre/>" >> $(msidir)/$(1)/VERSION
if [ -n "$(call GETVAR,msi_target_$(1)_statusline)" ]; then \
echo "statusline=$(call GETVAR,msi_target_$(1)_statusline)" >> $(msidir)/$(1)/VERSION; \
fi
if [ -n "$(call GETVAR,msi_target_$(1)_uidcomment)" ]; then \
echo "uidcomment=$(call GETVAR,msi_target_$(1)_uidcomment)" >> $(msidir)/$(1)/VERSION; \
fi
echo "" >> $(msidir)/$(1)/VERSION
echo "[Okular]" >> $(msidir)/$(1)/VERSION
if [ "$(call GETVAR,msi_target_$(1)_VERSION)" = "VS-Desktop-$(VSD_VERSION)" ]; then \
echo "version=VS-Desktop-$(VSD_VERSION_FILE)" >> $(msidir)/$(1)/VERSION; \
else \
echo "version=$(call GETVAR,msi_target_$(1)_VERSION)" >> $(msidir)/$(1)/VERSION;\
fi
echo "shortDescription=$(call GETVAR,msi_target_$(1)_DESC)" >> $(msidir)/$(1)/VERSION
echo "otherText=$(call GETVAR,msi_target_$(1)_DESC_SHORT)" >> $(msidir)/$(1)/VERSION
echo "bugAddress=$(VSD_BUG_REPORT)" >> $(msidir)/$(1)/VERSION
echo "homepage=$(VSD_HOMEPAGE)" >> $(msidir)/$(1)/VERSION
echo "displayName=$(OKULAR_DISPLAY_NAME)" >> $(msidir)/$(1)/VERSION
echo "" >> $(msidir)/$(1)/VERSION
echo "[Build]" >> $(msidir)/$(1)/VERSION
echo "cidInstaller=$(BUILD_COMMITID)" >> $(msidir)/$(1)/VERSION
echo "cidConfig=$$$$(cd $(vsddir) && git rev-parse --verify HEAD)" >> $(msidir)/$(1)/VERSION
$(msidir)/$(1)/announcement.txt: $(vsddir)/custom.mk $(vsddir)/announcement.de.in $(vsddir)/announcement.en.in
cat $(vsddir)/$(call GETVAR,msi_target_$(1)_announcement) | \
sed 's/VSD_VERSION/$(VSD_VERSION)/' | \
sed 's@GNUPG_VSD_CUSTOMER_LINK@https://download.gnupg.com/files/$(call GETVAR,msi_target_$(1)_directory)/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi@' | \
sed 's@GNUPG_VSD_SOURCE_LINK@https://download.gnupg.com/files/src/Gnupg-VS-Desktop-$(VSD_VERSION).tar.xz@' > $(msidir)/$(1)/announcement.txt
signed_installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi: installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi
mkdir -p signed_installers
$$(tsdir)/build-aux/authenticode-sign.sh --stamp \
--desc="$(MSI_PRODUCT_NAME)" \
"installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi" \
"signed_installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi"
$(stampdir)/stamp-$(1)-upload: signed_installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi \
$(stampdir)/stamp-dist-self
@(set -e; cd signed_installers; \
sha256sum $(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi > \
$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi.sha256; \
if [ -f "$(vsddir)/$(1)/customer-enc-key.asc" ]; then \
echo "Encrypting installer"; \
k="-f $(vsddir)/$(1)/customer-enc-key.asc" ; \
for i in 2 3 4 5 6 7 8 9; do \
if [ -f "$(vsddir)/$(1)/customer-enc-key$$$${i}.asc" ]; then \
k="$$$${k} -f $(vsddir)/$(1)/customer-enc-key$$$${i}.asc";\
fi; \
done; \
gpg --no-options --batch --yes -seu $(msi_signkey) \
$$$${k} \
-f "$(vsddir)/general-enc-key.asc" \
-o $(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi.gpg \
$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi;\
sha256sum $(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi.gpg > \
$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi.gpg.sha256; \
scp $(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi.gpg \
$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi.gpg.sha256 \
$(VSD_PUBLISH_HOST)/$(call GETVAR,msi_target_$(1)_directory); \
echo "https://download.gnupg.com/files/$(call GETVAR,msi_target_$(1)_directory)/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi.gpg" \
> $(stampdir)/stamp-$(1)-upload; \
else \
gpg --yes -o $(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi.sig -bu $(msi_signkey) \
$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi; \
scp $(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi \
$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi.sha256 \
$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi.sig \
$(VSD_PUBLISH_HOST)/$(call GETVAR,msi_target_$(1)_directory); \
ssh `echo $(VSD_PUBLISH_HOST) | cut -d ":" -f 1` \
echo "https://download.gnupg.com/files/$(call GETVAR,msi_target_$(1)_directory)/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi" \
> $(stampdir)/stamp-$(1)-upload; \
echo "https://download.gnupg.com/files/$(call GETVAR,msi_target_$(1)_directory)/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi.sig" \
>> $(stampdir)/stamp-$(1)-upload; \
fi)
.phony : $(1)
$(1): installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi
.PHONY : $(1)-upload
$(1)-upload: $(stampdir)/stamp-$(1)-upload $(stampdir)/stamp-dist-self
gpg --yes -o $(msidir)-$(VERSION).tar.xz.sig -bau $(msi_signkey) \
../gpg4win-$(VERSION).tar.xz
rsync -vP ../gpg4win-$(VERSION).tar.xz $(VSD_PUBLISH_HOST)/src/$(MSI_FNAME_PREFIX)-$(VERSION).tar.xz
rsync -vP $(msidir)-$(VERSION).tar.xz.sig $(VSD_PUBLISH_HOST)/src/$(MSI_FNAME_PREFIX)-$(VERSION).tar.xz.sig
echo "Upload URLs:"
cat $(stampdir)/stamp-$(1)-upload
echo "Source links:"
echo "https://download.gnupg.com/files/src/$(MSI_FNAME_PREFIX)-$(VERSION).tar.xz"
echo "https://download.gnupg.com/files/src/$(MSI_FNAME_PREFIX)-$(VERSION).tar.xz.sig"
$(1)-signed: signed_installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-$(1).msi
$(1)-announce: $(msidir)/$(1)/announcement.txt
set -x
echo "-------- Announcement for $(1) ---------"
cat $(msidir)/$(1)/announcement.txt
echo "-----------------------------"
echo "Send to: $(call GETVAR,msi_target_$(1)_contact)"
echo "Ticket: $(call GETVAR,msi_target_$(1)_ticket)"
echo "-----------------------------"
endef
# Insert the template for each build tool package.
$(foreach npkg, $(gpg4win_nativepkgs), $(eval $(call NATIVEPKG_template,$(npkg))))
# Insert the template for each source package.
$(foreach spkg, $(gpg4win_spkgs), $(eval $(call SPKG_template,$(spkg))))
# Insert the template for each gpgEx architecture package.
$(foreach expkg, $(gpg4win_expkgs), $(eval $(call EXPKG_template,$(expkg))))
# Insert the template for each make only source package.
$(foreach mpkg, $(gpg4win_mpkgs), $(eval $(call MPKG_template,$(mpkg))))
# Insert the template for each binary package.
$(foreach bpkg, $(gpg4win_bpkgs), $(eval $(call BPKG_template,$(bpkg))))
# Insert the template for each internal package.
$(foreach ipkg, $(gpg4win_ipkgs), $(eval $(call IPKG_template,$(ipkg))))
# Insert the template for KDE packages.
$(foreach kdepkg, $(gpg4win_kdepkgs), $(eval $(call KDEPKG_template,$(kdepkg))))
# Insert the template for each CMake package to build for the additional gpgEx architecture.
$(foreach excmkpkg, $(gpg4win_excmkpkgs), $(eval $(call EXCMKPKG_template,$(excmkpkg))))
# Insert the template for qt packages.
$(foreach qtpkg, $(gpg4win_qtpkgs), $(eval $(call QTPKG_template,$(qtpkg))))
$(foreach rll, $(gpg4win_howto_smime_ll), \
$(eval $(call HOWTO_template,SMIME,$(rll))))
$(stampdir)/stamp-binaries: $(addprefix $(stampdir)/stamp-final-,$(gpg4win_build_list)) \
$(addprefix $(stampdir)/stamp-final-ex-,$(gpg4win_build_ex_list))
touch $(stampdir)/stamp-binaries
$(stampdir)/stamp-final: $(stampdir)/stamp-directories $(stampdir)/stamp-additional-signedfiles
touch $(stampdir)/stamp-final
$(bdir)/versioninfo.txt: $(stampdir)/stamp-final
touch $(bdir)/versioninfo.txt
$(stampdir)/stamp-betanum: ../config.log
if [ ! -e "$(stampdir)/stamp-betanum" -o "$$(cat "$(stampdir)/stamp-betanum")" != "$(BUILD_BETANUM)" ]; then \
echo -n "$(BUILD_BETANUM)" > "$(stampdir)/stamp-betanum"; \
fi
all-gpg4win: $(stampdir)/stamp-final
# Just to check if we catched all stamps.
clean-stamps:
$(RM) -fR $(stampdir)
clean-gpg4win:
$(RM) -fR $(root) $(stampdir)
$(stampdir)/stamp-versions-all-signed: $(stampdir)/stamp-directories \
$(addsuffix /VERSION.sig, $(addprefix $(msidir)/,$(msi_targets)))
touch $(stampdir)/stamp-versions-all-signed
$(stampdir)/stamp-all-upload: $(stampdir)/stamp-dist-self \
$(addsuffix -upload, $(addprefix $(stampdir)/stamp-,$(msi_targets)))
echo "Upload URLs:"
cat $(addsuffix -upload, $(addprefix $(stampdir)/stamp-,$(msi_targets)))
gpg --yes -o gnupg-vsd-$(VERSION).tar.xz.sig -bau $(msi_signkey) \
../gpg4win-$(VERSION).tar.xz
rsync -vP ../gpg4win-$(VERSION).tar.xz $(VSD_PUBLISH_HOST)/src/$(MSI_FNAME_PREFIX)-$(VSD_VERSION).tar.xz
rsync -vP gnupg-vsd-$(VERSION).tar.xz.sig $(VSD_PUBLISH_HOST)/src/$(MSI_FNAME_PREFIX)-$(VSD_VERSION).tar.xz.sig
echo "Source links:"
echo "https://download.gnupg.com/files/src/$(MSI_FNAME_PREFIX)-$(VSD_VERSION).tar.xz"
echo "https://download.gnupg.com/files/src/$(MSI_FNAME_PREFIX)-$(VSD_VERSION).tar.xz.sig"
touch $(stampdir)/stamps-all-upload
.PHONY: msi
# Add here if you use new product names we need new subst targets
msi: $(stampdir)/stamp-versions-all-signed \
$(addsuffix .msi,$(addprefix installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-,$(msi_targets)))
if [ -z "$(addsuffix .msi,$(addprefix installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-,$(msi_targets)))" ]; then \
echo "No MSI targets configured."; \
else \
echo "######################"; \
echo "# MSI Packaging done #"; \
echo "######################"; \
fi
$(stampdir)/stamp-msi-all-signed: $(vsddir)/sign.mk \
$(addsuffix .msi,$(addprefix signed_installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-,$(msi_targets)))
touch $(stampdir)/stamp-msi-all-signed
msi-signed: $(stampdir)/stamp-msi-all-signed
msi-upload: $(stampdir)/stamp-all-upload $(stampdir)/stamp-dist-self
installers: \
$(addsuffix .msi,$(addprefix installers/$(MSI_FNAME_PREFIX)-$(VSD_VERSION_FILE)-,$(msi_targets)))
.PHONY : all-gpg4win clean-stamps clean-gpg4win msi msi-signed msi-upload
# Insert the template for msi packages.
$(foreach msipkg, $(msi_targets), $(eval $(call MSI_template,$(msipkg))))
# @emacs_local_vars_begin@
# @emacs_local_vars_read_only@
# @emacs_local_vars_end@

File Metadata

Mime Type
text/x-diff
Expires
Sat, Dec 6, 10:41 PM (7 h, 31 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c5/9d/432e14c21c2901305d78e93e8559

Event Timeline