1---
2name: "bitcoin-win-signer"
3distro: "ubuntu"
4suites:
5- "bionic"
6architectures:
7- "amd64"
8packages:
9- "libssl-dev"
10- "autoconf"
11- "automake"
12- "libtool"
13- "pkg-config"
14remotes:
15- "url": "https://github.com/bitcoin-core/bitcoin-detached-sigs.git"
16  "dir": "signature"
17files:
18- "osslsigncode-2.0.tar.gz"
19- "bitcoin-win-unsigned.tar.gz"
20script: |
21  set -e -o pipefail
22
23  BUILD_DIR="$PWD"
24  SIGDIR=${BUILD_DIR}/signature/win
25  UNSIGNED_DIR=${BUILD_DIR}/unsigned
26
27  echo "5a60e0a4b3e0b4d655317b2f12a810211c50242138322b16e7e01c6fbb89d92f  osslsigncode-2.0.tar.gz" | sha256sum -c
28
29  mkdir -p ${UNSIGNED_DIR}
30  tar -C ${UNSIGNED_DIR} -xf bitcoin-win-unsigned.tar.gz
31
32  tar xf osslsigncode-2.0.tar.gz
33  cd osslsigncode-2.0
34
35  ./autogen.sh
36  ./configure --without-gsf --without-curl --disable-dependency-tracking
37  make
38  find ${UNSIGNED_DIR} -name "*-unsigned.exe" | while read i; do
39    INFILE="$(basename "${i}")"
40    OUTFILE="${INFILE/-unsigned}"
41    ./osslsigncode attach-signature -in "${i}" -out "${OUTDIR}/${OUTFILE}" -sigin "${SIGDIR}/${INFILE}.pem"
42  done
43