aboutsummaryrefslogtreecommitdiff
path: root/contrib/gitian-descriptors/gitian-win-signer.yml
blob: 1f5b9d45077e8f8232b94fdec33b048edb3878e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
name: "bitcoin-win-signer"
distro: "ubuntu"
suites:
- "bionic"
architectures:
- "linux64"
packages:
- "libssl-dev"
- "autoconf"
- "libtool"
- "pkg-config"
remotes:
- "url": "https://github.com/bitcoin-core/bitcoin-detached-sigs.git"
  "dir": "signature"
files:
- "osslsigncode-2.0.tar.gz"
- "bitcoin-win-unsigned.tar.gz"
script: |
  set -e -o pipefail

  BUILD_DIR=`pwd`
  SIGDIR=${BUILD_DIR}/signature/win
  UNSIGNED_DIR=${BUILD_DIR}/unsigned

  echo "5a60e0a4b3e0b4d655317b2f12a810211c50242138322b16e7e01c6fbb89d92f  osslsigncode-2.0.tar.gz" | sha256sum -c

  mkdir -p ${UNSIGNED_DIR}
  tar -C ${UNSIGNED_DIR} -xf bitcoin-win-unsigned.tar.gz

  tar xf osslsigncode-2.0.tar.gz
  cd osslsigncode-2.0

  ./autogen.sh
  ./configure --without-gsf --without-curl --disable-dependency-tracking
  make
  find ${UNSIGNED_DIR} -name "*-unsigned.exe" | while read i; do
    INFILE="`basename "${i}"`"
    OUTFILE="`echo "${INFILE}" | sed s/-unsigned//`"
    ./osslsigncode attach-signature -in "${i}" -out "${OUTDIR}/${OUTFILE}" -sigin "${SIGDIR}/${INFILE}.pem"
  done