shadowproject/shadow

View on GitHub
contrib/gitian-descriptors/gitian-osx.yml

Summary

Maintainability
Test Coverage
---
name: "shadow"
suites:
- "trusty"
architectures:
- "amd64"
packages:
- "git-core"
- "clang"
- "llvm-dev"
- "unzip"
- "zip"
- "nsis"
- "faketime"
- "autoconf2.13"
- "libtool"
- "automake"
- "pkg-config"
- "bsdmainutils"
- "python"
- "genisoimage"
reference_datetime: "2013-06-01 00:00:00"
remotes:
- "url": "https://github.com/ShadowProject/shadowcoin.git"
  "dir": "shadowcoin"
files:
- "qt-osx-5.5.0-gitian.tar.xz"
- "shadow-deps-osx-gitian.zip"
- "osxcross.tar.xz"
script: |
  # Defines
  export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1
  export FAKETIME=$REFERENCE_DATETIME
  export TZ=UTC
  INDIR=$HOME/build
  OPTFLAGS='-O2'
  TEMPDIR="$HOME/tempdir"
  BUILDDIR=$HOME/build
  DEPSDIR=$HOME/deps
  HOST=x86_64-apple-darwin13
  DISTNAME=x86_64-darwin
  export PATH=$DEPSDIR/host/bin:$DEPSDIR:$DEPSDIR/bin:$PATH
  NEEDDIST=1
  # Qt: workaround for determinism in resource ordering
  #  Qt5's rcc uses a QHash to store the files for the resource.
  #  A security fix in QHash makes the ordering of keys to be different on every run
  #  (https://qt.gitorious.org/qt/qtbase/commit/c01eaa438200edc9a3bbcd8ae1e8ded058bea268).
  #  This is good in general but qrc shouldn't be doing a traversal over a randomized container.
  #  The thorough solution would be to use QMap instead of QHash, but this requires patching Qt.
  #  For now luckily there is a test mode that forces a fixed seed.
  export QT_RCC_TEST=1
  mkdir -p $BUILDDIR $BINDIR $DEPSDIR
  cd $DEPSDIR
  unzip -o $BUILDDIR/shadow-deps-osx-gitian.zip
  tar xf $BUILDDIR/osxcross.tar.xz
  mkdir -p $HOME/install
  cd $HOME/install
  tar xf $BUILDDIR/qt-osx-5.5.0-gitian.tar.xz
  #
  cd $BUILDDIR/shadowcoin
  mkdir -p $OUTDIR/src
  git archive HEAD | tar -x -C $OUTDIR/src
  cp $OUTDIR/src/doc/README $OUTDIR/readme.txt
  cp $OUTDIR/src/COPYING $OUTDIR/COPYING.txt
  #
  #cd src
  #make -f makefile.linux-mingw HOST="$HOST" DEPSDIR="$DEPSDIR" CURDIR="$BUILDDIR/shadowcoin/src" STATIC=1 $MAKEOPTS USE_UPNP=1 BOOST_LIB_SUFFIX="-mt-s" DEBUGFLAGS= 
  #cp shadowcoind.exe $BINDIR/
  #cd ..
  #
  #$DEPSDIR/qt/host/bin/qmake -spec unsupported/win32-g++-cross MINIUPNPC_LIB_PATH=$HOME/build/miniupnpc MINIUPNPC_INCLUDE_PATH=$HOME/build/ BDB_LIB_PATH=$HOME/build/db-4.8.30.NC/build_unix BDB_INCLUDE_PATH=$HOME/build/db-4.8.30.NC/build_unix BOOST_LIB_PATH=$HOME/build/lib BOOST_INCLUDE_PATH=$HOME/build/include BOOST_LIB_SUFFIX=-mt-s BOOST_THREAD_LIB_SUFFIX=_win32-mt-s OPENSSL_LIB_PATH=$HOME/build/openssl-1.0.1h OPENSSL_INCLUDE_PATH=$HOME/build/openssl-1.0.1h/include INCLUDEPATH=$HOME/build DEFINES=BOOST_THREAD_USE_LIB BITCOIN_NEED_QT_PLUGINS=1 QMAKE_LRELEASE=lrelease QMAKE_CXXFLAGS=-frandom-seed=bitcoin USE_BUILD_INFO=1
  ~/install/host/bin/qmake -xplatform macx-clang-linux RELEASE=1 QMAKE_LRELEASE="~/install/host/bin/lrelease" MINIUPNPC_LIB_PATH="$DEPSDIR/lib" MINIUPNPC_INCLUDE_PATH="$DEPSDIR/include" BDB_LIB_PATH="$DEPSDIR/lib" BDB_INCLUDE_PATH="$DEPSDIR/include" BOOST_LIB_PATH="$DEPSDIR/lib" BOOST_INCLUDE_PATH="$DEPSDIR/include" BOOST_LIB_SUFFIX="-mt-s" BOOST_THREAD_LIB_SUFFIX="-mt-s" OPENSSL_LIB_PATH="$DEPSDIR/lib" OPENSSL_INCLUDE_PATH="$DEPSDIR/include" INCLUDEPATH="$DEPSDIR/include" DEFINES="BOOST_THREAD_USE_LIB BITCOIN_NEED_QT_PLUGINS=1 USE_BUILD_INFO=1" QMAKE_CXXFLAGS+=" -I/home/ubuntu/deps/SDK/MacOSX10.9.sdk/usr/include -DBOOST_HAS_INT128=1 -frandom-seed=shadow"
  make $MAKEOPTS
  # macdeploy: TODO: .dmg
  export OTOOL=${HOST}-otool
  export INSTALLNAMETOOL=${HOST}-install_name_tool
  export STRIP=${HOST}-strip
  chmod +x contrib/macdeploy/macdeployqtplus
  OTOOL=${HOST}-otool INSTALLNAMETOOL=${HOST}-install_name_tool STRIP=${HOST}-strip contrib/macdeploy/macdeployqtplus Shadow.app
  mkdir -p  dist/.background
  install contrib/macdeploy/background.png dist/.background
  install contrib/macdeploy/DS_Store dist/.DS_Store
  cd dist
  ln -sf /Applications Applications
  cd ..
  genisoimage -no-cache-inodes -l -probe -V "Shadow" -no-pad -r -apple -o Shadow.tmp.dmg dist
  dmg dmg Shadow.tmp.dmg $OUTDIR/Shadow.dmg
  #