Page MenuHome GnuPG

No OneTemporary

diff --git a/build.sh b/build.sh
index 24125091..3dd76a4e 100755
--- a/build.sh
+++ b/build.sh
@@ -1,815 +1,815 @@
#!/bin/bash
# Copyright (C) 2024 g10 Code GmbH
#
# Software engineering by Andre Heinecke <aheinecke@gnupg.org>
#
# 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 <https://www.gnu.org/licenses/>.
# SPDX-License-Identifier: GPL-2.0-or-later
set -e
PGM=build.sh
usage()
{
cat <<EOF
Usage: $PGM [OPTIONS]
Build Gpg4win in a docker containter.
Options:
--appimage Build the AppImage instead of the NSIS installer.
--gnupg22 Use GnuPG 2.2
--gnupg24 Use GnuPG 2.4
--gnupg26 Use GnuPG 2.6 (default)
--w32 Use 32 bit Windows as primary host arch
--clean Remove a pre-existing build directory
--dist Create a distributable tarball
--release Create a tarball and then build this tarball
--shell Start a shell instead of starting the build script
--builddir=DIR Directory where the build should take place
(default is ~/b/SRCDIRNAME-playground for gpg4win
and ~/b/SRCDIRNAME-appimage for the AppImage)
--logfile=file Change default build log file to FILE
--force Force configure run
--no-sign Do not authenticode sign packages
--update-image Update the docker image before build
--msi Building MSI packages
--user=name Use NAME as FTP server user
--download Download packages first
--runcmd CMD Run a command via a pair of FIFOs
--git-pkgs Use latest git versions for the frontend
packages:
libkleo kleopatra gpgol gpgol.js
gpgpass gpg4win-tools mimetreeparser
This script is used to build either the Appimage or the Windows
installer. The build is done in a build directory with the suffix
"-playground". Use the option --builddir to use a non-default build
directory. Take care not to use the source directory for building.
Examples:
./$PGM
Build in the default build directory ~/b/SRCDIRNAME-playground
./$PGM --builddir=/foo/bar/my-playground
Build in the given directory.
EOF
exit $1
}
# Other constants
WINE=wine
WINHOST=win10
WINLIGHT=c:/wix/light.exe
# WINEPREFIX - determined at runtime or passed by caller
# WIXPREFIX - determined at runtime or passed by caller
# Store the original script and the command line
# for diagnostic reasons
myself="$0"
commandline="$0 $@"
# Preset variables.
indocker="no"
gnupgtag="gnupg26"
shell="no"
clean="no"
dist="no"
release="no"
branch="master"
srcdir=$(cd $(dirname $0); pwd)
is_tmpbuild="no"
update_image="no"
w64="yes"
download="no"
runcmd="no"
fromgit="no"
withmsi="no"
force=no
nosign=no
ftpuser=
verbose=
logfile=
quiet=
# Get UID for use by docker.
userid=$(id -u)
groupid=$(id -g)
# Track whether we reset the tty to cooked mode. docker sets it to raw mode
# and we set it back via our runner process so that we are sure docker is
# already running.
recooked=
# Parse the command line options.
skipshift=
while [ $# -gt 0 ]; do
case "$1" in
--*=*)
optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
;;
*)
optarg=""
;;
esac
case "$1" in
--appimage) appimage="yes";;
--gnupg22) gnupgtag="gnupg22";;
--gnupg24) gnupgtag="gnupg24";;
--gnupg26) gnupgtag="gnupg26";;
--shell) shell="yes";;
--clean|-c) clean="yes";;
--dist) dist="yes";;
--release) release="yes";;
--update-image|--update-img|-u) update_image="yes";;
--w32) w64="no";;
--w64) w64="yes";;
--force) force="yes";;
--no-sign) nosign="yes" ;;
--download) download="yes";;
--runcmd) runcmd="yes";;
--git|-g|--git-pkgs) fromgit="yes";;
--builddir|--builddir=*) builddir="${optarg}" ;;
--logfile|--logfile=*) logfile="${optarg}" ;;
--user|--user=*) ftpuser="${optarg}" ;;
--msi|--with-msi) withmsi=yes ;;
--verbose|-v) verbose=yes ;;
--*) usage 1 1>&2; exit 1;;
*) skipshift=1; break ;;
esac
[ -z "$skipshift" ] && shift
done
[ -z "$verbose" ] && quiet="--quiet"
if [ -z "$builddir" ]; then
if [ "$release" = "yes" ]; then
builddir="${HOME}/b/$(basename "$srcdir")-mill"
elif [ "$appimage" = "yes" ]; then
builddir="${HOME}/b/$(basename "$srcdir")-appimage"
else
builddir="${HOME}/b/$(basename "$srcdir")-playground"
fi
fi
# Check whether we are running in the docker container.
if [ -d /src/src -a -d /src/patches -a -d /build ]; then
indocker="yes"
srcdir=/src
builddir=/build
echo >&2 "$PGM: running in docker"
fi
echo >&2 "$PGM: source directory: $srcdir"
echo >&2 "$PGM: build directory: $builddir"
# First build a tarball and then build from that tarball
build_from_tarball() {
local milldir
local tarballname
local extraopt
if [ "$indocker" = yes ]; then
echo >&2 "$PGM: error: option --release may not be used from docker"
exit 2
fi
[ -d "${builddir}" ] || mkdir -p "${builddir}"
milldir=$(cd "${builddir}"; pwd)
# Use a common log file in the top directory.
logfile="${milldir}/build-log.txt"
( echo "$PGM: *"
echo "$PGM: * Building release in $milldir"
echo "$PGM: *" ) | tee -a ${logfile} >&2
rm -rf "$milldir/tarball" || true
rm -rf "$milldir/source" || true
rm -rf "$milldir/binary" || true
mkdir "$milldir/tarball"
mkdir "$milldir/source"
mkdir "$milldir/binary"
extraopt="--logfile=$logfile"
[ -n "$verbose" ] && extraopt="$extraopt --verbose"
[ "$download" = yes ] && extraopt="$extraopt --download"
$myself --builddir="$milldir/tarball" --dist $extraopt
if [ $? != 0 ]; then
( echo "$PGM: *"
echo "$PGM: * ERROR: creating tarball failed"
echo "$PGM: *" ) | tee -a ${logfile} >&2
exit 2
fi
tarballname=$(ls "$milldir/tarball/artifacts/"gpg4win*xz)
cd "$milldir/source"
tar --strip-components=1 -xJf "$tarballname"
if [ $? != 0 ]; then
( echo "$PGM: *"
echo "$PGM: * ERROR: failed to extract tarball"
echo "$PGM: *" ) | tee -a ${logfile} >&2
exit 2
fi
extraopt="--logfile=$logfile"
[ -n "$verbose" ] && extraopt="$extraopt --verbose"
[ $withmsi = yes ] && extraopt="$extraopt --msi"
[ $nosign = yes ] && extraopt="$extraopt --no-sign"
$myself --builddir="$milldir/binary" $extraopt
if [ $? != 0 ]; then
( echo "$PGM: *"
echo "$PGM: * ERROR: building release failed"
echo "$PGM: *" ) | tee -a ${logfile} >&2
exit 2
fi
( cd "$milldir/binary/artifacts"
ln -s "$tarballname" . )
( echo "$PGM: *"
echo "$PGM: * READY"
echo "$PGM: *" ) | tee -a ${logfile} >&2
exit 0
}
# The main GUI packages. Check the gen-tarball script to see which
# branches are used.
FRONTEND_PKGS="
libkleo
kleopatra
gpgol
gpgoljs
gpgpass
gpg4win-tools
mimetreeparser"
# Function to download the packages. Optionally generate new tarballs
# for the main GUI components.
download_packages() {
if [ "$indocker" = yes ]; then
echo >&2 "$PGM: error: downloading files from docker is not possible"
exit 2
fi
cd packages
if [ "$fromgit" = yes ]; then
# FIXME: We should check at least the commits from the gpg4win
# repo before doing this. But well, this very scripts is a
# catch22 so that we need to have an external installed test
# script before running this script from an updated repo. Or
# well, we could use us to check our next version.
echo >&2 "$PGM: Creating new tarballs and updating packages file ... "
myargs=
[ -n "$ftpuser" ] && myargs="$myargs --user=$ftpuser"
./gen-tarball.sh $myargs -u $FRONTEND_PKGS
echo >&2 "$PGM: Generating tarballs done"
fi
echo "$PGM: Downloading packages"
./download.sh $quiet --$gnupgtag --update
echo >&2 "$PGM: downloading done"
cd ..
}
# Run a command using the FIFOs. This needs to be called via a FIFO
# from the docker. Note that we don't explicit serialize access to the
# FIFO, hopefully no parallel make rules are run.
if [ "$runcmd" = yes ]; then
if [ "$indocker" != yes ]; then
echo >&2 "$PGM: Option --runcmd must be called from docker"
echo >&2 "$PGM: Available commands are:"
echo >&2 "$PGM: ping - Wait for a pong"
echo >&2 "$PGM: gpg - Run a gpg command"
echo >&2 "$PGM: msibase - Prepare MSI linking"
echo >&2 "$PGM: litcandle - Run candle.exe"
exit 2
fi
# Running in docker
if [ -z "$1" ]; then
echo >&2 "usage: /src/build.sh --runcmd COMMAND ARGS"
exit 2
fi
[ -f /build/S.build.sh-rc ] && rm /build/S.build.sh-rc
echo "$@" >/build/S.build.sh-in
cat /build/S.build.sh-out
while [ ! -f /build/S.build.sh-rc ]; do sleep 0.05; done
rc=$(sed -ne 's/EXITSTATUS=\([0-9]*\).*$/\1/p' \
</build/S.build.sh-rc 2>/dev/null || true)
[ -z "$rc" ] && rc=0
exit $rc
fi
# Check whether we are in the docker image and run appropriate commands.
# Note that this script is used to start the docker container and also
# within the docker container to run the desired commands.
if [ "$indocker" = yes ]; then
# NB: In docker the builddir is always /build and the source /src
cd /build
if [ ! -f config.status ]; then
force=yes
elif [ /src/configure -nt config.status ]; then
force=yes
fi
if [ $force = no ]; then
echo >&2 "$PGM: Not running configure (--force not used)"
elif [ "$w64" = "yes" ]; then
/src/autogen.sh --build-w64
else
/src/autogen.sh --build-w32
fi
export CMAKE_COLOR_DIAGNOSTICS=OFF
if [ $dist = yes ]; then
make dist XZ_OPT=-2 TOPSRCDIR=/src PLAYGROUND=/build
else
make TOPSRCDIR=/src PLAYGROUND=/build
if [ $? = 0 -a $withmsi = yes ]; then
make TOPSRCDIR=/src PLAYGROUND=/build msi
fi
fi
exit $?
fi # (end of script use inside the docker container) #
# Setup for using the Wix tools under Wine if requested.
if [ $withmsi = yes ]; then
if [ -z "$(which $WINE)" ]; then
echo >&2 "$PGM: error: For MSI packaging Wine needs to be installed"
exit 1
fi
[ -z "$WINEPREFIX" ] && WINEPREFIX="$HOME/.wine"
if [ ! -e "$WINEPREFIX/dosdevices" ]; then
echo >&2 "PGM: error: No value for WINEPREFIX found"
exit 1
fi
if [ -z "$WIXPREFIX" ]; then
tmp="$(readlink -f ~/w32root/wixtools)"
if [ -d "$tmp" ]; then
WIXPREFIX="$tmp"
echo >&2 "$PGM: Using $WIXPREFIX as WIXPREFIX"
else
echo >&2 "$PGM: error: You must set WIXPREFIX" \
" to an installation of wixtools"
exit 1
fi
fi
WINEINST="$WINEPREFIX/dosdevices/k:"
WINESRC="$WINEPREFIX/dosdevices/i:"
WINEINSTEX="$WINEPREFIX/dosdevices/j:"
WINEBLD="$WINEPREFIX/dosdevices/l:"
die=no
for f in "$WINEINST" "$WINESRC" "$WINEINSTEX" "$WINEBLD" ; do
if [ -e "$f" -a ! -h "$f" ]; then
echo >&2 "$PGM: error: '$f' already exists. Please remove."
die=yes
fi
done
[ $die = yes ] && exit 1
fi
# Determine the needed docker image
if [ "$appimage" = "yes" ]; then
cmd=/src/src/appimage/build-appimage.sh
docker_image=g10-build-appimage:sles15
dockerfile=${srcdir}/docker/appimage
else
# We will run our self again in the docker image.
if [ "$w64" = "yes" ]; then
cmd="/src/build.sh --w64"
else
cmd="/src/build.sh --w32"
fi
[ $dist = yes ] && cmd="$cmd --dist"
[ $force = yes ] && cmd="$cmd --force"
[ $withmsi = yes -a $shell = no ] && cmd="$cmd --msi"
- docker_image=g10-build-gpg4win:bookworm
- dockerfile=${srcdir}/docker/gpg4win-bookworm
+ docker_image=g10-build-gpg4win:trixie
+ dockerfile=${srcdir}/docker/gpg4win-trixie
fi
# Update the docker image if requested or if it does not exist.
drep=$(echo $docker_image | cut -d : -f 1)
dtag=$(echo $docker_image | cut -d : -f 2)
if [ -z "$(docker images | grep $drep | grep $dtag)" \
-o "$update_image" = "yes" ]; then
echo >&2 "$PGM: Local image $docker_image not found"
echo >&2 "$PGM: Building docker image"
docker build -t $docker_image $dockerfile 2>&1
fi
# Make sure we have a BUILDTYPE file
if [ ! -e packages/BUILDTYPE ]; then
echo >&2 "PGM: packages/BUILDTYPE not found - see README"
exit 1
fi
# If --shell was used override the command for docker.
# if not used try to download first.
if [ "$shell" = "yes" ]; then
cmd="bash"
elif [ "$release" = yes ]; then
build_from_tarball
elif [ "$download" = yes ]; then
download_packages
else
echo >&2 "$PGM: package download skipped"
fi
start_time=$(date +"%s")
[ -z "$logfile" ] && logfile="${builddir}/build-log.txt"
# Kill the given process and all its descendants
killtree() {
local parent=$1 child
for child in $(ps -o ppid= -o pid= | awk "\$1==$parent {print \$2}"); do
killtree $child
done
kill $parent
}
# Remove FIFO files.
remove_fifos() {
[ -e "${builddir}/S.build.sh-in" ] && rm "${builddir}/S.build.sh-in"
[ -e "${builddir}/S.build.sh-out" ] && rm "${builddir}/S.build.sh-out"
return 0
}
# Create FIFO files.
create_fifos() {
remove_fifos
mkfifo -m 600 "${builddir}/S.build.sh-in"
mkfifo -m 600 "${builddir}/S.build.sh-out"
return 0
}
# Make sure we have an absolute build directory and the fifos
# so that docker does not create it with root as owner.
[ -d "${builddir}" ] || mkdir -p "${builddir}"
builddir=$(cd "${builddir}"; pwd)
[ -d "${builddir}/po" ] || mkdir -p "${builddir}/po"
create_fifos
# Function to stop our command runner
runnerpid=
stop_runner() {
printf >&2 -- "$PGM: stop-runner called\n"
if [ -n "$runnerpid" ]; then
echo >&2 "$PGM: stopping runner ..."
killtree $runnerpid
runnerpid=
remove_fifos
fi
return 0
}
# Transform a directory from docker to host directory
transform_dir() {
echo "$1"|sed -e "s,^/build/,$builddir/," -e "s,/src/,$srcdir/,"
}
# Transform all directories in the provided string
# Fixme: This sed expression is not robust enough.
transform_multi_dir() {
echo "$1"|sed -e "s, /build/, $builddir/,g" -e "s, /src/, $srcdir,g"
}
# Run a gpg command
runner_cmd_gpg() {
local cmd="$1"
cmd=$(transform_multi_dir "$cmd")
printf >&2 -- "$PGM(runner): invoking gpg\n"
set +e
$cmd </dev/null
rc=$?
set -e
printf >&2 -- "$PGM(runner): gpg returned $rc\n"
return 0
}
# Run the gpg-authcode-sign command
runner_cmd_gpg_authcode_sign() {
local cmd="$1"
[ $nosign = yes ] && cmd="--dry-run $cmd"
printf >&2 -- "$PGM(runner): gpg-authcode-sign.sh --stamp $cmd\n"
set +e
[ -n "$verbose" ] && set -x
( cd "$builddir"/install && gpg-authcode-sign.sh --stamp $cmd </dev/null )
rc=$?
[ -n "$verbose" ] && set +x
set -e
printf >&2 -- "$PGM(runner): gpg-authcode-sign.sh returned $rc\n"
return 0
}
# Copy some files to the Windows host to prepare the MSI linking
# Args are: See below
runner_cmd_msibase() {
local version="$1" gnupgmsi="$2"
set +e
[ -n "$verbose" ] && set -x
ssh "$WINHOST" "mkdir AppData\\Local\\Temp\\gpg4win-$version" || true
scp "$srcdir"/packages/gnupg-msi-${gnupgmsi}-bin.wixlib \
"$WINHOST":AppData/Local/Temp/gpg4win-"$version";
scp "$srcdir"/src/icons/shield.ico \
"$WINHOST":AppData/Local/Temp/gpg4win-"$version"
scp "$srcdir"/doc/logo/gpg4win-msi-header_install-493x58.bmp \
"$WINHOST":AppData/Local/Temp/gpg4win-"$version"/header.bmp
scp "$srcdir"/doc/logo/gpg4win-msi-wizard_install-493x312.bmp \
"$WINHOST":AppData/Local/Temp/gpg4win-"$version"/dialog.bmp
scp "$srcdir"/doc/logo/gpg4win-msi-wizard_install-493x312.bmp \
"$WINHOST":AppData/Local/Temp/gpg4win-"$version"/dialog.bmp
scp "$srcdir"/doc/logo/gpg4win-msi-wizard_install-info-32x32.bmp \
"$WINHOST":AppData/Local/Temp/gpg4win-"$version"/info.bmp
scp "$srcdir"/doc/logo/gpg4win-msi-wizard_install-exclamation-32x32.bmp \
"$WINHOST":AppData/Local/Temp/gpg4win-"$version"/exclamation.bmp
scp "$srcdir"/po/gpg4win-en.wxl \
"$WINHOST":AppData/Local/Temp/gpg4win-"$version"
scp "$srcdir"/po/gpg4win-de.wxl \
"$WINHOST":AppData/Local/Temp/gpg4win-"$version"
scp WixUI_Gpg4win.wxs \
"$WINHOST":AppData/Local/Temp/gpg4win-"$version"
rc=0
[ -n "$verbose" ] && set +x
set -e
return 0
}
# Copy files to the Windows host
runner_cmd_cptowinhost() {
local version="$1"
local target="$WINHOST":AppData/Local/Temp/gpg4win-"$version"
local files
shift
files=
for f in $@; do
files="$files $(transform_dir "$f")"
done
set +e
echo >&2 "$PGM: running scp $files $target"
scp $files "$target"
rc=$?
set -e
return 0
}
# Copy file from the Windows host
runner_cmd_cpfromwinhost() {
local version="$1" prefix="$2" name="$3" vsdvers="$4"
local mydir="$WINHOST":AppData/Local/Temp/gpg4win-"$version"
set +e
scp "$mydir/$prefix-$version-$name.msi" \
"$builddir/src/installers/$prefix-$vsdvers-$name.msi"
rc=$?
set -e
return 0
}
# Copy files to the Windows host
runner_cmd_lightwinhost() {
local version="$1" prefix="$2" name="$3" intlopt="$4" msivers="$5"
[ -n "$verbose" ] && set -x
set +e
ssh "$WINHOST" "cd AppData/Local/Temp/gpg4win-$version \
&& $WINLIGHT \
-cc . -reusecab -spdb \
-ext WixUIExtension \
-ext WixUtilExtension \
-out $prefix-$version-$name.msi \
$(echo "$intlopt" | sed 's,%20, ,g') \
-dcl:high -pedantic \
$prefix-$version.wixlib gnupg-msi-$msivers-bin.wixlib $name-$version.wixlib" \
| grep -v "ICE80" | grep -v "ICE57"
rc="${PIPESTATUS[0]}"
set -e
[ -n "$verbose" ] && set +x
# FIXME:
echo >&2 "$PGM(runner): cmd lightwinhost exited with $rc - forcing 0"
rc=0
return 0
}
# Run the Wix tools under Wine.
runner_cmd_litcandle() {
local mode="$1" version="$2" prefix="$3" idir="$4" exidir="$5"
local dwixobj fwxs
if [ $withmsi = no ]; then
echo >&2 "$PGM(runner): litcandle requires --with-msi option"
rc=2
return 0
fi
idir=$(transform_dir "$idir")
exidir=$(transform_dir "$exidir")
fwixlib="$prefix"-"$version".wixlib
fwixobj="$prefix"-"$version".wixobj
if [ "$mode" = ui ]; then
fwxs="l:\\src\\gnupg-vsd\\$prefix\\$prefix".wxs
fextraobj="k:\\gpg4win-ui.wixobj"
else
fwxs="l:\\src\\$prefix"-"$version".wxs
fextraobj=
fi
# Create symlinks into the Wine dosdevices directory
if [ -n "$verbose" ]; then
echo >&2 "$PGM(runner): idir : $WINEINST"
echo >&2 "$PGM(runner): exidir : $WINEINSTEX"
echo >&2 "$PGM(runner): srcdir : $WINESRC"
echo >&2 "$PGM(runner): builddir: $WINEBLD"
fi
ln -sf "$idir" "$WINEINST"
ln -sf "$exidir" "$WINEINSTEX"
ln -sf "$srcdir" "$WINESRC"
ln -sf "$builddir" "$WINEBLD"
# Run the tools
rc=0
[ -n "$verbose" ] && set -x
set +e
if [ $rc -eq 0 ]; then
$WINE "$WIXPREFIX/candle.exe" \
-dInstDir=k: \
-dInstDirEx=j: \
-dSrcDir=i:\\ \
-dBldDir=l:\\ \
-dVersion="$version" \
-dWin64="yes" \
-out k:\\"$fwixobj" \
-pedantic -wx "$fwxs" \
-arch x64
rc=$?
fi
if [ $rc -eq 0 -a -n "$fextraobj" ]; then
$WINE "$WIXPREFIX/candle.exe" \
-dInstDir=k: \
-dInstDirEx=j: \
-dSrcDir=i:\\ \
-dBldDir=l:\\ \
-dVersion="$version" \
-dWin64="yes" \
-out "$fextraobj" \
-arch x64 \
-pedantic -wx i:\\src\\WixUI_Gpg4win.wxs
rc=$?
fi
if [ $rc -eq 0 ]; then
$WINE "$WIXPREFIX/lit.exe" \
-out k:\\"$fwixlib" \
-bf \
-wx \
-pedantic \
k:\\"$fwixobj" "$fextraobj"
rc=$?
fi
set -e
[ -n "$verbose" ] && set +x
# Remove the symlinks
rm "$WINEINST" "$WINESRC" "$WINEINSTEX" "$WINEBLD" || true
return 0
}
# Run a command received from the fifo. Args are command and the line
# with args for the command.
runner_exec_cmd() {
local cmd="$1" line="$2" rc
printf >&2 -- "$PGM: cmd='%s' line='%s'\n" "$cmd" "$line"
# The called functions need to set RC to the desired exit status
rc=42
case "$cmd" in
ping) echo pong; rc=0 ;;
gpg) runner_cmd_gpg "gpg $line" ;;
gpg-authcode-sign) runner_cmd_gpg_authcode_sign "$line" ;;
msibase) runner_cmd_msibase $line ;;
cptowinhost) runner_cmd_cptowinhost $line ;;
cpfromwinhost) runner_cmd_cpfromwinhost $line ;;
lightwinhost) runner_cmd_lightwinhost $line ;;
litcandle) runner_cmd_litcandle $line ;;
*) echo "$PGM(runner): $cmd: no such command"; rc=4 ;;
esac
echo >&2 "$PGM: runner cmd '$cmd' returned $rc"
# Make sure that we have a final LF in the output and then write
# the error line
echo
echo "EXITSTATUS=$rc" > "${builddir}/S.build.sh-rc"
return 0
}
# Start our FIFO command runner.
runner_loop() {
echo >&2 "$PGM: command runner started pid=$$"
while : ; do
if read -r cmd line < "${builddir}/S.build.sh-in" ; then
if [ -z "$recooked" ]; then
stty cooked </dev/tty
recooked=yes
fi
echo >&2 "$PGM(runner): executing cmd"
runner_exec_cmd "$cmd" "$line" >"${builddir}/S.build.sh-out" &
echo >&2 "$PGM(runner): waiting for cmd"
wait
echo >&2 "$PGM(runner): cmd finished"
fi
done
echo >&2 "$PGM: command runner stopped"
exit 0
}
# Start our FIFO command runner
trap stop_runner EXIT SIGTERM SIGINT SIGHUP
runner_loop &
runnerpid=$!
echo >&2 "$PGM: command runner pid is $runnerpid"
# Run docker
docker_cmdline="run -it --rm --user $userid:$groupid"
docker_cmdline="$docker_cmdline -v "${srcdir}":/src:ro"
docker_cmdline="$docker_cmdline -v "${builddir}":/build:rw"
docker_cmdline="$docker_cmdline -v "$HOME/.gnupg-autogen.rc":/.gnupg-autogen.rc:ro"
docker_cmdline="$docker_cmdline $docker_image $cmd"
echo >&2 "$PGM: running: docker $docker_cmdline"
docker $docker_cmdline 2>&1 | tee -a ${logfile}
err="${PIPESTATUS[0]}"
echo >&2 "$PGM: docker finished. rc=$err"
end_time=$(date +"%s")
duration=$((end_time - start_time))
hours=$((duration / 3600))
minutes=$((duration % 3600 / 60))
seconds=$((duration % 60))
buildtime=$(printf "%02d:%02d:%02d\n" "$hours" "$minutes" "$seconds")
if [ "$err" = "1" -a "$appimage" = "yes" ]; then
echo >&2 "$PGM: Return code 1 on AppImage build. Treating as success."
err=0
fi
if [ "$err" = "0" ]; then
mkdir -p "${builddir}/artifacts"
if [ "$dist" = "yes" ]; then
results=$(find "${builddir}" -maxdepth 1 -name \*.tar.xz \
-a -type f -printf '%p ')
elif [ "$appimage" = "yes" ]; then
results=$(find "${builddir}" -maxdepth 1 -iname \*.appimage \
-a -type f -printf '%p ')
else
results=$(find "${builddir}/src/installers" -type f -printf '%p ')
fi
echo >&2 ""
echo >&2 "$PGM: ############### Success 🥳 ####################"
for result in $results; do
ln -sf -t "${builddir}/artifacts/" "$result"
echo >&2 "$PGM: Created: ${builddir}/artifacts/$(basename $result)"
done
else
echo >&2 "$PGM: ############### Failure 😪 ####################"
fi
echo >&2 "$PGM: Logfile: ${logfile}"
echo >&2 "$PGM: Build command: ${commandline}"
echo >&2 "$PGM: Build time: $buildtime"
echo >&2 "$PGM: ##############################################"
diff --git a/docker/gpg4win-trixie/Dockerfile b/docker/gpg4win-trixie/Dockerfile
new file mode 100644
index 00000000..bb79a3d2
--- /dev/null
+++ b/docker/gpg4win-trixie/Dockerfile
@@ -0,0 +1,64 @@
+# Dockerfile - docker/gpg4win-bookworm
+# Copyright (C) 2022 g10 Code GmbH
+#
+# Software engineering by Ingo Klöcker <dev@ingo-kloecker.de>
+#
+# This file is part of GnuPG.
+#
+# 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 <https://www.gnu.org/licenses/>.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+FROM debian:trixie
+
+RUN set -x \
+ && apt-get update \
+ && apt-get install --no-install-recommends --no-install-suggests -y \
+ autoconf \
+ automake \
+ bison \
+ build-essential \
+ cmake \
+ docbook-utils \
+ flex \
+ gettext \
+ ghostscript \
+ git \
+ gperf \
+ gpgrt-tools \
+ icoutils \
+ imagemagick \
+ libboost-dev \
+ libgettextpo-dev \
+ libxml2-utils \
+ mingw-w64 \
+ mingw-w64-i686-dev \
+ mingw-w64-x86-64-dev \
+ nsis \
+ stow \
+ texinfo \
+ unzip \
+ pkg-config \
+ python3-lxml \
+ gtk-update-icon-cache \
+ uuid-runtime \
+ wget
+
+RUN update-alternatives --install /usr/bin/i686-w64-mingw32-gcc i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix 100
+RUN update-alternatives --install /usr/bin/i686-w64-mingw32-g++ i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix 100
+RUN update-alternatives --install /usr/bin/x86_64-w64-mingw32-gcc x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix 100
+RUN update-alternatives --install /usr/bin/x86_64-w64-mingw32-g++ x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix 100
+
+ENV LANG C.UTF-8
+ENV LC_ALL C.UTF-8
diff --git a/src/gpg4win.mk.in b/src/gpg4win.mk.in
index 86142807..cd2efd7c 100644
--- a/src/gpg4win.mk.in
+++ b/src/gpg4win.mk.in
@@ -1,1368 +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/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/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/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}\"\
+ $$$${pkgcfg} CFLAGS=\"-fcommon -Wno-error=incompatible-pointer-types $$$${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}\" \
+ $$$${pkgcfg} CFLAGS=\"-fcommon -Wno-error=incompatible-pointer-types $$$${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
Tue, Jan 20, 11:16 PM (14 h, 32 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3d/72/3ebab7a38add606bdc9915b20930

Event Timeline