mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
---
|
|
name: "dash-dmg-signer"
|
|
distro: "ubuntu"
|
|
suites:
|
|
- "focal"
|
|
architectures:
|
|
- "amd64"
|
|
packages:
|
|
- "faketime"
|
|
- "xorriso"
|
|
- "python3-pip"
|
|
remotes:
|
|
- "url": "https://github.com/dashpay/dash-detached-sigs.git"
|
|
"dir": "signature"
|
|
- "url": "https://github.com/achow101/signapple.git"
|
|
"dir": "signapple"
|
|
"commit": "8a945a2e7583be2665cf3a6a89d665b70ecd1ab6"
|
|
files:
|
|
- "dashcore-osx-unsigned.tar.gz"
|
|
script: |
|
|
set -e -o pipefail
|
|
|
|
WRAP_DIR=$HOME/wrapped
|
|
mkdir -p ${WRAP_DIR}
|
|
export PATH="$PWD":$PATH
|
|
FAKETIME_PROGS="dmg xorrisofs"
|
|
|
|
# Create global faketime wrappers
|
|
for prog in ${FAKETIME_PROGS}; do
|
|
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
|
|
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
|
|
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${prog}
|
|
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
|
|
chmod +x ${WRAP_DIR}/${prog}
|
|
done
|
|
|
|
# Install signapple
|
|
cd signapple
|
|
python3 -m pip install -U pip setuptools
|
|
python3 -m pip install .
|
|
export PATH="$HOME/.local/bin":$PATH
|
|
cd ..
|
|
|
|
UNSIGNED_TARBALL=dashcore-osx-unsigned.tar.gz
|
|
UNSIGNED_APP=dist/Dash-Qt.app
|
|
SIGNED=dashcore-osx-signed.dmg
|
|
|
|
tar -xf ${UNSIGNED_TARBALL}
|
|
OSX_VOLNAME="$(cat osx_volname)"
|
|
./detached-sig-apply.sh ${UNSIGNED_APP} signature/osx/dist
|
|
${WRAP_DIR}/xorrisofs -D -l -V "${OSX_VOLNAME}" -no-pad -r -dir-mode 0755 -o uncompressed.dmg signed-app
|
|
${WRAP_DIR}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED}
|