diff --git a/Makefile.am b/Makefile.am
index 3278c872..d2ebd08e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,96 +1,107 @@
# Makefile.am - Installer for GnuPG 4 Windows Makefile.
# Copyright (C) 2005, 2008, 2012 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 .
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
DISTCHECK_CONFIGURE_FLAGS = --host=i686-w64-mingw32
-SUBDIRS = po packages doc src
+if BUILD_GPG4WIN
+po = po
+else
+po =
+endif
+if BUILD_GPG4WIN
+doc = doc
+else
+doc =
+endif
+
+SUBDIRS = ${po} packages ${doc} src
# find patches -type f | sort | sed 's/$/ \\/' | sed 's/^/ /'
EXTRA_DIST = autogen.sh README.GIT ONEWS \
doc/license-page doc/GPLv3 \
build-aux/git-log-footer build-aux/git-log-fix \
patches/boost/boost-1-fixes.patch \
patches/extra-cmake-modules/0001-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-Windows.patch \
patches/glib-2.41.5/01-socket.patch \
patches/glib-2.41.5/02-formatsec.patch \
patches/kconfigwidgets/0001-Make-QDbus-optional.patch \
patches/kiconthemes/0001-Make-DBus-optional.patch \
patches/kxmlgui/0001-make-qdbus-optional.patch \
patches/kxmlgui/0004-Cruedly-disable-KSendbugmail.patch \
patches/qtbase/0001-Fix-build-without-std-thread.patch \
patches/qtbase/0002-Gpg4win-theme-names-and-relpaths.patch \
patches/qtbase/0001-Gpg4win-qstandardpaths-patch.patch \
patches/qttools/disable-most-tools.patch \
patches/w32pth-2.0.5/workaround-broken-libtool.patch \
patches/breeze-icons/0001-Make-binary-icons-cross-compilable.patch \
patches/libkleo/lower-cmake-requirement.patch \
patches/kleopatra/lower-cmake-requirement.patch
copy-news:
cp NEWS doc/website/NEWS.last
copy-release: gpg4win-$(VERSION).tar.bz2 installers/gpg4win-$(VERSION).exe \
installers/gpg4win-light-$(VERSION).exe \
installers/gpg4win-vanilla-$(VERSION).exe
@echo Copying $(VERSION) to $(RELEASEHOST) >&2
@set -e;\
if ssh "$$(echo $(RELEASEHOST)|cut -d: -f -1)" \
test -f "$$(echo $(RELEASEHOST)/gpg4win-$(VERSION).exe|cut -d: -f2-)";\
then echo "This release has already been copied to the server" >&2 ;\
else scp gpg4win-$(VERSION).tar.bz2 \
installers/gpg4win-$(VERSION).exe \
installers/gpg4win-light-$(VERSION).exe \
installers/gpg4win-vanilla-$(VERSION).exe \
installers/gpg4win-src-$(VERSION).exe $(RELEASEHOST)/ ;\
for f in en de ; do \
scp src/README.$$f.txt \
$(RELEASEHOST)/README-$(VERSION).$$f.txt; \
done;\
fi
dist-hook: gen-ChangeLog
gen_start_date = 2012-03-26T00:00:00
.PHONY: gen-ChangeLog
gen-ChangeLog:
set -e; \
if test -d $(top_srcdir)/.git; then \
(cd $(top_srcdir) && \
$(GITLOG_TO_CHANGELOG) --append-dot --tear-off \
--amend=build-aux/git-log-fix \
--since=$(gen_start_date) ) > $(distdir)/cl-t; \
cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
rm -f $(distdir)/ChangeLog; \
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
fi
download: packages/packages.current
(cd packages; ./download.sh)
msi:
$(MAKE) $(AM_MAKEFLAGS) -C src msi
msi-signed:
$(MAKE) $(AM_MAKEFLAGS) -C src msi-signed
msi-upload:
$(MAKE) $(AM_MAKEFLAGS) -C src msi-upload
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 00000000..90e73327
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,47 @@
+dnl macros to configure Gpg4Win
+dnl Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+dnl Copyright (C) 2021 g10 Code GmbH
+dnl
+dnl Software engineering by Ingo Klöcker
+dnl
+dnl This file is part of Gpg4Win.
+dnl
+dnl Gpg4Win is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl Gpg4Win is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, see .
+
+# GPG4WIN_BUILD_RELEASE(NAME,DEFAULT)
+# Add a --enable-NAME option to configure and set the shell variable
+# build_NAME either to "yes" or "no". DEFAULT must either be "yes" or "no"
+# and decides on the default value for build_NAME and whether --enable-NAME
+# or --disable-NAME is shown with ./configure --help
+AC_DEFUN([GPG4WIN_BUILD_RELEASE],
+ [m4_define([my_build], [m4_bpatsubst(build_$1, [[^a-zA-Z0-9_]], [_])])
+ my_build=$2
+ m4_if([$2],[yes],[
+ AC_ARG_ENABLE([$1], AS_HELP_STRING([--disable-$1],
+ [do not build the $1 release]),
+ my_build=$enableval, my_build=$2)
+ ],[
+ AC_ARG_ENABLE([$1], AS_HELP_STRING([--enable-$1],
+ [build the $1 release]),
+ my_build=$enableval, my_build=$2)
+ ])
+ case "$my_build" in
+ no|yes)
+ ;;
+ *)
+ AC_MSG_ERROR([only yes or no allowed for feature --enable-$1])
+ ;;
+ esac
+ m4_undefine([my_build])
+ ])
diff --git a/configure.ac b/configure.ac
index 19ea2b4c..5a888bb9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,409 +1,507 @@
# configure.ac for GPG4Win
# Copyright (C) 2005, 2006, 2007, 2008, 2010 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 .
# (Process this file with autoconf to produce a configure script.)
AC_PREREQ(2.59)
min_automake_version="1.9.3"
# To build a release you need to create a tag with the version number
# (git tag -s gpg4win-2.x.y) and run "./autogen.sh --force". Please
# bump the version number immediately after the release and do another
# commit and push so that the git magic is able to work.
m4_define([my_version], [4.0.0])
# Below is m4 magic to extract and compute the git revision number,
# the decimalized short revision number, a beta version string and a
# flag indicating a development version (my_isgit). The latter works
# by requiring the final tag in the repository.
m4_define([git_revision],
m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
m4_define([git_revision_dec],
m4_esyscmd_s([echo $((0x$(echo ]git_revision[|head -c 4)))]))
m4_define([git_betastring],
m4_esyscmd_s([git describe --tags --match 'gpg4win-[0-9].*.*[0-9]' \
--long | awk -F- '$3!=0{print"-beta"$3}']))
m4_define([my_isgit],m4_if(git_betastring,[],[no],[yes]))
m4_define([my_full_version],[my_version[]git_betastring])
AC_INIT([gpg4win],[my_full_version],[gpg4win-devel@wald.intevation.org])
# Remember to update these version numbers also in the NEWS file.
MANUALVERSION_EINSTEIGER="2.0.2"
MANUALDATE_EINSTEIGER="30. Mai 2006"
MANUALVERSION_DURCHBLICKER="2.0.2"
MANUALDATE_DURCHBLICKER="30. Mai 2006"
MANUALVERSION_NOVICES="1.0.0"
MANUALDATE_NOVICES="Nov. 30, 2006"
MANUALVERSION_ADVANCED="0.0.0"
MANUALDATE_ADVANCED="Nov. 30, 2006"
COMPENDIUM_VERSION_DE="4.0.1"
COMPENDIUM_DATE_DE="3. April 2018"
COMPENDIUMINPROGRESS_DE="zuletzt geringfügig korrigiert am 3. April 2018"
COMPENDIUM_VERSION_EN="3.0.0"
COMPENDIUM_DATE_EN="30th November 2016"
COMPENDIUMINPROGRESS_EN="last minor changes from 30th November 2016"
MANUALINPROGRESS_DE=m4_if(my_isgit,[yes],["~und evtl. seitdem weiter bearbeitet"])
MANUALINPROGRESS_EN=m4_if(my_isgit,[yes],["~and may have been further edited"])
PACKAGE=$PACKAGE_NAME
VERSION=$PACKAGE_VERSION
GIT_REVISION=git_revision
GIT_REVISION_DEC=git_revision_dec
AC_CONFIG_SRCDIR(src/config.nsi.in)
AC_CONFIG_MACRO_DIR(m4)
AM_INIT_AUTOMAKE([tar-ustar])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
AM_CONFIG_HEADER(config.h)
# Language support
AM_PO_SUBDIRS
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(MANUALVERSION_EINSTEIGER)
AC_SUBST(MANUALDATE_EINSTEIGER)
AC_SUBST(MANUALVERSION_DURCHBLICKER)
AC_SUBST(MANUALDATE_DURCHBLICKER)
AC_SUBST(MANUALINPROGRESS_DE)
AC_SUBST(MANUALVERSION_NOVICES)
AC_SUBST(MANUALDATE_NOVICES)
AC_SUBST(MANUALVERSION_ADVANCED)
AC_SUBST(MANUALDATE_ADVANCED)
AC_SUBST(MANUALINPROGRESS_EN)
AC_SUBST(COMPENDIUM_VERSION_DE)
AC_SUBST(COMPENDIUM_DATE_DE)
AC_SUBST(COMPENDIUMINPROGRESS_DE)
AC_SUBST(COMPENDIUM_VERSION_EN)
AC_SUBST(COMPENDIUM_DATE_EN)
AC_SUBST(COMPENDIUMINPROGRESS_EN)
if echo "${PACKAGE_VERSION}" | egrep 'svn|rc|beta|git' >/dev/null ; then
IS_BETA_BUILD=yes
else
IS_BETA_BUILD=no
fi
AC_SUBST(IS_BETA_BUILD)
# Generate extended version information. Note, that for NSIS use we
# must not translate the dots to commas in the BUILD_FILEVERSION.
BUILD_TIMESTAMP=`date --iso-8601=minutes`
BUILD_ISODATE=`date --iso-8601`
changequote(,)dnl
BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./'`
changequote([,])dnl
BUILD_FILEVERSION="${BUILD_FILEVERSION}${GIT_REVISION_DEC}"
AC_SUBST(BUILD_TIMESTAMP)
AC_SUBST(BUILD_ISODATE)
AC_SUBST(BUILD_FILEVERSION)
# The final release is copied to an archive server. The default
# location may be changed by setting the RELEASEHOST envvar.
if test -z "$RELEASEHOST" ; then
RELEASEHOST="vigenere:tarballs/gpg4win"
if test "${IS_BETA_BUILD}" = yes ; then
RELEASEHOST="${RELEASEHOST}/Beta"
fi
fi
AC_SUBST(RELEASEHOST)
# Substitutions to set generated files in a Emacs buffer to read-only.
AC_SUBST(emacs_local_vars_begin, ['Local Variables:'])
AC_SUBST(emacs_local_vars_read_only, ['buffer-read-only: t'])
AC_SUBST(emacs_local_vars_end, ['End:'])
+GPG4WIN_BUILD_RELEASE(gpg4win, no)
+GPG4WIN_BUILD_RELEASE(appimage, no)
+
# For development it is often faster to build without manuals.
AC_ARG_ENABLE(manuals,
AC_HELP_STRING([--disable-manuals],
[Do not build the manuals (for debugging)]),
build_manuals=$enableval,
build_manuals=yes)
AM_CONDITIONAL(BUILD_MANUALS, test "$build_manuals" = yes)
# Additionaly enable building gpgex for another host
AC_ARG_WITH([additional-gpgex-host],
AC_HELP_STRING([--with-additional-gpgex-host=HOST],
[Additionaly build gpgex for this host]),
[if test "$withval" = yes; then
AC_MSG_FAILURE(
[--with-additional-gpgex-host was given,
but no host specified])
else
gpgex_host=$withval
fi
],
gpgex_host=no)
if test "$gpgex_host" != no; then
GPGEX_ADD_HOST="$gpgex_host"
fi
AC_SUBST(GPGEX_ADD_HOST)
AC_ARG_ENABLE(fast-makensis,
AC_HELP_STRING([--enable-fast-makensis],
[Use a less efficient compressor to speed up building]),
use_fast_makensis=$enableval,
use_fast_makensis=no)
if test "$use_fast_makensis" = yes; then
EXTRA_MAKENSIS_FLAGS="${EXTRA_MAKENSIS_FLAGS} -DDISABLE_LZMA=1"
fi
AC_SUBST(EXTRA_MAKENSIS_FLAGS)
+#
+# Set variables for use by automake makefiles.
+#
+AM_CONDITIONAL(BUILD_GPG4WIN, test "$build_gpg4win" = "yes")
+AM_CONDITIONAL(BUILD_APPIMAGE, test "$build_appimage" = "yes")
# Required tools.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_RANLIB
AC_CHECK_TOOL(AR, ar, :)
AC_CHECK_TOOLS(STRIP, strip)
AC_CHECK_TOOLS(DLLTOOL, dlltool)
AC_CHECK_PROGS(MAKE, make)
AC_CHECK_PROGS(UNZIP, unzip)
AC_CHECK_PROGS(TAR, tar)
AC_CHECK_PROGS(MKDIR, mkdir)
AC_CHECK_PROGS(CP, cp)
AC_CHECK_PROGS(RM, rm)
AC_CHECK_PROGS(STOW, stow)
AC_CHECK_PROGS(MAKENSIS, makensis)
AC_CHECK_PROGS(ZCAT, zcat)
AC_CHECK_PROGS(TEXI2DVI, texi2dvi)
AC_CHECK_PROGS(DVIPDF, dvipdf)
AC_CHECK_PROGS(CONVERT, convert)
AC_CHECK_PROGS(SHA1SUM, sha1sum)
AC_CHECK_PROGS(MSGFMT, msgfmt)
AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog,
[build-aux/gitlog-to-changelog])
AC_CHECK_PROGS(BUILD_CC, gcc cc)
AC_CHECK_PROGS(CMAKE, cmake3 cmake)
+AC_CHECK_PROGS(RSYNC, rsync)
AC_PROG_INSTALL
if test -n "$GPGEX_ADD_HOST"; then
AC_CHECK_TOOLS(STRIP_EX, ${GPGEX_ADD_HOST}-strip)
fi
if test -z "$GPG4WIN_PARALLEL"; then
JOBS=$(nproc 2>/dev/null || echo 1)
GPG4WIN_PARALLEL=-j$JOBS
AC_MSG_NOTICE([Using autodetected $JOBS make jobs. You can override this by setting GPG4WIN_PARALLEL.])
fi
AC_SUBST(GPG4WIN_PARALLEL)
+required_tools="MAKE TAR MKDIR CP RM ZCAT SHA1SUM MSGFMT BUILD_CC CMAKE"
+if test "$build_gpg4win" = yes ; then
+ required_tools="$required_tools DLLTOOL UNZIP STOW MAKENSIS TEXI2DVI DVIPDF CONVERT"
+fi
+if test "$build_appimage" = yes ; then
+ required_tools="$required_tools RSYNC"
+fi
+
missing_tools=
-for i in DLLTOOL MAKE UNZIP TAR MKDIR CP RM STOW MAKENSIS ZCAT TEXI2DVI \
- DVIPDF CONVERT SHA1SUM MSGFMT BUILD_CC CMAKE; do
+for i in $required_tools; do
eval tmp='$'$i
if test -z "$tmp"; then
missing_tools="$missing_tools `echo $i | tr 'A-Z' 'a-z'`"
fi
done
-# Try to find the KF5ConfigConfig to set up host tooling
-# variable for the kconfig compiler.
-# A variable path here would probably be better but we cant
-# use $libdir to avoid it beeing required to configure gpg4win
-# build with a multiarch libdir set.
-kf5_host_tooling="/usr/lib/x86_64-linux-gnu/cmake"
-if test ! -f "$kf5_host_tooling/KF5Config/KF5ConfigConfig.cmake"; then
- missing_tools="$missing_tools libkf5config-dev"
+if test "$build_gpg4win" = yes ; then
+ # Try to find the KF5ConfigConfig to set up host tooling
+ # variable for the kconfig compiler.
+ # A variable path here would probably be better but we cant
+ # use $libdir to avoid it beeing required to configure gpg4win
+ # build with a multiarch libdir set.
+ kf5_host_tooling="/usr/lib/x86_64-linux-gnu/cmake"
+ if test ! -f "$kf5_host_tooling/KF5Config/KF5ConfigConfig.cmake"; then
+ missing_tools="$missing_tools libkf5config-dev"
+ fi
+ AC_SUBST(kf5_host_tooling)
+
+ # Additional runtime libraries from mingw.
+ GPG4WIN_RUNTIME_LIBRARY(libgcc_s_sjlj-1)
+ GPG4WIN_RUNTIME_LIBRARY(libstdc++-6)
+ GPG4WIN_RUNTIME_LIBRARY(libwinpthread-1)
+
+ AC_CHECK_PROGS(GLIB_GENMARSHAL, glib-genmarshal)
+ AC_CHECK_PROGS(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
+ AC_CHECK_PROGS(GLIB_COMPILE_RESOURCES, glib-compile-resources)
+ AC_CHECK_PROGS(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource)
fi
-AC_SUBST(kf5_host_tooling)
-
-# Additional runtime libraries from mingw.
-GPG4WIN_RUNTIME_LIBRARY(libgcc_s_sjlj-1)
-GPG4WIN_RUNTIME_LIBRARY(libstdc++-6)
-GPG4WIN_RUNTIME_LIBRARY(libwinpthread-1)
-
-AC_CHECK_PROGS(GLIB_GENMARSHAL, glib-genmarshal)
-AC_CHECK_PROGS(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
-AC_CHECK_PROGS(GLIB_COMPILE_RESOURCES, glib-compile-resources)
-AC_CHECK_PROGS(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource)
-
+opt_tools=
+if test "$build_gpg4win" = yes ; then
+ opt_tools="GLIB_GENMARSHAL GLIB_COMPILE_SCHEMAS GLIB_COMPILE_RESOURCES GDK_PIXBUF_CSOURCE"
+fi
missing_opt_tools=
-for i in GLIB_GENMARSHAL GLIB_COMPILE_SCHEMAS GLIB_COMPILE_RESOURCES \
- GDK_PIXBUF_CSOURCE; do
+for i in $opt_tools; do
eval tmp='$'$i
if test -z "$tmp"; then
missing_opt_tools="$missing_opt_tools `echo $i | tr 'A-Z' 'a-z'`"
fi
done
# Optional tools.
AC_CHECK_PROGS(WGET, wget)
-# Packages.
-gpg4win_dup_sources=""
-
-
-GPG4WIN_SPKG([zlib])
-
-GPG4WIN_BPKG_GTK([pkgconfig])
-
-GPG4WIN_SPKG([libffi], [pkgconfig])
-GPG4WIN_SPKG([glib], [libiconv gettext pkgconfig libffi zlib])
-GPG4WIN_BPKG_GTK_DEV([atk], [glib pkgconfig])
-GPG4WIN_BPKG_GTK_DEV([pango], [glib pkgconfig])
-GPG4WIN_BPKG_GTK_DEV([cairo], [glib pkgconfig])
-GPG4WIN_BPKG_GTK_DEV([expat])
-GPG4WIN_BPKG_GTK_DEV([freetype], [pkgconfig zlib])
-GPG4WIN_BPKG_GTK_DEV([fontconfig], [pkgconfig zlib expat])
-GPG4WIN_SPKG([gdk-pixbuf], [glib])
-GPG4WIN_SPKG([gtk+], [libiconv gettext pkgconfig atk pango dnl
- glib gdk-pixbuf cairo])
-GPG4WIN_SPKG([libpng], [pkgconfig])
-
-GPG4WIN_SPKG([bzip2])
-GPG4WIN_SPKG([libgpg-error], [libiconv gettext])
-GPG4WIN_SPKG([libassuan], [libgpg-error w32pth])
-GPG4WIN_SPKG([scute], [libgpg-error libassuan])
-GPG4WIN_SPKG([pinentry], [qtbase libiconv gtk+])
-GPG4WIN_SPKG([gpgme], [libgpg-error libassuan glib qtbase])
-GPG4WIN_SPKG([gpgol], [gpgme libassuan])
-GPG4WIN_SPKG([gpgex], [libassuan])
-GPG4WIN_SPKG([paperkey])
-GPG4WIN_SPKG([gpa], [libiconv gettext zlib gtk+ libpng glib gpgme])
-GPG4WIN_SPKG([w32pth])
-GPG4WIN_SPKG([libiconv])
-GPG4WIN_SPKG([gettext], [libiconv])
-
-
-# Packages needed for gpgex
-GPG4WIN_SPKGEX([libgpg-error])
-GPG4WIN_SPKGEX([libassuan], [libgpg-error])
-GPG4WIN_SPKGEX([gpgex], [libassuan])
-GPG4WIN_SPKGEX([gpgme], [libgpg-error libassuan])
-GPG4WIN_SPKGEX([gpgol], [gpgme])
-
-GPG4WIN_IPKG([compendium])
-
-# The GnuPG Package.
-GPG4WIN_BPKG_BINSRC([gnupg-w32])
-GPG4WIN_BPKG_MSISRC([gnupg-msi])
-# See the script kde-l10n.sh how this package is created.
-GPG4WIN_BPKG_BINSRC([kde-l10n])
-
-# Qt related stuff.
-GPG4WIN_SPKG([qtbase], [libpng])
-GPG4WIN_SPKG([qttools], [qtbase])
-GPG4WIN_SPKG([qttranslations], [qtsvg qttools qtwinextras])
-GPG4WIN_SPKG([qtwinextras], [qtbase])
-GPG4WIN_SPKG([qtsvg], [qtbase])
-GPG4WIN_SPKG([boost], [expat zlib bzip2])
-GPG4WIN_KDEPKG([breeze-icons], [extra-cmake-modules qtbase])
-GPG4WIN_KDEPKG([kleopatra], [gnupg-w32 breeze-icons kxmlgui libkleo kde-l10n kitemmodels qttranslations])
-GPG4WIN_KDEPKG([extra-cmake-modules])
-GPG4WIN_KDEPKG([kconfig], [qtbase qttools extra-cmake-modules])
-GPG4WIN_KDEPKG([ki18n], [qtbase gettext qttools extra-cmake-modules])
-GPG4WIN_KDEPKG([kwidgetsaddons], [kconfig qttools qtbase])
-GPG4WIN_KDEPKG([kcompletion], [kwidgetsaddons])
-GPG4WIN_KDEPKG([kwindowsystem], [qtbase qtwinextras])
-GPG4WIN_KDEPKG([kcoreaddons], [qtbase qttools])
-GPG4WIN_KDEPKG([kcodecs], [qtbase qttools])
-GPG4WIN_KDEPKG([kguiaddons], [qtbase qttools])
-GPG4WIN_KDEPKG([kmime], [kcodecs])
-GPG4WIN_KDEPKG([kconfigwidgets], [kwidgetsaddons kguiaddons ki18n kcodecs kconfig])
-GPG4WIN_KDEPKG([kitemviews], [qtbase qttools])
-GPG4WIN_KDEPKG([kitemmodels], [qtbase qttools])
-GPG4WIN_KDEPKG([karchive], [qtbase qttools extra-cmake-modules])
-GPG4WIN_KDEPKG([kcrash], [kwindowsystem kcoreaddons])
-GPG4WIN_KDEPKG([kiconthemes], [qtsvg kconfigwidgets karchive])
-GPG4WIN_KDEPKG([kxmlgui], [kiconthemes kconfigwidgets kitemviews])
-GPG4WIN_KDEPKG([libkleo], [kmime kwidgetsaddons kwindowsystem kcompletion kconfig gpgme])
-GPG4WIN_KDEPKG([gpg4win-tools], [libkleo gpgme])
-
-GPG4WIN_FINALIZE
+# Packages for Gpg4Win.
+if test "$build_gpg4win" = yes ; then
+ gpg4win_dup_sources=""
+
+ GPG4WIN_SPKG([zlib])
+
+ GPG4WIN_BPKG_GTK([pkgconfig])
+
+ GPG4WIN_SPKG([libffi], [pkgconfig])
+ GPG4WIN_SPKG([glib], [libiconv gettext pkgconfig libffi zlib])
+ GPG4WIN_BPKG_GTK_DEV([atk], [glib pkgconfig])
+ GPG4WIN_BPKG_GTK_DEV([pango], [glib pkgconfig])
+ GPG4WIN_BPKG_GTK_DEV([cairo], [glib pkgconfig])
+ GPG4WIN_BPKG_GTK_DEV([expat])
+ GPG4WIN_BPKG_GTK_DEV([freetype], [pkgconfig zlib])
+ GPG4WIN_BPKG_GTK_DEV([fontconfig], [pkgconfig zlib expat])
+ GPG4WIN_SPKG([gdk-pixbuf], [glib])
+ GPG4WIN_SPKG([gtk+], [libiconv gettext pkgconfig atk pango dnl
+ glib gdk-pixbuf cairo])
+ GPG4WIN_SPKG([libpng], [pkgconfig])
+
+ GPG4WIN_SPKG([bzip2])
+ GPG4WIN_SPKG([libgpg-error], [libiconv gettext])
+ GPG4WIN_SPKG([libassuan], [libgpg-error w32pth])
+ GPG4WIN_SPKG([scute], [libgpg-error libassuan])
+ GPG4WIN_SPKG([pinentry], [qtbase libiconv gtk+])
+ GPG4WIN_SPKG([gpgme], [libgpg-error libassuan glib qtbase])
+ GPG4WIN_SPKG([gpgol], [gpgme libassuan])
+ GPG4WIN_SPKG([gpgex], [libassuan])
+ GPG4WIN_SPKG([paperkey])
+ GPG4WIN_SPKG([gpa], [libiconv gettext zlib gtk+ libpng glib gpgme])
+ GPG4WIN_SPKG([w32pth])
+ GPG4WIN_SPKG([libiconv])
+ GPG4WIN_SPKG([gettext], [libiconv])
+
+
+ # Packages needed for gpgex
+ GPG4WIN_SPKGEX([libgpg-error])
+ GPG4WIN_SPKGEX([libassuan], [libgpg-error])
+ GPG4WIN_SPKGEX([gpgex], [libassuan])
+ GPG4WIN_SPKGEX([gpgme], [libgpg-error libassuan])
+ GPG4WIN_SPKGEX([gpgol], [gpgme])
+
+ GPG4WIN_IPKG([compendium])
+
+ # The GnuPG Package.
+ GPG4WIN_BPKG_BINSRC([gnupg-w32])
+ GPG4WIN_BPKG_MSISRC([gnupg-msi])
+ # See the script kde-l10n.sh how this package is created.
+ GPG4WIN_BPKG_BINSRC([kde-l10n])
+
+ # Qt related stuff.
+ GPG4WIN_SPKG([qtbase], [libpng])
+ GPG4WIN_SPKG([qttools], [qtbase])
+ GPG4WIN_SPKG([qttranslations], [qtsvg qttools qtwinextras])
+ GPG4WIN_SPKG([qtwinextras], [qtbase])
+ GPG4WIN_SPKG([qtsvg], [qtbase])
+ GPG4WIN_SPKG([boost], [expat zlib bzip2])
+ GPG4WIN_KDEPKG([breeze-icons], [extra-cmake-modules qtbase])
+ GPG4WIN_KDEPKG([kleopatra], [gnupg-w32 breeze-icons kxmlgui libkleo kde-l10n kitemmodels qttranslations])
+ GPG4WIN_KDEPKG([extra-cmake-modules])
+ GPG4WIN_KDEPKG([kconfig], [qtbase qttools extra-cmake-modules])
+ GPG4WIN_KDEPKG([ki18n], [qtbase gettext qttools extra-cmake-modules])
+ GPG4WIN_KDEPKG([kwidgetsaddons], [kconfig qttools qtbase])
+ GPG4WIN_KDEPKG([kcompletion], [kwidgetsaddons])
+ GPG4WIN_KDEPKG([kwindowsystem], [qtbase qtwinextras])
+ GPG4WIN_KDEPKG([kcoreaddons], [qtbase qttools])
+ GPG4WIN_KDEPKG([kcodecs], [qtbase qttools])
+ GPG4WIN_KDEPKG([kguiaddons], [qtbase qttools])
+ GPG4WIN_KDEPKG([kmime], [kcodecs ki18n])
+ GPG4WIN_KDEPKG([kconfigwidgets], [kwidgetsaddons kguiaddons ki18n kcodecs kconfig])
+ GPG4WIN_KDEPKG([kitemviews], [qtbase qttools])
+ GPG4WIN_KDEPKG([kitemmodels], [qtbase qttools])
+ GPG4WIN_KDEPKG([karchive], [qtbase qttools extra-cmake-modules])
+ GPG4WIN_KDEPKG([kcrash], [kwindowsystem kcoreaddons])
+ GPG4WIN_KDEPKG([kiconthemes], [qtsvg kconfigwidgets karchive])
+ GPG4WIN_KDEPKG([kxmlgui], [kiconthemes kconfigwidgets kitemviews])
+ GPG4WIN_KDEPKG([libkleo], [kmime kwidgetsaddons kwindowsystem kcompletion kconfig gpgme])
+ GPG4WIN_KDEPKG([gpg4win-tools], [libkleo gpgme])
+
+ GPG4WIN_FINALIZE
+fi
+
+# Packages for the AppImage
+if test "$build_appimage" = yes ; then
+ appimage_dup_sources=""
+
+ APPIMAGE_SPKG([sqlite])
+
+ APPIMAGE_SPKG([libgpg-error])
+ APPIMAGE_SPKG([libassuan], [libgpg-error])
+ APPIMAGE_SPKG([npth])
+ APPIMAGE_SPKG([libgcrypt], [libgpg-error])
+ APPIMAGE_SPKG([libksba], [libgpg-error])
+ APPIMAGE_SPKG([gnupg], [libgpg-error libassuan npth libgcrypt libksba sqlite])
+ APPIMAGE_SPKG([pinentry], [qtbase qtx11extras])
+ APPIMAGE_SPKG([gpgme], [libgpg-error libassuan qtbase])
+ APPIMAGE_SPKG([paperkey])
+
+ # See the script kde-l10n.sh how this package is created.
+ #APPIMAGE_BPKG_BINSRC([kde-l10n])
+
+ # Qt related stuff.
+ APPIMAGE_SPKG([qtbase])
+ APPIMAGE_SPKG([qttools], [qtbase])
+ APPIMAGE_SPKG([qttranslations], [qtsvg qttools qtx11extras])
+ APPIMAGE_SPKG([qtx11extras], [qtbase])
+ APPIMAGE_SPKG([qtwayland], [qtbase])
+ APPIMAGE_SPKG([qtsvg], [qtbase])
+
+ APPIMAGE_KDEPKG([extra-cmake-modules], [qttools])
+ APPIMAGE_KDEPKG([breeze-icons], [extra-cmake-modules qtbase])
+ APPIMAGE_KDEPKG([kconfig], [qtbase qttools extra-cmake-modules])
+ APPIMAGE_KDEPKG([ki18n], [qtbase qttools extra-cmake-modules])
+ APPIMAGE_KDEPKG([kcoreaddons], [qtbase qttools extra-cmake-modules])
+ APPIMAGE_KDEPKG([kcodecs], [qtbase qttools extra-cmake-modules])
+ APPIMAGE_KDEPKG([kdbusaddons], [qtbase qttools extra-cmake-modules])
+ APPIMAGE_KDEPKG([kguiaddons], [qtbase qttools extra-cmake-modules])
+ APPIMAGE_KDEPKG([kitemviews], [qtbase qttools extra-cmake-modules])
+ APPIMAGE_KDEPKG([kitemmodels], [qtbase qttools extra-cmake-modules])
+ APPIMAGE_KDEPKG([karchive], [qtbase qttools extra-cmake-modules])
+ APPIMAGE_KDEPKG([kwindowsystem], [qtbase qtx11extras extra-cmake-modules])
+
+ APPIMAGE_KDEPKG([kcrash], [kwindowsystem kcoreaddons])
+ APPIMAGE_KDEPKG([kmime], [kcodecs ki18n])
+ APPIMAGE_KDEPKG([kwidgetsaddons], [kconfig qttools qtbase])
+
+ APPIMAGE_KDEPKG([kcompletion], [kwidgetsaddons])
+ APPIMAGE_KDEPKG([kconfigwidgets], [kwidgetsaddons kguiaddons ki18n kcodecs kconfig])
+
+ APPIMAGE_KDEPKG([kiconthemes], [qtsvg kconfigwidgets karchive])
+
+ APPIMAGE_KDEPKG([kxmlgui], [kiconthemes kconfigwidgets kitemviews])
+
+ #APPIMAGE_KDEPKG([libkleo], [kmime kwidgetsaddons kwindowsystem kcompletion kconfig gpgme kde-l10n])
+ APPIMAGE_KDEPKG([libkleo], [kmime kwidgetsaddons kwindowsystem kcompletion kconfig gpgme])
+
+ #APPIMAGE_KDEPKG([kleopatra], [gnupg gpgme breeze-icons kxmlgui libkleo kde-l10n kitemmodels qttranslations kdbusaddons])
+ APPIMAGE_KDEPKG([kleopatra], [gnupg gpgme breeze-icons kxmlgui libkleo kitemmodels qttranslations kdbusaddons])
+
+ APPIMAGE_FINALIZE
+fi
# Throw an error if required tools are missing
if test -n "$missing_tools"; then
for i in $missing_tools; do
AC_MSG_NOTICE([$i is missing])
done
AC_MSG_ERROR([[
***
*** Required tools not found. Please consult the above messages
*** and install them before running configure again.
***]])
fi
# Throw an error if any duplicate source packages have been found
if test -n "$gpg4win_dup_sources"; then
tmp=
for i in $gpg4win_dup_sources; do
tmp="$tmp
$i"
done
tmp2="
You might remove them with:"
for i in $gpg4win_rm_candidates; do
if ! grep -q $(basename $i) packages/packages.current; then
tmp2="$tmp2
rm $i"
fi
done
AC_MSG_ERROR([Packages with more that one source version:$tmp$tmp2])
fi
+if test -n "$appimage_dup_sources"; then
+ tmp=
+ for i in $appimage_dup_sources; do
+ tmp="$tmp
+$i"
+ done
+ tmp2="
+You might remove them with:"
+ for i in $appimage_rm_candidates; do
+ if ! grep -q $(basename $i) packages/packages.current; then
+ tmp2="$tmp2
+rm $i"
+ fi
+ done
+ AC_MSG_ERROR([Packages with more that one source version:$tmp$tmp2])
+fi
# Finalize.
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(packages/Makefile src/Makefile po/Makefile.in)
AC_CONFIG_FILES(po/build-cc)
AC_CONFIG_FILES(src/config.nsi src/gpg4win.mk)
AC_CONFIG_FILES(doc/Makefile)
AC_CONFIG_FILES(doc/logo/Makefile)
AC_CONFIG_FILES(doc/manual/Makefile doc/manual/version.tex)
AC_CONFIG_FILES(src/toolchain.cmake)
+AC_CONFIG_FILES(src/appimage/Makefile src/appimage/appimage.mk)
AC_OUTPUT
# Throw a warning if optional tools are missing
if test -n "$missing_opt_tools"; then
AC_MSG_WARN([[
***
*** Some tools not found. They may or may not be needed depending on
*** the packages you want to include. For example GLIB and GTK+
*** require certain tools; you may need to install a recent version of
*** GLIB and GTK+ on the build machine to allow for cross-compiling.
***]])
for i in $missing_opt_tools; do
AC_MSG_NOTICE([$i is missing])
done
fi
echo -n "
$PACKAGE_NAME-$PACKAGE_VERSION prepared for make
Revision: ${GIT_REVISION} (${GIT_REVISION_DEC})
32bit platform: $host
64bit platform: ${GPGEX_ADD_HOST}
"
if test -n "$JOBS"; then
echo " make jobs: ${JOBS}"
else
echo ""
fi
diff --git a/m4/appimage.m4 b/m4/appimage.m4
new file mode 100644
index 00000000..ddbe6912
--- /dev/null
+++ b/m4/appimage.m4
@@ -0,0 +1,377 @@
+dnl appimage.m4 - macros to configure appimage.
+dnl Copyright (C) 2005, 2009 g10 Code GmbH
+dnl
+dnl This file is part of GPG4Win.
+dnl
+dnl GPG4Win is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl GPG4Win is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, see .
+
+
+# APPIMAGE_DEFINE SYMBOL
+# A poor man's version of AC_DEFINE_UNQUOTED for NSIS.
+AC_DEFUN([APPIMAGE_DEFINE],
+[
+ eval $1=\"\!define $1 1\"
+ AC_SUBST($1)
+])
+
+
+# APPIMAGE_BASH
+# Gpg4Win needs bash. This macro checks for it.
+AC_DEFUN([APPIMAGE_BASH],
+[
+ AC_MSG_CHECKING([for Bash])
+ _bash=$BASH_VERSION
+ if test -z "$_bash"; then
+ _bash=no
+ fi
+ AC_MSG_RESULT($_bash)
+ if test $_bash = no; then
+ AC_MSG_ERROR("this configure script requires Bash")
+ fi
+])
+
+
+# APPIMAGE_PACKAGES
+# Determines the path to the source and binary packages.
+# Default is the "packages" directory in the source directory.
+# The path is stored in the shell variable appimage_packages.
+AC_DEFUN([APPIMAGE_PACKAGES],
+[
+ AC_MSG_CHECKING(for packages directory)
+ _appimage_packages_default=packages
+ AC_ARG_WITH([packages],
+ AS_HELP_STRING([--with-packages=DIR],
+ [source and binary packages [[packages]]]),
+ appimage_packages=$withval)
+ AS_IF([test -z $appimage_packages],
+ [appimage_packages=$_appimage_packages_default])
+ AS_IF([test `echo $appimage_packages | head -c 1` != /],
+ [appimage_packages=`pwd`/$appimage_packages])
+ AC_SUBST(appimage_packages)
+ AC_MSG_RESULT($appimage_packages)
+
+ # Set auto-detection. FIXME: This should accept a comma-separated
+ # list of packages that will be autodetected.
+ _appimage_auto_detection=yes
+ AC_ARG_ENABLE([packages],
+ AS_HELP_STRING([--enable-packages], [enable auto-detection [[yes]]]),
+ _appimage_auto_detection=$enableval)
+])
+
+
+# Should be called early.
+AC_DEFUN([APPIMAGE_INIT],
+[
+ # We call this here so its options appear before the per-package options.
+ AC_REQUIRE([APPIMAGE_PACKAGES])
+])
+
+
+# APPIMAGE_FIND([FILE],[PATTERN],[ZIP|TAR],[DIR],[IF-FOUND],[IF-NOT-FOUND])
+# Search for package file FILE in DIR. If DIR is empty, yes or maybe,
+# look in default directory. If DIR is not maybe, abort if not found.
+# The package file name is provided in appimage_val and the version in
+# appimage_version.
+AC_DEFUN([APPIMAGE_FIND],
+[
+ AC_REQUIRE([APPIMAGE_BASH])
+ AC_REQUIRE([APPIMAGE_PACKAGES])
+
+ appimage_val=
+ appimage_version=
+
+ AC_MSG_CHECKING(for package $1)
+ _appimage_critical=no
+ _appimage_file=
+ _appimage_dir=$4
+
+ # If --enable-pkg-foo was specified, make success critical.
+ AS_IF([test x$_appimage_dir != xmaybe], [_appimage_critical=yes])
+
+ # Only check if critical or auto detection is requested.
+ AS_IF([test $_appimage_auto_detection = yes -o $_appimage_critical = yes],
+ [AS_IF([test -z "$_appimage_dir" -o "$_appimage_dir" = yes -o "$_appimage_dir" = maybe],
+ [_appimage_dir=$appimage_packages])
+
+ # Install pattern.
+ AS_IF([test -z "$2"], [_appimage_pat='$1-\([[0-9]].*\)'],
+ [_appimage_pat="$2"])
+
+ # Frob pattern. Regex party!
+ [_appimage_glob=`echo "$_appimage_pat" | sed -e 's/\\\\(\(.*\)\\\\)/\1/'`]
+ [_appimage_glob=`echo "$_appimage_glob" | sed -e 's/\\.\\*/*/'`]
+
+ # Make non-matching globs expand to nothing.
+ shopt -s nullglob
+
+ _appimage_format=both
+ AS_IF([test ! -z "$3"], _appimage_format="$3")
+
+ AS_IF([test -z "$_appimage_file" -a $_appimage_format != zip],
+ [_appimage_file=`echo ${_appimage_dir}/${_appimage_glob}.tar.xz`
+ _appimage_suffix=.tar.xz])
+ AS_IF([test -z "$_appimage_file" -a $_appimage_format != zip],
+ [_appimage_file=`echo ${_appimage_dir}/${_appimage_glob}.tar.bz2`
+ _appimage_suffix=.tar.bz2])
+ AS_IF([test -z "$_appimage_file" -a $_appimage_format != zip],
+ [_appimage_file=`echo ${_appimage_dir}/${_appimage_glob}.tbz2`
+ _appimage_suffix=.tbz2])
+ AS_IF([test -z "$_appimage_file" -a $_appimage_format != zip],
+ [_appimage_file=`echo ${_appimage_dir}/${_appimage_glob}.tbz`
+ _appimage_suffix=.tbz])
+ AS_IF([test -z "$_appimage_file" -a $_appimage_format != zip],
+ [_appimage_file=`echo ${_appimage_dir}/${_appimage_glob}.tar.gz`
+ _appimage_suffix=.tar.gz])
+ AS_IF([test -z "$_appimage_file" -a $_appimage_format != zip],
+ [_appimage_file=`echo ${_appimage_dir}/${_appimage_glob}.tgz`
+ _appimage_suffix=.tgz])
+ AS_IF([test -z "$_appimage_file" -a $_appimage_format != tar],
+ [_appimage_file=`echo ${_appimage_dir}/${_appimage_glob}.zip`
+ _appimage_suffix=.zip])
+ AS_IF([test -z "$_appimage_file" -a $_appimage_format != tar -a $_appimage_format != zip],
+ [_appimage_file=`echo ${_appimage_dir}/${_appimage_glob}.exe`
+ _appimage_suffix=.exe])
+ AS_IF([test -z "$_appimage_file" -a $_appimage_format != tar -a $_appimage_format != zip],
+ [_appimage_file=`echo ${_appimage_dir}/${_appimage_glob}.wixlib`
+ _appimage_suffix=.wixlib])
+ shopt -u nullglob])
+
+ AS_IF([test -z "$_appimage_file"],
+ AC_MSG_RESULT(no),
+ AS_IF([test `echo $_appimage_file | head -c 1` != /],
+ [_appimage_file=`pwd`/$_appimage_file])
+ AC_MSG_RESULT($_appimage_file))
+ AS_IF([test -z "$_appimage_file" -a $_appimage_critical = yes],
+ AC_MSG_ERROR(could not find sources for $1 in $_appimage_dir))
+
+ # Test for duplicate.
+ _appimage_found=
+ for _appimage_f in $_appimage_file; do
+ AS_IF([test "$_appimage_found" = yes],
+ [AC_MSG_WARN(found more than one sources for $1 in $_appimage_dir)
+ appimage_dup_sources="$appimage_dup_sources $1";
+ appimage_rm_candidates="$appimage_rm_candidates $_appimage_file"])
+ _appimage_found=yes
+ done
+
+ AS_IF([test ! -z "$_appimage_file"],
+ [appimage_val="$_appimage_file"
+ [appimage_version=`echo "$appimage_val" | sed -e "s,^.*/${_appimage_pat}${_appimage_suffix}$,\1,"`]
+ [$5]],
+ [$6])
+])
+
+
+AC_DEFUN([APPIMAGE_CHECK_DEPS],
+[
+ AC_MSG_CHECKING(build list)
+ appimage_build_list=`echo $_appimage_deps | tsort`
+ # Remove newlines.
+ appimage_build_list=`echo $appimage_build_list`
+ AC_MSG_RESULT($appimage_build_list)
+ AC_SUBST(appimage_build_list)
+
+ # Check each dependency.
+ _appimage_not_found=
+ _appimage_d=
+ _appimage_p=
+ for _appimage_p in $_appimage_deps; do
+ AS_IF([test -z $_appimage_d], [_appimage_d=$_appimage_p],
+ [
+ _appimage_found=
+ for _appimage_i in $_appimage_pkgs; do
+ AS_IF([test $_appimage_d = $_appimage_i],
+ _appimage_found=yes
+ break)
+ done
+ AS_IF([test -z $_appimage_found],
+ AC_MSG_WARN(could not find package $_appimage_d required by package $_appimage_p)
+ _appimage_not_found=yes)
+ _appimage_d=
+ ])
+ done
+ AS_IF([test ! -z "$_appimage_not_found"],
+ AC_MSG_ERROR([could not find some required packages]))
+])
+
+
+AC_DEFUN([APPIMAGE_FINALIZE],
+[
+ AC_REQUIRE([APPIMAGE_CHECK_DEPS])
+
+ _appimage_debug=no
+ AC_ARG_ENABLE([debug],
+ AS_HELP_STRING([--enable-debug], [enable debugging [[no]]]),
+ _appimage_debug=$enableval)
+
+ AS_IF([test "${_appimage_debug}" != no],
+ APPIMAGE_DEFINE(APPIMAGE_DEBUG))
+])
+
+
+# APPIMAGE_SPKG([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
+# Set up the source package PKG.
+# It is provided in appimage_val.
+AC_DEFUN([APPIMAGE_SPKG],
+[
+ AC_REQUIRE([APPIMAGE_INIT])
+ _appimage_pkg=maybe
+ AC_ARG_ENABLE([pkg-$1],
+ AS_HELP_STRING([--enable-pkg-$1[=DIR]],
+ [include package $1]),
+ _appimage_pkg=$enableval)
+ _appimage_spkg=no
+ _appimage_version=
+ AS_IF([test "$_appimage_pkg" != no],
+ [APPIMAGE_FIND($1,,, $_appimage_pkg,
+ _appimage_spkg=$appimage_val
+ _appimage_version=$appimage_version)])
+
+ # At this point, _appimage_spkg is no, or the actual package source file.
+
+ # appimage_pkg_PKGNAME=FILENAME_OF_SOURCE
+ appimage_pkg_[]m4_translit([$1],[-+],[__])[]=$_appimage_spkg
+ AC_SUBST(appimage_pkg_[]m4_translit([$1],[-+],[__]))
+
+ # appimage_pkg_PKGNAME_version=VERSION
+ appimage_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_appimage_version
+ AC_SUBST(appimage_pkg_[]m4_translit([$1],[-+],[__])[]_version)
+
+ # appimage_pkg_PKGNAME_deps=DEPS
+ appimage_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
+ AC_SUBST(appimage_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
+
+ AS_IF([test "$_appimage_spkg" != no],
+ _appimage_pkgs="$_appimage_pkgs $1"
+ APPIMAGE_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
+ # Record dependencies. Also enter every package as node.
+ _appimage_deps="$_appimage_deps $1 $1"
+ AS_IF([test ! -z "$2"],
+ for _appimage_i in $2; do
+ _appimage_deps="$_appimage_deps $_appimage_i $1"
+ done)
+ [$3],
+ [$4])
+])
+
+
+# APPIMAGE_KDEPKG([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
+# Set up the KDE source package PKG.
+# It is provided in appimage_val.
+AC_DEFUN([APPIMAGE_KDEPKG],
+[
+ AC_REQUIRE([APPIMAGE_INIT])
+ _appimage_pkg=maybe
+ AC_ARG_ENABLE([pkg-$1],
+ AS_HELP_STRING([--enable-pkg-$1[=DIR]],
+ [include package $1]),
+ _appimage_pkg=$enableval)
+ _appimage_kdepkg=no
+ _appimage_version=
+ AS_IF([test "$_appimage_pkg" != no],
+ [APPIMAGE_FIND($1,,, $_appimage_pkg,
+ _appimage_kdepkg=$appimage_val
+ _appimage_version=$appimage_version)])
+
+ # appimage_pkg_PKGNAME=FILENAME_OF_SOURCE
+ appimage_pkg_[]m4_translit([$1],[-+],[__])[]=$_appimage_kdepkg
+ AC_SUBST(appimage_pkg_[]m4_translit([$1],[-+],[__]))
+
+ # appimage_pkg_PKGNAME_version=VERSION
+ appimage_pkg_[]m4_translit([$1],[-+],[__])[]_version=$_appimage_version
+ AC_SUBST(appimage_pkg_[]m4_translit([$1],[-+],[__])[]_version)
+
+ # appimage_pkg_PKGNAME_deps=DEPS
+ appimage_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
+ AC_SUBST(appimage_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
+
+ AS_IF([test "$_appimage_kdepkg" != no],
+ _appimage_pkgs="$_appimage_pkgs $1"
+ APPIMAGE_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
+ # Record dependencies. Also enter every package as node.
+ _appimage_deps="$_appimage_deps $1 $1"
+ AS_IF([test ! -z "$2"],
+ for _appimage_i in $2; do
+ _appimage_deps="$_appimage_deps $_appimage_i $1"
+ done)
+ [$3],
+ [$4])
+])
+
+# APPIMAGE_BPKG_BINSRC([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])
+# Set up package PKG which is expected to be delivered as two ZIP files
+# with a "-(src|source)" and a "-(bin|noinstaller)" suffix.
+AC_DEFUN([APPIMAGE_BPKG_BINSRC],
+[
+ AC_REQUIRE([APPIMAGE_INIT])
+ _appimage_pkg=maybe
+ AC_ARG_ENABLE([pkg-$1],
+ AS_HELP_STRING([--enable-pkg-$1[=DIR]],
+ [include package $1]),
+ _appimage_pkg=$enableval)
+ _appimage_bpkg=no
+ _appimage_version=
+ AS_IF([test "$_appimage_pkg" != no],
+ [APPIMAGE_FIND($1-bin, [$1-\(.*\)-bin],,
+ $_appimage_pkg,
+ _appimage_bpkg=$appimage_val
+ _appimage_version=$appimage_version)])
+ AS_IF([test "$_appimage_pkg" != no -a "$_appimage_bpkg" = no],
+ [APPIMAGE_FIND($1-noinstaller, [$1-\(.*\)-noinstaller],,
+ $_appimage_pkg,
+ _appimage_bpkg=$appimage_val
+ _appimage_version=$appimage_version)])
+
+ # At this point, _appimage_bpkg is no, or the actual package binary file.
+
+ # appimage_pkg_PKGNAME=FILENAME_OF_BINARY
+ appimage_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]=$_appimage_bpkg
+ AC_SUBST(appimage_pkg_[]m4_translit([$1],[A-Z+-],[a-z__]))
+
+ # appimage_pkg_PKGNAME_version=VERSION
+ appimage_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_version=$_appimage_version
+ AC_SUBST(appimage_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_version)
+
+ # appimage_pkg_PKGNAME_deps=DEPS
+ appimage_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps="$2"
+ AC_SUBST(appimage_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_deps)
+
+ AS_IF([test "$_appimage_bpkg" != no],
+ tmp_binsrc=yes
+ APPIMAGE_FIND($1-src, [$1-\(.*\)-src],,
+ $_appimage_pkg, _appimage_bpkg=$appimage_val, tmp_binsrc=no)
+ if test $tmp_binsrc = no ; then
+ APPIMAGE_FIND($1-source, [$1-\(.*\)-source],,
+ $_appimage_pkg, _appimage_bpkg=$appimage_val,
+ AC_MSG_ERROR(can not find sources for package $1))
+ fi
+ # appimage_pkg_PKGNAME_src=FILENAME_OF_SOURCE
+ appimage_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_src=$_appimage_bpkg
+ AC_SUBST(appimage_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_src)
+
+ # FIXME: Add a version consistency check here. Both packages
+ # must match!
+
+ APPIMAGE_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__]))
+
+ _appimage_pkgs="$_appimage_pkgs []m4_translit([$1],[A-Z],[a-z])"
+ # Record dependencies. Also enter every package as node.
+ _appimage_deps="$_appimage_deps []m4_translit([$1],[A-Z],[a-z]) []m4_translit([$1],[A-Z],[a-z])"
+ AS_IF([test ! -z "$2"],
+ for _appimage_i in $2; do
+ _appimage_deps="$_appimage_deps $_appimage_i []m4_translit([$1],[A-Z],[a-z])"
+ done)
+ [$3],
+ [$4])
+])
diff --git a/src/Makefile.am b/src/Makefile.am
index 097918d4..2916518b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,803 +1,814 @@
# Makefile.am - Installer for GnuPG 4 Windows Makefile.
# Copyright (C) 2005, 2006, 2007, 2008, 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 .
-
EXTRA_DIST = pkg-config gpg4win.nsi gpg4win-src.nsi \
config.site config.nsi.in \
libiconv.def libintl.def loreley.mid \
gpg4win-splash.wav exdll.h g4wihelp.c desktopshellrun.cpp \
g4wihelp.nsi slideshow.cpp gpgwrap.c \
inst-sections.nsi installer.nsi installer-finish.nsi \
zlib.pc sha1sum.c mkportable.c \
mkportable-vanilla.h mkportable-full.h \
potomo Memento.nsh \
inst-gpg4win.nsi uninst-gpg4win.nsi \
inst-atk.nsi uninst-atk.nsi \
inst-expat.nsi uninst-expat.nsi \
inst-freetype.nsi uninst-freetype.nsi \
inst-fontconfig.nsi uninst-fontconfig.nsi \
inst-cairo.nsi uninst-cairo.nsi \
inst-gettext.nsi uninst-gettext.nsi \
inst-libffi.nsi uninst-libffi.nsi \
inst-glib.nsi uninst-glib.nsi \
inst-gnupg-w32.nsi uninst-gnupg-w32.nsi \
inst-gpa.nsi uninst-gpa.nsi \
inst-gpgme.nsi uninst-gpgme.nsi \
inst-paperkey.nsi uninst-paperkey.nsi \
inst-gpgol.nsi uninst-gpgol.nsi \
inst-gpgex.nsi uninst-gpgex.nsi \
inst-gdk-pixbuf.nsi uninst-gdk-pixbuf.nsi \
inst-gtk+.nsi uninst-gtk+.nsi \
inst-libassuan.nsi uninst-libassuan.nsi \
inst-libgpg-error.nsi uninst-libgpg-error.nsi \
inst-libiconv.nsi uninst-libiconv.nsi \
inst-libpng.nsi uninst-libpng.nsi \
inst-compendium.nsi uninst-compendium.nsi \
inst-man_advanced_de.nsi uninst-man_advanced_de.nsi \
inst-man_advanced_en.nsi uninst-man_advanced_en.nsi \
inst-man_novice_de.nsi uninst-man_novice_de.nsi \
inst-man_novice_en.nsi uninst-man_novice_en.nsi \
inst-pango.nsi uninst-pango.nsi \
inst-pinentry.nsi uninst-pinentry.nsi \
inst-pkgconfig.nsi uninst-pkgconfig.nsi \
inst-w32pth.nsi uninst-w32pth.nsi \
inst-zlib.nsi uninst-zlib.nsi \
inst-kconfig.nsi uninst-kconfig.nsi \
inst-kleopatra.nsi uninst-kleopatra.nsi \
inst-bzip2.nsi uninst-bzip2.nsi \
uninst-claws-mail.nsi uninst-claws-mail-cmds.nsi \
inst-qtbase.nsi uninst-qtbase.nsi \
inst-ki18n.nsi uninst-ki18n.nsi \
inst-kwidgetsaddons.nsi uninst-kwidgetsaddons.nsi \
inst-kcompletion.nsi uninst-kcompletion.nsi \
inst-kwindowsystem.nsi uninst-kwindowsystem.nsi \
inst-libkleo.nsi uninst-libkleo.nsi \
inst-kcoreaddons.nsi uninst-kcoreaddons.nsi \
inst-kcodecs.nsi uninst-kcodecs.nsi \
inst-kconfigwidgets.nsi uninst-kconfigwidgets.nsi \
inst-kxmlgui.nsi uninst-kxmlgui.nsi \
inst-kiconthemes.nsi uninst-kiconthemes.nsi \
inst-breeze-icons.nsi uninst-breeze-icons.nsi \
inst-karchive.nsi uninst-karchive.nsi \
inst-kcrash.nsi uninst-kcrash.nsi \
inst-kitemviews.nsi uninst-kitemviews.nsi \
inst-kitemmodels.nsi uninst-kitemmodels.nsi \
inst-kguiaddons.nsi uninst-kguiaddons.nsi \
inst-kmime.nsi uninst-kmime.nsi \
inst-kde-l10n.nsi uninst-kde-l10n.nsi \
inst-qtsvg.nsi uninst-qtsvg.nsi \
inst-qttools.nsi uninst-qttools.nsi \
inst-qttranslations.nsi uninst-qttranslations.nsi \
inst-qtwinextras.nsi uninst-qtwinextras.nsi \
inst-boost.nsi uninst-boost.nsi \
inst-scute.nsi uninst-scute.nsi \
inst-extra-cmake-modules.nsi uninst-extra-cmake-modules.nsi \
inst-gpg4win-tools.nsi uninst-gpg4win-tools.nsi \
inst-gpgme-browser.nsi \
inst-final.nsi index.theme \
slideshow/slides.dat \
slideshow/slide1-gpgol.png \
slideshow/slide2-gpgex.png \
slideshow/slide3-kleopatra.png \
slideshow/slide4-summary.png \
file-ext.ico \
kdeglobals qtlogging.ini
+if BUILD_APPIMAGE
+appimage = appimage
+else
+appimage =
+endif
+
+SUBDIRS = ${appimage}
+
gpg4win_readme_ll = en de ar es fr ru pt zh
README_files = $(addsuffix .txt,$(addprefix README.,$(gpg4win_readme_ll)))
gpg4win_howto_smime_ll = en de
HOWTO_files = $(addsuffix .txt, \
$(addprefix HOWTO-SMIME.,$(gpg4win_howto_smime_ll)))
foosum_exe = sha1sum.exe md5sum.exe sha256sum.exe mkportable.exe
# Need to clean the dll because we bypassed automake.
CLEANFILES = g4wihelp.dll desktopshellrun.o versioninfo.txt $(README_files) \
$(HOWTO_files) NEWS.tmp COMPONENTS-list.tmp \
license.blurb cdversioninfo.tmp slideshow.o \
$(foosum_exe) gpgwrap.exe
# Supported source packages.
gpg4win_spkgs = glib libffi gdk-pixbuf gtk+ \
libgpg-error gpgme gpgol gpgex libpng \
gpa opencdk \
pinentry libassuan \
w32pth paperkey regex libiconv gettext scute
gpg4win_qtpkgs = qtbase qttools qtwinextras qtsvg qttranslations
# Source packages following the KDE pattern
gpg4win_kdepkgs = kconfig kwidgetsaddons ki18n extra-cmake-modules \
kcompletion kwindowsystem kcoreaddons libkleo kcodecs \
kmime kconfigwidgets kxmlgui kguiaddons kitemviews \
kiconthemes kleopatra breeze-icons kitemmodels karchive \
gpg4win-tools kcrash
# Supported source packages to build in an additional architecture
gpg4win_expkgs = libgpg-error libassuan libiconv gettext w32pth gpgex gpgol \
gpgme
# Some variables
WINE = wine
WINHOST = win10
WINLIGHT = c:/wix/light.exe
# Extra options to configure for individual packages.
# We can use $(idir) here for the installation prefix.
gpg4win_pkg_libiconv_ex_configure = \
--enable-shared=no --enable-static=yes
gpg4win_pkg_gettext_configure = \
--with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
CPPFLAGS=-I$(idir)/include CFLAGS=-O2 LDFLAGS=-L$(idir)/lib
gpg4win_pkg_scute_configure = \
LDFLAGS=-lws2_32
gpg4win_pkg_gettext_ex_configure = \
--with-lib-prefix=$(ex_idir) --with-libiconv-prefix=$(ex_idir) \
CPPFLAGS=-I$(ex_idir)/include CFLAGS=-O2 LDFLAGS=-L$(ex_idir)/lib
# We only need gettext-runtime and there is sadly no top level
# configure option for this
gpg4win_pkg_gettext_make_dir = gettext-runtime
gpg4win_pkg_gettext_make_dir_inst = gettext-runtime
gpg4win_pkg_gettext_ex_make_dir = gettext-runtime
gpg4win_pkg_gettext_ex_make_dir_inst = gettext-runtime
gpg4win_pkg_glib_configure = \
--disable-modular-tests \
--with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib CCC=$(host)-g++
gpg4win_pkg_glib_extracflags = -march=i486
gpg4win_pkg_gdk_pixbuf_configure = \
--with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
--with-included-loaders=yes \
CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib
gpg4win_pkg_gtk__configure = \
CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib --disable-cups
# The GnuPG package provides man pages which we have to convert.
# We also create the MO files here.
define gpg4win_pkg_gnupg2_post_install
(for i in gpg2 gpgv2 gpgsm gpg-agent scdaemon gpg-connect-agent gpgconf ; \
do man -Tlatin1 -l $$$${pkgidir}/share/man/man1/$$$${i}.1 | \
sed `printf "s/_\b//g;s/\b.//g"` | \
sed -e 's/$$$$/\r/' > $$$${pkgidir}/share/man/man1/$$$${i}.man ; \
done ; \
for i in `$(tsdir)/src/potomo --get-linguas $$$${pkgsdir}/po` ; do \
$(MKDIR_P) $$$${pkgidir}/share/locale/$$$${i}/LC_MESSAGES || true; \
rm $$$${pkgidir}/share/locale/$$$${i}/LC_MESSAGES/gnupg2.mo 2>/dev/null \
|| true; \
$(tsdir)/src/potomo $$$${pkgsdir}/po/$$$${i}.po \
$$$${pkgidir}/share/locale/$$$${i}/LC_MESSAGES/gnupg2.mo; \
done)
endef
# Paperkey comes with a man pages which we have to convert.
define gpg4win_pkg_paperkey_post_install
(for i in paperkey ; \
do man -Tlatin1 -l $$$${pkgidir}/share/man/man1/$$$${i}.1 | \
sed `printf "s/_\b//g;s/\b.//g"` | \
sed -e 's/$$$$/\r/' > $$$${pkgidir}/share/man/man1/$$$${i}.man ; \
done)
endef
# Build the reference manual.
define gpg4win_pkg_gpgol_post_install
( cd $$$${pkgbdir}/doc; make pdf )
endef
# We would like to use --with-libiconv-prefix and
# --with-libintl-prefix, but these don't work with the cheesy
# non-"libfoo.la" versions of iconv and gettext that we are using.
#gpg4win_pkg_libgpg_error_configure = \
# --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir)
gpg4win_pkg_libgpg_error_configure = --silent \
CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib \
--enable-static
gpg4win_pkg_libgpg_error_ex_configure = --silent \
--enable-static
# We convert the PO files to UTF-8. FIXME: This should be done in
# libgpg-error proper.
define gpg4win_pkg_libgpg_error_post_install
(for i in `$(tsdir)/src/potomo --get-linguas $$$${pkgsdir}/po` ; do \
rm $$$${pkgidir}/share/locale/$$$${i}/LC_MESSAGES/libgpg-error.mo \
2>/dev/null|| true; \
$(tsdir)/src/potomo $$$${pkgsdir}/po/$$$${i}.po \
$$$${pkgidir}/share/locale/$$$${i}/LC_MESSAGES/libgpg-error.mo; \
done)
endef
gpg4win_pkg_libassuan_configure = --silent --enable-static
gpg4win_pkg_libassuan_ex_configure = --silent --enable-static
gpg4win_pkg_libpng_configure = HAVE_SOLARIS_LD_FALSE=yes CPPFLAGS=\"-I$(idir)/include -DPNG_BUILD_DLL\" LDFLAGS=\"-L$(idir)/lib\" LIBPNG_DEFINES=\"-DPNG_BUILD_DLL\"
# We would like to use --with-libiconv-prefix and
# --with-libintl-prefix, but these don't work with the cheesy
# non-"libfoo.la" versions of iconv and gettext that we are using.
gpg4win_pkg_pinentry_configure = \
--enable-pinentry-qt \
$(pinentry_enable_disable) \
--disable-pinentry-fltk \
--enable-pinentry-gtk2 \
CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib
# --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir)
# The LDFLAGS is needed for -lintl for glib. The QT4 variables work
# around the lack of cross compilation support in qt-dev.
gpg4win_pkg_gpgme_configure = --silent \
--with-gpg-error-prefix=$(idir) --enable-static \
`test -n "@HAVE_PKG_GLIB@" && echo "--enable-w32-glib"` \
CFLAGS=-I$(idir)/include/glib-2.0/ \
LDFLAGS=-L$(idir)/lib \
--enable-languages=qt,cpp \
--disable-gpg-test \
--disable-gpgsm-test
gpg4win_pkg_gpgme_ex_configure = --silent \
--with-gpg-error-prefix=$(ex_idir) --enable-static \
--with-libassuan-prefix=$(ex_idir) \
LDFLAGS=-L$(ex_idir)/lib \
--enable-languages=cpp \
--disable-gpg-test \
--disable-gpgsm-test
gpg4win_pkg_gpa_configure = --silent \
--with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir) \
--with-gpgme-prefix=$(idir) --with-zlib=$(idir) \
--with-libassuan-prefix=$(idir) --with-gpg-error-prefix=$(idir)
gpg4win_pkg_gpgol_configure = --silent \
--with-gpgme-prefix=$(idir) --with-gpg-error-prefix=$(idir) \
--with-libassuan-prefix=$(idir) --enable-mime-send
gpg4win_pkg_gpgol_ex_configure = --silent \
--with-gpgme-prefix=$(ex_idir) --with-gpg-error-prefix=$(ex_idir) \
--with-libassuan-prefix=$(ex_idir) --enable-mime-send
gpg4win_pkg_gpgex_configure = --silent \
--with-gpg-error-prefix=$(idir) \
--with-libassuan-prefix=$(idir)
gpg4win_pkg_gpgex_ex_configure = --silent \
--with-gpg-error-prefix=$(ex_idir) \
--with-libassuan-prefix=$(ex_idir)
gpg4win_pkg_paperkey_configure = --silent
gpg4win_pkg_ki18n_configure = -DBUILD_WITH_QML=OFF
gpg4win_pkg_kconfig_configure = -DKCONFIG_USE_DBUS=OFF
gpg4win_pkg_qtbase_configure = ../$$$${pkg_version}/configure -opensource \
-confirm-license \
-xplatform win32-g++ \
-device-option CROSS_COMPILE=$(host)- \
-device-option PKG_CONFIG='$(host)-pkg-config' \
-no-use-gold-linker \
-release \
-shared \
-prefix $$$${pkgidir} \
-I '$(idir)/include' \
-L '$(idir)/lib' \
-no-icu \
-opengl desktop \
-no-glib \
-accessibility \
-nomake examples \
-nomake tests \
-no-sql-mysql \
-no-sql-sqlite \
-no-sql-odbc \
-no-sql-psql \
-no-sql-tds \
-qt-zlib \
-qt-libpng \
-qt-libjpeg \
-qt-freetype \
-qt-pcre \
-no-openssl \
-no-dbus \
-v
# qtbase
# invoke qmake with removed debug options as a workaround for
# https://bugreports.qt-project.org/browse/QTBUG-30898
gpg4win_pkg_qtbase_make_args = \
QMAKE='$$$${pkgbdir}/bin/qmake'
# Qmake still writes debug names in pkgconfig files.
define gpg4win_pkg_qtbase_post_install
(cd $$$${pkgbdir}; \
make install;)
endef
gpg4win_pkg_qttools_configure = \
"$(idir)/bin/qmake" ../$$$${pkg_version}
define gpg4win_pkg_qttools_post_install
(cd $$$${pkgbdir}; \
mkdir -p $$$${pkgidir}; \
cp -r bin lib include $$$${pkgidir})
endef
# Qmake does not support setting the installation path.
# really https://bugreports.qt.io/browse/QTBUG-12341
gpg4win_pkg_qtwinextras_configure = \
"$(idir)/bin/qmake" ../$$$${pkg_version}
define gpg4win_pkg_qtwinextras_post_install
(cd $$$${pkgbdir}; \
mkdir -p $$$${pkgidir}/bin; \
cp -r lib include $$$${pkgidir}; \
mv $$$${pkgidir}/lib/*.dll $$$${pkgidir}/bin;)
endef
gpg4win_pkg_qtsvg_configure = \
"$(idir)/bin/qmake" ../$$$${pkg_version}
# XXX Adding the qtconf after qtsvg is a weird hack
# because somhow (yay qmake) zlib is not linked if
# the qt conf exists before that. The qt conf is
# needed for qttranslations to find the correct path
# of the translation tools.
define gpg4win_pkg_qtsvg_post_install
(cd $$$${pkgbdir}; \
mkdir -p $$$${pkgidir}; \
cp -r lib include plugins $$$${pkgidir}; \
mkdir -p $$$${pkgidir}/bin; \
mv $$$${pkgidir}/lib/*.dll $$$${pkgidir}/bin; \
echo "[Paths]" > $$$${pkgidir}/bin/qt.conf; \
echo "Prefix = .." >> $$$${pkgidir}/bin/qt.conf)
endef
gpg4win_pkg_qttranslations_configure = \
"$(idir)/bin/qmake" ../$$$${pkg_version}
define gpg4win_pkg_qttranslations_post_install
( rm -fR $$$${pkgidir}/qttranslations; \
mkdir -p $$$${pkgidir}; \
cp -r $$$${pkgbdir}/translations $$$${pkgidir}/qttranslations;)
endef
gpg4win_pkg_kleopatra_configure = \
-DFORCE_DISABLE_KCMUTILS=ON \
-DDISABLE_KWATCHGNUPG=ON \
-DRELEASE_SERVICE_VERSION=Gpg4win-$(VERSION)
gpg4win_pkg_kxmlgui_configure = \
-DFORCE_DISABLE_KGLOBALACCEL=ON \
-DFORCE_DISABLE_DBUS=ON \
-DXMLGUI_COMPILER_VERSION="i686-w64-mingw32-gcc" \
-DXMLGUI_DISTRIBUTION_TEXT="Gpg4win"
gpg4win_pkg_breeze_icons_configure = \
-DBINARY_ICONS_RESOURCE=OFF
# Supported make-only source packages.
gpg4win_mpkgs = bzip2 zlib
# Extra options for the make invocations for individual packages.
# make_flags is used for building, make_args_inst is used for installing.
gpg4win_pkg_bzip2_make_args = \
CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
gpg4win_pkg_bzip2_make_args_inst = \
PREFIX=$$$${pkgidir} CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
gpg4win_pkg_zlib_make_args = \
-fwin32/Makefile.gcc PREFIX=$(host)- IMPLIB=libz.dll.a
gpg4win_pkg_zlib_make_args_inst = -fwin32/Makefile.gcc install \
BINARY_PATH=$$$${pkgidir}/bin INCLUDE_PATH=$$$${pkgidir}/include \
LIBRARY_PATH=$$$${pkgidir}/lib SHARED_MODE=1 IMPLIB=libz.dll.a
# Supported binary packages.
gpg4win_bpkgs = pkgconfig pango expat freetype fontconfig \
cairo atk gnupg-w32 kde-l10n
# libiconv needs some special magic to generate a usable import
# library.
# define gpg4win_pkg_libiconv_post_install
# (cp $(srcdir)/libiconv.def $$$${pkgidir}/lib; \
# cd $$$${pkgidir}/lib; \
# $(DLLTOOL) --output-lib libiconv.dll.a --def libiconv.def)
# endef
# libiconv needs some special magic to generate a usable import
# library. Note that we include some internal symbols that are not
# actually part of the DLL. They are needed by the AM_GNU_GETTEXT
# configure test, but not used otherwise.
# define gpg4win_pkg_gettext_post_install
# (cp $(srcdir)/libintl.def $$$${pkgidir}/lib; \
# cd $$$${pkgidir}/lib; \
# $(DLLTOOL) --output-lib libintl.dll.a --def libintl.def)
# endef
# Zlib needs some special magic to generate a libtool file.
# We also install the pc file here.
define gpg4win_pkg_zlib_post_install
(mkdir $$$${pkgidir}/lib/pkgconfig || true; \
cp $(abs_srcdir)/zlib.pc $$$${pkgidir}/lib/pkgconfig/; \
cd $$$${pkgidir}; \
echo "# Generated by libtool" > lib/libz.la \
echo "dlname='../bin/zlib1.dll'" >> lib/libz.la; \
echo "library_names='libz.dll.a'" >> lib/libz.la; \
echo "old_library='libz.a'" >> lib/libz.la; \
echo "dependency_libs=''" >> lib/libz.la; \
echo "current=1" >> lib/libz.la; \
echo "age=2" >> lib/libz.la; \
echo "revision=5" >> lib/libz.la; \
echo "installed=yes" >> lib/libz.la; \
echo "shouldnotlink=no" >> lib/libz.la; \
echo "dlopen=''" >> lib/libz.la; \
echo "dlpreopen=''" >> lib/libz.la; \
echo "libdir=\"$$$${pkgidir}/lib\"" >> lib/libz.la)
endef
# We need to fix the prefix in the various packages using pkgconfig,
# or we can't substitute it properly in our pkg-config wrapper.
# glib also installs an empty charset.alias for mingw which creates
# a stow conflict with the one from iconv.
define gpg4win_pkg_glib_post_install
(cd $$$${pkgidir}; \
perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`; \
rm $$$${pkgidir}/lib/charset.alias)
endef
define gpg4win_pkg_libffi_post_install
(cd $$$${pkgidir}; \
perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
endef
define gpg4win_pkg_gdk_pixbuf_post_install
(cd $$$${pkgidir}; \
perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
endef
define gpg4win_pkg_atk_post_install
(cd $$$${pkgidir_dev}; \
perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
endef
define gpg4win_pkg_freetype_post_install
(cd $$$${pkgidir_dev}; \
perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
endef
define gpg4win_pkg_fontconfig_post_install
(cd $$$${pkgidir_dev}; \
perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
endef
define gpg4win_pkg_cairo_post_install
(cd $$$${pkgidir_dev}; \
perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
endef
define gpg4win_pkg_pango_post_install
(cd $$$${pkgidir_dev}; \
perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
endef
define gpg4win_pkg_libpng_post_install
(cd $$$${pkgidir}; \
perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
endef
# We don't use khelpcenter in kleopatra so remove the help links and
# point to the correct common folder
# TODO Needs to be fixed with current doc
#define gpg4win_pkg_kleopatra_post_install
# (for i in de en ; do \
# (cd $$$${pkgidir}/share/doc/HTML/$$$${i}; \
# perl -pi -e 's/help:\///g' `find . -name \*.html`; \
# perl -pi -e 's@common/@../../common/@g' `find . -name \*.html`); \
# done)
#endef
#define gpg4win_pkg_libiconv_post_install
#(cp $(srcdir)/libiconv.def $$$${pkgidir}/lib; \
#cd $$$${pkgidir}/lib; \
#$(DLLTOOL) --output-lib libiconv.dll.a --def libiconv.def)
#endef
# Supported internal packages. Internal packages do not require any
# special support. Thus, this variable is actually unused, and no
# rules are added in gpg4win.mk.
gpg4win_ipkgs = man_novice_de man_advanced_de man_novice_en man_advanced_en \
compendium
# Default to same version.
VSD_VERSION=$(VERSION)
# Include installer targets for customized packages
-include gnupg-vsd/custom.mk
# Signging host/key setup for codesigning
-include gnupg-vsd/sign.mk
stamps/stamp-msi-base: playground/install/gpg4win-$(VERSION).wixlib \
shield.ico Makefile.am \
$(top_srcdir)/doc/logo/gpg4win-msi*.bmp \
$(top_srcdir)/po/gpg4win-de.wxl \
$(top_srcdir)/po/gpg4win-en.wxl
ssh $(WINHOST) "mkdir AppData\\Local\\Temp\\gpg4win-$(VERSION)" || true
scp $(idir)/gpg4win-$(VERSION).wixlib $(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)
scp $(top_srcdir)/packages/gnupg-msi-$(gpg4win_pkg_gnupg_msi_version)-bin.wixlib \
$(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION);
scp $(top_srcdir)/src/shield.ico $(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)
scp $(top_srcdir)/doc/logo/gpg4win-msi-header_install-493x58.bmp \
$(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)/header.bmp
scp $(top_srcdir)/doc/logo/gpg4win-msi-wizard_install-493x312.bmp \
$(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)/dialog.bmp
scp $(top_srcdir)/doc/logo/gpg4win-msi-wizard_install-493x312.bmp \
$(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)/dialog.bmp
scp $(top_srcdir)/doc/logo/gpg4win-msi-wizard_install-info-32x32.bmp \
$(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)/info.bmp
scp $(top_srcdir)/doc/logo/gpg4win-msi-wizard_install-exclamation-32x32.bmp \
$(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)/exclamation.bmp
scp $(top_srcdir)/po/gpg4win-en.wxl $(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)
scp $(top_srcdir)/po/gpg4win-de.wxl $(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)
scp WixUI_Gpg4win.wxs $(WINHOST):AppData/Local/Temp/gpg4win-$(VERSION)
touch stamps/stamp-msi-base
# Now do the bunch of the work. This is a bunch of dirty magic to
# integrate our special makefile into automake, while not actually
# including it (make should include it). This is in turn necessary
# because automake can't deal with the elegant magic in the actual
# Makefile.
define INCLUDE_BY_MAKE
include $(1)
endef
+if BUILD_GPG4WIN
$(eval $(call INCLUDE_BY_MAKE,gpg4win.mk))
+endif
clean-local: clean-gpg4win
common_nsi = inst-sections.nsi installer.nsi installer-finish.nsi \
$(addsuffix .nsi,$(addprefix inst-,$(gpg4win_build_list))) \
$(addsuffix .nsi,$(addprefix uninst-,$(gpg4win_build_list)))
# Sign additional files as per signing setup
# This is a bit of a hack.
stamps/stamp-additional-signedfiles:
(set -e;\
cd "$(idir)"; \
for f in $(AUTHENTICODE_FILES); do \
if [ -f "$$f" ]; then \
$(call AUTHENTICODE_sign,"$$f","$$f");\
else \
echo "speedo: WARNING: file '$$f' not available for signing";\
fi;\
done \
)
touch stamps/stamp-additional-signedfiles
playground/install/gpg4win-$(VERSION).wixlib: \
gpg4win-$(VERSION).wxs stamps/stamp-final \
$(foosum_exe) \
$(README_files) $(HOWTO_files) \
license.blurb versioninfo.txt \
WixUI_Gpg4win.wxs \
stamps/stamp-additional-signedfiles
($(call SETVARS_WINE_TWO_DOLLAR,); \
echo "Gpg4win" > $(srcdir)/playground/VERSION; \
echo "$(VERSION)" >> $(srcdir)/playground/VERSION; \
(ln -s $(idir) $$WINEINST; \
ln -s $(ex_idir) $$WINEINSTEX; \
ln -s `readlink -f $(top_srcdir)` $$WINESRC; \
$(WINE) $$WIXPREFIX2/candle.exe \
-dInstDir=k: \
-dInstDirEx=j: \
-dSrcDir=i:\\src \
-dVersion=$$MSI_VERSION \
-out k:\\gpg4win-$(VERSION).wixobj \
-pedantic -wx i:\\src\\gpg4win-$(VERSION).wxs \
-arch x64 || exit 1;\
$(WINE) $$WIXPREFIX2/candle.exe \
-dInstDir=k: \
-dInstDirEx=j: \
-dSrcDir=i:\\src \
-dVersion=$$MSI_VERSION \
-out k:\\gpg4win-ui.wixobj \
-arch x64 \
-pedantic -wx i:\\src\\WixUI_Gpg4win.wxs || exit 1;\
\
$(WINE) $$WIXPREFIX2/lit.exe \
-out k:\\gpg4win-$(VERSION).wixlib \
-bf \
-wx \
-pedantic \
k:\\gpg4win-$(VERSION).wixobj k:\\gpg4win-ui.wixobj || exit 1; \
\
) || ERR=1; (rm $$WINEINST; rm $$WINESRC; rm $$WINEINSTEX); \
if [ -n "$$ERR" ]; then \
exit 1; \
fi)
playground/install/gpg4win-$(VERSION)-x86.wixlib: \
gpg4win-$(VERSION).wxs stamps/stamp-final \
$(foosum_exe) \
$(README_files) $(HOWTO_files) \
license.blurb versioninfo.txt \
WixUI_Gpg4win.wxs \
stamps/stamp-additional-signedfiles
($(call SETVARS_WINE_TWO_DOLLAR,); \
echo "Gpg4win" > $(srcdir)/playground/VERSION; \
echo "$(VERSION)" >> $(srcdir)/playground/VERSION; \
(ln -s $(idir) $$WINEINST; \
ln -s $(ex_idir) $$WINEINSTEX; \
ln -s `readlink -f $(top_srcdir)` $$WINESRC; \
$(WINE) $$WIXPREFIX2/candle.exe \
-dInstDir=k: \
-dInstDirEx=j: \
-dSrcDir=i:\\src \
-dVersion=$$MSI_VERSION \
-arch x86 \
-out k:\\gpg4win-$(VERSION)-x86.wixobj \
-pedantic -wx i:\\src\\gpg4win-$(VERSION).wxs || exit 1;\
$(WINE) $$WIXPREFIX2/candle.exe \
-dInstDir=k: \
-dInstDirEx=j: \
-dSrcDir=i:\\src \
-dVersion=$$MSI_VERSION \
-arch x86 \
-out k:\\gpg4win-ui-x86.wixobj \
-pedantic -wx i:\\src\\WixUI_Gpg4win.wxs || exit 1;\
\
$(WINE) $$WIXPREFIX2/lit.exe \
-out k:\\gpg4win-$(VERSION)-x86.wixlib \
-bf \
-wx \
-pedantic \
k:\\gpg4win-$(VERSION)-x86.wixobj k:\\gpg4win-ui-x86.wixobj || exit 1; \
\
) || ERR=1; (rm $$WINEINST; rm $$WINESRC; rm $$WINEINSTEX); \
if [ -n "$$ERR" ]; then \
exit 1; \
fi)
gpg4win-$(VERSION).wxs: gpg4win.nsi $(common_nsi) stamps/stamp-final \
$(foosum_exe) gpgwrap.exe \
$(README_files) $(HOWTO_files) \
versioninfo.txt make-msi.pl \
$(addsuffix /VERSION.sig,$(addprefix gnupg-vsd/,$(msi_targets)))
perl make-msi.pl --guids $(srcdir)/make-msi.guids \
--manifest gpg4win-$(VERSION).files \
--version $(VSD_VERSION) \
-DBUILD_DIR=. -DTOP_SRCDIR=$(top_srcdir) \
-DSRCDIR=$(srcdir) $(srcdir)/gpg4win.nsi > $@
# Prepare the versioninfo file. The pipeline extracts the last
# occurrence of a package with the same name, sorts the entries and
# writes the file with DOS line endings. This helps to avoid
# duplicate entries in case one package has been rebuild (which is
# common when developing a new version).
versioninfo.txt:
$(SHA1SUM) $(pkg_files) versioninfo.tmp
set -e; \
( while read a b; do echo "$$a $$(basename $$b)"; \
done < versioninfo.tmp \
| sort -k2 -sf | tac | uniq -f1 ; \
echo '=========== SHA-1 checksum ============= == package ==' \
) | tac | awk '{printf "%s\r\n", $$0}' > versioninfo.txt
-rm versioninfo.tmp
NEWS.tmp : $(top_srcdir)/NEWS
awk '/^#/ {next} /^\(de\)/ {skip=1;next} /^[^[:space:]]/ {skip=0} \
!skip { sub(/^\(en\)/," *"); print }' \
<$(top_srcdir)/NEWS >NEWS.tmp
NEWS.de : $(top_srcdir)/NEWS
awk '/^#/ {next} /^\(en\)/ {skip=1;next} /^[^[:space:]]/ {skip=0} \
!skip { sub(/^\(de\)/,"-"); print }' \
<$(top_srcdir)/NEWS >NEWS.de; \
sed -i 's/^ / /' NEWS.de
NEWS.en : $(top_srcdir)/NEWS
awk '/^#/ {next} /^\(de\)/ {skip=1;next} /^[^[:space:]]/ {skip=0} \
!skip { sub(/^\(en\)/,"-"); print }' \
<$(top_srcdir)/NEWS >NEWS.en; \
sed -i 's/^ / /' NEWS.en
COMPONENTS-list.tmp : $(top_srcdir)/NEWS
awk '/^~~~~~~~~~~~/ { ok++; next} ok==1 {print " "$$0}' \
< $(top_srcdir)/NEWS > COMPONENTS-list.tmp
# For some nut-crazy reason someone thought it would be a great idea
# if makensis changed to the directory of the source file at startup.
# So we have to pull a couple of strings to correct this.
installers/gpg4win-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
g4wihelp.dll gpgwrap.exe \
$(foosum_exe) \
$(README_files) $(HOWTO_files) \
license.blurb versioninfo.txt
$(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \
-DSRCDIR=$(srcdir) $(EXTRA_MAKENSIS_FLAGS) $(srcdir)/gpg4win.nsi && \
mv gpg4win-$(VERSION).exe installers/gpg4win-$(VERSION).exe
stamps/stamp-dist-self: versioninfo.txt
(set -e; cd ..; make dist-bzip2)
touch stamps/stamp-dist-self
installers/gpg4win-src-$(VERSION).exe: gpg4win-src.nsi $(common_nsii) \
stamps/stamp-final \
stamps/stamp-dist-self \
license.blurb
$(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \
-DSRCDIR=$(srcdir) $(EXTRA_MAKENSIS_FLAGS) $(srcdir)/gpg4win-src.nsi && \
mv gpg4win-src-$(VERSION).exe installers/gpg4win-src-$(VERSION).exe
license.blurb: $(top_srcdir)/doc/license-page $(top_srcdir)/doc/GPLv3
cat $(top_srcdir)/doc/license-page $(top_srcdir)/doc/GPLv3 >$@
g4wihelp.dll: slideshow.cpp desktopshellrun.cpp g4wihelp.c exdll.h
$(CC) -static-libgcc -I. -O2 -c -o desktopshellrun.o $(srcdir)/desktopshellrun.cpp
$(CC) -static-libgcc -I. -O2 -c -o slideshow.o $(srcdir)/slideshow.cpp
$(CC) -static-libgcc -I. -shared -O2 -o g4wihelp.dll $(srcdir)/g4wihelp.c \
desktopshellrun.o slideshow.o -lwinmm -lgdi32 -luserenv -lshell32 \
-lole32 -loleaut32 -lshlwapi -lmsimg32
$(STRIP) g4wihelp.dll
gpgwrap.exe: gpgwrap.c
$(CC) -I. -I.. -DHAVE_CONFIG_H -O2 -Wl,-subsystem,windows -o $@ $^
$(STRIP) $@
sha1sum.exe: sha1sum.c
$(CC) -O2 -o $@ $^
$(STRIP) $@
md5sum.exe: sha1sum.c
$(CC) -DBUILD_MD5SUM -O2 -o $@ $^
$(STRIP) $@
sha256sum.exe: sha1sum.c
$(CC) -DBUILD_SHA256SUM -O2 -o $@ $^
$(STRIP) $@
mkportable.exe: mkportable.c \
mkportable-vanilla.h mkportable-full.h
$(CC) -O2 -o $@ $(srcdir)/mkportable.c
$(STRIP) $@
+if BUILD_GPG4WIN
all_full = installers/gpg4win-$(VERSION).exe
+endif
all-local: $(all_full) $(all_src)
@echo "###################################################"
@echo " Gpg4win $(VERSION) successfully build!"
@echo " Installers can be found under src/installers"
@echo "###################################################"
clean-local:
rm -f installers/gpg4win-$(VERSION).exe \
installers/GnuPG-VS-Desktop-$(VERSION).msi
diff --git a/src/appimage/Makefile.am b/src/appimage/Makefile.am
new file mode 100644
index 00000000..b3236874
--- /dev/null
+++ b/src/appimage/Makefile.am
@@ -0,0 +1,181 @@
+# Makefile.am - Makefile for building AppImage of Kleopatra
+# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2021 g10 Code GmbH
+#
+# Software engineering by Ingo Klöcker
+#
+# 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 .
+#
+# SPDX-License-Identifier: GPL-2.0+
+
+#EXTRA_DIST =
+
+root := /build
+stampdir := $(root)/stamps
+
+# Source packages for the AppImage
+appimage_spkgs = sqlite libgpg-error libassuan npth libgcrypt libksba gnupg \
+ pinentry gpgme paperkey
+
+# Qt packages for the AppImage
+appimage_qtpkgs = qtbase qttools qtx11extras qtwayland qtsvg qttranslations
+
+# KDE packages for the AppImage
+appimage_kdepkgs = kconfig kwidgetsaddons ki18n extra-cmake-modules \
+ kcompletion kwindowsystem kcoreaddons libkleo kcodecs \
+ kmime kconfigwidgets kxmlgui kguiaddons kitemviews \
+ kiconthemes kleopatra breeze-icons kitemmodels karchive \
+ kcrash kdbusaddons
+
+# Binary packages for the AppImage
+#appimage_bpkgs = kde-l10n
+
+appimage_pkg_gpgme_configure = --enable-languages=cpp,qt \
+ --disable-gpg-test \
+ --disable-gpgsm-test
+
+# TODO: Disable Qt Sql?
+# TODO: Disable Qt Testlib?
+appimage_pkg_qtbase_configure = ../$$$${pkg_version}/configure -opensource \
+ -confirm-license \
+ -platform linux-g++ \
+ -release \
+ -shared \
+ -prefix $$$${pkgidir} \
+ -I '$(idir)/include' \
+ -L '$(idir)/lib' \
+ -opengl desktop \
+ -no-glib \
+ -accessibility \
+ -nomake examples \
+ -nomake tests \
+ -no-sql-mysql \
+ -no-sql-sqlite \
+ -no-sql-odbc \
+ -no-sql-psql \
+ -no-sql-tds \
+ -v \
+ OPENSSL_INCDIR=/usr/include/openssl11
+
+define appimage_pkg_qtbase_post_install
+ (cd $$$${pkgbdir}; \
+ make install;)
+endef
+
+appimage_pkg_qttools_configure = \
+ "$(idir)/bin/qmake" ../$$$${pkg_version}
+
+define appimage_pkg_qttools_post_install
+ (cd $$$${pkgbdir}; \
+ mkdir -p $$$${pkgidir}; \
+ cp -r bin lib include $$$${pkgidir})
+endef
+
+appimage_pkg_qtx11extras_configure = \
+ "$(idir)/bin/qmake" ../$$$${pkg_version}
+
+define appimage_pkg_qtx11extras_post_install
+ (cd $$$${pkgbdir}; \
+ mkdir -p $$$${pkginstallroot}; \
+ make install INSTALL_ROOT=$$$${pkginstallroot}; \
+ mkdir -p $$$${pkgidir}; \
+ mv $$$${pkgbladir}/* $$$${pkgidir}; \
+ rm -rf $$$${pkginstallroot};)
+endef
+
+appimage_pkg_qtwayland_configure = \
+ "$(idir)/bin/qmake" ../$$$${pkg_version}
+
+define appimage_pkg_qtwayland_post_install
+ (cd $$$${pkgbdir}; \
+ mkdir -p $$$${pkginstallroot}; \
+ make install INSTALL_ROOT=$$$${pkginstallroot}; \
+ mkdir -p $$$${pkgidir}; \
+ mv $$$${pkgbladir}/* $$$${pkgidir}; \
+ rm -rf $$$${pkginstallroot};)
+endef
+
+appimage_pkg_qtsvg_configure = \
+ "$(idir)/bin/qmake" ../$$$${pkg_version}
+
+# XXX Adding the qtconf after qtsvg is a weird hack
+# because somhow (yay qmake) zlib is not linked if
+# the qt conf exists before that. The qt conf is
+# needed for qttranslations to find the correct path
+# of the translation tools.
+define appimage_pkg_qtsvg_post_install
+ (cd $$$${pkgbdir}; \
+ mkdir -p $$$${pkgidir}; \
+ cp -r lib include plugins $$$${pkgidir}; \
+ mkdir -p $$$${pkgidir}/bin; \
+ echo "[Paths]" > $$$${pkgidir}/bin/qt.conf; \
+ echo "Prefix = .." >> $$$${pkgidir}/bin/qt.conf)
+endef
+
+appimage_pkg_qttranslations_configure = \
+ "$(idir)/bin/qmake" ../$$$${pkg_version}
+
+define appimage_pkg_qttranslations_post_install
+ ( rm -rf $$$${pkgidir}/qttranslations; \
+ mkdir -p $$$${pkgidir}; \
+ cp -r $$$${pkgbdir}/translations $$$${pkgidir}/qttranslations;)
+endef
+
+appimage_pkg_ki18n_configure = -DBUILD_WITH_QML=OFF
+
+appimage_pkg_libkleo_configure = \
+ -DBOOST_INCLUDEDIR=/usr/include/boost169 \
+ -DBOOST_LIBRARYDIR=/usr/lib64/boost169
+
+gpg4win_pkg_kleopatra_configure = \
+ -DFORCE_DISABLE_KCMUTILS=ON \
+ -DDISABLE_KWATCHGNUPG=ON \
+ -DRELEASE_SERVICE_VERSION=Gpg4win-$(VERSION)
+
+appimage_pkg_kleopatra_configure = \
+ -DBOOST_INCLUDEDIR=/usr/include/boost169 \
+ -DBOOST_LIBRARYDIR=/usr/lib64/boost169 \
+ -DDISABLE_KWATCHGNUPG=ON \
+ -DRELEASE_SERVICE_VERSION=Gpg4win-$(VERSION)
+
+# FIXME: Uses spaces in distribution text
+appimage_pkg_kxmlgui_configure = \
+ -DFORCE_DISABLE_KGLOBALACCEL=ON \
+ -DXMLGUI_DISTRIBUTION_TEXT=g10_Code_GmbH_AppImage
+
+########################################################################
+
+# Now do the bunch of the work. This is a bunch of dirty magic to
+# integrate our special makefile into automake, while not actually
+# including it (make should include it). This is in turn necessary
+# because automake can't deal with the elegant magic in the actual
+# Makefile.
+
+define INCLUDE_BY_MAKE
+include $(1)
+endef
+
+$(eval $(call INCLUDE_BY_MAKE,appimage.mk))
+
+clean-local: clean-appimage
+
+license.blurb: $(top_srcdir)/doc/license-page $(top_srcdir)/doc/GPLv3
+ cat $(top_srcdir)/doc/license-page $(top_srcdir)/doc/GPLv3 >$@
+
+all-local: $(stampdir)/stamp-final
+ @echo "###################################################"
+ @echo " AppImage $(VERSION) successfully build!"
+ @echo " The AppImage can be found under src/installers"
+ @echo "###################################################"
diff --git a/src/appimage/appimage.mk.in b/src/appimage/appimage.mk.in
new file mode 100644
index 00000000..dd2ab27f
--- /dev/null
+++ b/src/appimage/appimage.mk.in
@@ -0,0 +1,459 @@
+# appimage.m4.in - Makefile for building AppImage of Kleopatra. -*- makefile -*-
+# Copyright (C) 2005, 2009, 2021 g10 Code GmbH
+#
+# Software engineering by Ingo Klöcker
+#
+# 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 .
+#
+# SPDX-License-Identifier: GPL-2.0+
+
+# No servicable parts below this line :)
+
+# These paths must be absolute, as we switch directories pretty often.
+logdir := $(root)/logs
+bdir := $(root)/build
+appdir := $(root)/AppDir
+idir := $(appdir)/usr
+ipdir := $(root)/install/pkgs
+tsdir := $(shell pwd)/${top_srcdir}
+pdir := $(shell pwd)/${top_srcdir}/patches-appimage
+
+# We collect the names of all pkg files used.
+pkg_files =
+
+# The build area is our scratch area, where we unpack, build and
+# install the packages.
+$(stampdir)/stamp-directories:
+ $(MKDIR) -p $(root)
+ $(MKDIR) -p $(stampdir)
+ $(MKDIR) -p $(logdir)
+ $(MKDIR) -p $(bdir)
+ $(MKDIR) -p $(idir)
+ $(MKDIR) -p $(ipdir)
+ touch $(bdir)/versioninfo.txt
+ touch $(stampdir)/stamp-directories
+
+# 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.
+define SETVARS
+ set -e; \
+ pkg="$(call GETVAR,appimage_pkg_$(1))"; \
+ pkg_version="$(1)-$(call GETVAR,appimage_pkg_$(1)_version)"; \
+ pkglogdir="$(logdir)/$$$${pkg_version}"; \
+ pkgsdir="$(bdir)/$$$${pkg_version}"; \
+ pkgbdir="$(bdir)/$$$${pkg_version}-build"; \
+ pkgpdir="$(pdir)/$$$${pkg_version}"; \
+ pkgpbdir="$(pdir)/$(1)"; \
+ pkgidir="$(ipdir)/$$$${pkg_version}"; \
+ pkginstallroot="/tmp/$$$${pkg_version}"; \
+ pkgbladir="/tmp/$$$${pkg_version}/$(idir)"; \
+ pkg_dev="$(call GETVAR,appimage_pkg_$(1)_dev)"; \
+ pkg_version_dev="$(1)-dev-$(call GETVAR,appimage_pkg_$(1)_version)"; \
+ pkgidir_dev="$(ipdir)/$$$${pkg_version_dev}"; \
+ pkgcfg="$(call GETVAR,appimage_pkg_$(1)_configure)"; \
+ pkgextracflags="$(call GETVAR,appimage_pkg_$(1)_extracflags)"; \
+ pkgmkargs="$(call GETVAR,appimage_pkg_$(1)_make_args)"; \
+ pkgmkargs_inst="$(call GETVAR,appimage_pkg_$(1)_make_args_inst)";\
+ pkgmkdir="$(call GETVAR,appimage_pkg_$(1)_make_dir)"; \
+ pkgmkdir_inst="$(call GETVAR,appimage_pkg_$(1)_make_dir)"; \
+ export PKG_CONFIG_PATH="$(idir)/lib/pkgconfig"; \
+ export PATH="$(idir)/bin:$${PATH}"
+endef
+
+# Support macro. Unpack the archive $(1).
+define DEFLATE_macro
+ rm -rf $$$${pkgsdir}; \
+ case "$(1)" in \
+ */qtbase*.*.tar.xz) \
+ $(TAR) -xJ --transform='s,^qtbase-everywhere-src,qtbase,' -f "$(1)" ;; \
+ */qttools*.*.tar.xz) \
+ $(TAR) -xJ --transform='s,^qttools-everywhere-src,qttools,' -f "$(1)" ;; \
+ */qtx11extras*.*.tar.xz) \
+ $(TAR) -xJ --transform='s,^qtx11extras-everywhere-src,qtx11extras,' -f "$(1)" ;; \
+ */qtwayland*.*.tar.xz) \
+ $(TAR) -xJ --transform='s,^qtwayland-everywhere-src,qtwayland,' -f "$(1)" ;; \
+ */qtsvg*.*.tar.xz) \
+ $(TAR) -xJ --transform='s,^qtsvg-everywhere-src,qtsvg,' -f "$(1)" ;; \
+ */qttranslations*.*.tar.xz) \
+ $(TAR) -xJ --transform='s,^qttranslations-everywhere-src,qttranslations,' -f "$(1)" ;; \
+ */sqlite*.*.tar.gz) \
+ $(TAR) -xz --transform='s,^sqlite-autoconf-3270200,sqlite-3.27.2,' -f "$(1)" ;; \
+ *.tar.gz | *.tgz) \
+ $(TAR) xzf "$(1)" ;; \
+ *.tar.bz2 | *.tbz2 | *.tbz) \
+ $(TAR) xjf "$(1)" ;; \
+ *.tar.xz ) \
+ $(TAR) xJf "$(1)" ;; \
+ *.exe ) \
+ cp "$(1)" . ;; \
+ *.zip) \
+ $(UNZIP) -o "$(1)" ;; \
+ esac
+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
+
+define GETDEPS
+ $(addprefix $(stampdir)/stamp-final-, $(call GETVAR,appimage_pkg_$(1)_deps))
+endef
+
+
+# Template for source packages.
+
+define SPKG_template_
+
+pkg_files += $(call GETVAR,appimage_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)); \
+ for pfile in "$$$${pkgpbdir}"/*.patch "$$$${pkgpdir}"/*.patch ; do \
+ (cd "$$$${pkgsdir}"; chmod +x "$$$${pfile}"; "$$$${pfile}") \
+ done)
+ touch $(stampdir)/stamp-$(1)-01-patch
+
+$(stampdir)/stamp-$(1)-02-configure: $(stampdir)/stamp-$(1)-01-patch
+ ($(call SETVARS,$(1)); \
+ set -x; \
+ mkdir -p "$$$${pkglogdir}"; \
+ mkdir -p "$$$${pkgbdir}"; \
+ cd "$$$${pkgbdir}"; \
+ eval "../$$$${pkg_version}/configure" \
+ --prefix="$$$${pkgidir}" \
+ $$$${pkgcfg} \
+ CFLAGS=\"-mms-bitfields $$$${pkgextracflags}\" | \
+ tee "$$$${pkglogdir}/configure.log"; \
+ shopt -s nullglob; \
+ for pfile in "$$$${pkgpbdir}"/*.postcfg \
+ "$$$${pkgpdir}"/*.postcfg ; do \
+ (cd "$$$${pkgsdir}"; "$$$${pfile}") \
+ done; \
+ for pfile in "$$$${pkgpbdir}"/*.postcfg-build \
+ "$$$${pkgpdir}"/*.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 appimage_pkg_$(call FROB_macro,$(1))_post_install))
+ touch $(stampdir)/stamp-$(1)-04-install
+
+$(stampdir)/stamp-$(1)-05-rsync: $(stampdir)/stamp-$(1)-04-install
+ ($(call SETVARS,$(1)); \
+ set -x; \
+ $(RSYNC) -a --link-dest="$$$${pkgidir}/" "$$$${pkgidir}/" "$(idir)/" )
+ touch $(stampdir)/stamp-$(1)-05-rsync
+
+$(stampdir)/stamp-final-$(1): $(stampdir)/stamp-$(1)-05-rsync
+ touch $(stampdir)/stamp-final-$(1)
+
+.PHONY : clean-$(1)
+clean-$(1):
+ ($(call SETVARS,$(1)); \
+ (cd $(ipdir) && \
+ (rm -fR "$$$${pkg_version}")); \
+ rm -fR "$$$${pkgsdir}" "$$$${pkgbdir}")
+ rm -f $(stampdir)/stamp-final-$(1) $(stampdir)/stamp-$(1)-*
+
+endef
+
+define SPKG_template
+$(if $(filter-out no, $(call GETVAR,appimage_pkg_$(1))),
+ $(call SPKG_template_,$1))
+endef
+
+
+# Template for binary packages.
+
+define BPKG_template_
+
+pkg_files += $(call GETVAR,appimage_pkg_$(1))
+pkg_files += $(call GETVAR,appimage_pkg_$(1)_dev)
+
+$(stampdir)/stamp-$(1)-00-install: $(stampdir)/stamp-directories $(call GETDEPS,$(1))
+ ($(call SETVARS,$(1)); \
+ $(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)); \
+ $(MKDIR) "$$$${pkgidir_dev}"; \
+ (cd $$$${pkgidir_dev}; \
+ $(call DEFLATE_macro,$$$${pkg_dev})); \
+ $(call appimage_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)
+
+.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)-*
+
+endef
+
+define BPKG_template
+$(if $(filter-out no, $(call GETVAR,appimage_pkg_$(1))),
+ $(call BPKG_template_,$1))
+endef
+
+
+# Template for Qt packages.
+
+define QTPKG_template_
+
+pkg_files += $(call GETVAR,appimage_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)); \
+ for pfile in "$$$${pkgpbdir}"/*.patch "$$$${pkgpdir}"/*.patch ; do \
+ (cd "$$$${pkgsdir}"; chmod +x "$$$${pfile}"; "$$$${pfile}") \
+ done)
+ touch $(stampdir)/stamp-$(1)-01-patch
+
+$(stampdir)/stamp-$(1)-02-configure: $(stampdir)/stamp-$(1)-01-patch
+ ($(call SETVARS,$(1)); \
+ set -x; \
+ mkdir -p "$$$${pkglogdir}"; \
+ mkdir -p "$$$${pkgbdir}"; \
+ cd "$$$${pkgbdir}"; \
+ $$$${pkgcfg} | \
+ tee "$$$${pkglogdir}/configure.log") && \
+ 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}"; \
+ export LD_LIBRARY_PATH=$(idir)/lib; \
+ $(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)); \
+ set -x; \
+ $(call appimage_pkg_$(call FROB_macro,$(1))_post_install))
+ touch $(stampdir)/stamp-$(1)-04-install
+
+$(stampdir)/stamp-$(1)-05-rsync: $(stampdir)/stamp-$(1)-04-install
+ ($(call SETVARS,$(1)); \
+ set -x; \
+ $(RSYNC) -a --link-dest="$$$${pkgidir}/" "$$$${pkgidir}/" "$(idir)/" )
+ touch $(stampdir)/stamp-$(1)-05-rsync
+
+$(stampdir)/stamp-final-$(1): $(stampdir)/stamp-$(1)-05-rsync
+ touch $(stampdir)/stamp-final-$(1)
+
+.PHONY : clean-$(1)
+clean-$(1):
+ ($(call SETVARS,$(1)); \
+ (cd $(ipdir) && \
+ (rm -fR "$$$${pkg_version}")); \
+ rm -fR "$$$${pkgsdir}" "$$$${pkgbdir}")
+ rm -f $(stampdir)/stamp-final-$(1) $(stampdir)/stamp-$(1)-*
+
+endef
+
+define QTPKG_template
+$(if $(filter-out no, $(call GETVAR,appimage_pkg_$(1))),
+ $(call QTPKG_template_,$1))
+endef
+
+
+# Template for KDE packages.
+define KDEPKG_template_
+
+pkg_files += $(call GETVAR,appimage_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)); \
+ cd "$$$${pkgsdir}"; \
+ sed -i 's/set(KF5_MIN_VERSION.*)/set(KF5_MIN_VERSION "5.77.0")/' CMakeLists.txt; \
+ sed -i 's/set(KF5_VERSION.*)/set(KF5_VERSION "5.77.0")/' CMakeLists.txt; \
+ sed -i 's/set(KMIME_VERSION.*)/set(KMIME_VERSION "5.2.40")/' CMakeLists.txt; \
+ sed -i 's/set(LIBKLEO_VERSION.*)/set(LIBKLEO_VERSION "5.4.40")/' CMakeLists.txt; \
+ sed -i 's/set(QT_REQUIRED_VERSION.*)/set(QT_REQUIRED_VERSION "5.15.0")/' CMakeLists.txt; \
+ for pfile in "$$$${pkgpbdir}"/*.patch "$$$${pkgpdir}"/*.patch ; do \
+ (cd "$$$${pkgsdir}"; chmod +x "$$$${pfile}"; "$$$${pfile}") \
+ done)
+ touch $(stampdir)/stamp-$(1)-01-patch
+
+$(stampdir)/stamp-$(1)-02-configure: $(stampdir)/stamp-$(1)-01-patch
+ (set -x; \
+ $(call SETVARS,$(1)); \
+ mkdir -p "$$$${pkglogdir}"; \
+ mkdir -p "$$$${pkgbdir}"; \
+ cd "$$$${pkgbdir}"; \
+ $(CMAKE) \
+ -DCMAKE_INSTALL_PREFIX="$$$${pkgidir}" \
+ -DCMAKE_PREFIX_PATH="$$$${pkgidir}" \
+ -DKDE_INSTALL_DATADIR="$$$${pkgidir}/share" \
+ -DBUILD_TESTING=False \
+ $$$${pkgcfg} $$$${pkgextracflags} "../$$$${pkg_version}" | \
+ tee "$$$${pkglogdir}/configure.log") && \
+ 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}"; \
+ export LD_LIBRARY_PATH=$(idir)/lib; \
+ $(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}"); \
+ $(call appimage_pkg_$(call FROB_macro,$(1))_post_install))
+ touch $(stampdir)/stamp-$(1)-04-install
+
+$(stampdir)/stamp-$(1)-05-rsync: $(stampdir)/stamp-$(1)-04-install
+ ($(call SETVARS,$(1)); \
+ set -x; \
+ $(RSYNC) -a --link-dest="$$$${pkgidir}/" "$$$${pkgidir}/" "$(idir)/" )
+ touch $(stampdir)/stamp-$(1)-05-rsync
+
+$(stampdir)/stamp-final-$(1): $(stampdir)/stamp-$(1)-05-rsync
+ touch $(stampdir)/stamp-final-$(1)
+
+.PHONY : clean-$(1)
+clean-$(1):
+ ($(call SETVARS,$(1)); \
+ (cd $(ipdir) && \
+ (rm -fR "$$$${pkg_version}")); \
+ rm -fR "$$$${pkgsdir}" "$$$${pkgbdir}")
+ rm -f $(stampdir)/stamp-final-$(1) $(stampdir)/stamp-$(1)-*
+
+endef
+
+define KDEPKG_template
+$(if $(filter-out no, $(call GETVAR,appimage_pkg_$(1))),
+ $(call KDEPKG_template_,$1))
+endef
+
+# Insert the template for each source package.
+$(foreach spkg, $(appimage_spkgs), $(eval $(call SPKG_template,$(spkg))))
+
+# Insert the template for each binary package.
+$(foreach bpkg, $(appimage_bpkgs), $(eval $(call BPKG_template,$(bpkg))))
+
+# Insert the template for Qt packages.
+$(foreach qtpkg, $(appimage_qtpkgs), $(eval $(call QTPKG_template,$(qtpkg))))
+
+# Insert the template for KDE packages.
+$(foreach kdepkg, $(appimage_kdepkgs), $(eval $(call KDEPKG_template,$(kdepkg))))
+
+$(stampdir)/stamp-final: $(stampdir)/stamp-directories
+$(stampdir)/stamp-final: $(addprefix $(stampdir)/stamp-final-,$(appimage_build_list))
+ touch $(stampdir)/stamp-final
+
+$(bdir)/versioninfo.txt: $(stampdir)/stamp-final
+ touch $(bdir)/versioninfo.txt
+
+all-appimage: $(stampdir)/stamp-final
+
+# Just to check if we catched all stamps.
+clean-stamps:
+ $(RM) -fR $(stampdir)
+
+clean-appimage:
+ $(RM) -fR $(root) $(stampdir) $(logdir) $(appdir)
+
+.PHONY : all-appimage clean-stamps clean-appimage
+
+# @emacs_local_vars_begin@
+# @emacs_local_vars_read_only@
+# @emacs_local_vars_end@