2014-08-12 16:13:04 -07:00
|
|
|
---
|
2015-06-02 07:47:07 -07:00
|
|
|
name: "bitcoin-osx-0.11"
|
2014-08-12 16:13:04 -07:00
|
|
|
enable_cache: true
|
|
|
|
suites:
|
2015-10-28 23:29:48 -07:00
|
|
|
- "trusty"
|
2014-08-12 16:13:04 -07:00
|
|
|
architectures:
|
|
|
|
- "amd64"
|
|
|
|
packages:
|
2014-12-30 23:55:17 -08:00
|
|
|
- "g++"
|
2014-08-12 16:13:04 -07:00
|
|
|
- "git-core"
|
|
|
|
- "pkg-config"
|
2015-10-28 23:29:48 -07:00
|
|
|
- "autoconf"
|
2014-08-12 16:13:04 -07:00
|
|
|
- "libtool"
|
|
|
|
- "automake"
|
|
|
|
- "faketime"
|
|
|
|
- "bsdmainutils"
|
|
|
|
- "cmake"
|
|
|
|
- "libcap-dev"
|
|
|
|
- "libz-dev"
|
|
|
|
- "libbz2-dev"
|
2015-06-02 07:39:25 -07:00
|
|
|
reference_datetime: "2015-06-01 00:00:00"
|
2014-08-12 16:13:04 -07:00
|
|
|
remotes:
|
|
|
|
- "url": "https://github.com/bitcoin/bitcoin.git"
|
|
|
|
"dir": "bitcoin"
|
|
|
|
files:
|
2015-01-19 21:20:44 -08:00
|
|
|
- "MacOSX10.9.sdk.tar.gz"
|
2014-08-12 16:13:04 -07:00
|
|
|
script: |
|
|
|
|
WRAP_DIR=$HOME/wrapped
|
|
|
|
HOSTS="x86_64-apple-darwin11"
|
2015-10-09 10:56:44 -07:00
|
|
|
CONFIGFLAGS="--enable-reduce-exports GENISOIMAGE=$WRAP_DIR/genisoimage"
|
2014-08-12 16:13:04 -07:00
|
|
|
FAKETIME_HOST_PROGS=""
|
|
|
|
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
|
|
|
|
|
|
|
|
export QT_RCC_TEST=1
|
|
|
|
export GZIP="-9n"
|
|
|
|
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
|
|
|
|
export TZ="UTC"
|
|
|
|
export BUILD_DIR=`pwd`
|
|
|
|
mkdir -p ${WRAP_DIR}
|
|
|
|
if test -n "$GBUILD_CACHE_ENABLED"; then
|
|
|
|
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
|
|
|
|
export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
|
|
|
|
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
|
|
|
|
fi
|
|
|
|
|
|
|
|
export ZERO_AR_DATE=1
|
|
|
|
|
|
|
|
# Create global faketime wrappers
|
|
|
|
for prog in ${FAKETIME_PROGS}; do
|
|
|
|
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
|
|
|
|
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
|
2015-10-28 23:29:48 -07:00
|
|
|
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
2014-08-12 16:13:04 -07:00
|
|
|
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
|
|
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${prog}
|
|
|
|
done
|
|
|
|
|
|
|
|
# Create per-host faketime wrappers
|
|
|
|
for i in $HOSTS; do
|
|
|
|
for prog in ${FAKETIME_HOST_PROGS}; do
|
|
|
|
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
|
|
|
|
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
|
2015-10-28 23:29:48 -07:00
|
|
|
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
2014-08-12 16:13:04 -07:00
|
|
|
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
|
|
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${i}-${prog}
|
|
|
|
done
|
|
|
|
done
|
|
|
|
export PATH=${WRAP_DIR}:${PATH}
|
|
|
|
|
|
|
|
cd bitcoin
|
|
|
|
BASEPREFIX=`pwd`/depends
|
|
|
|
|
|
|
|
mkdir -p ${BASEPREFIX}/SDKs
|
2015-01-19 21:20:44 -08:00
|
|
|
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.9.sdk.tar.gz
|
2014-08-12 16:13:04 -07:00
|
|
|
|
|
|
|
# Build dependencies for each host
|
|
|
|
for i in $HOSTS; do
|
|
|
|
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Create the release tarball using (arbitrarily) the first host
|
|
|
|
./autogen.sh
|
|
|
|
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
|
|
|
|
make dist
|
2014-11-25 15:36:55 -08:00
|
|
|
SOURCEDIST=`echo bitcoin-*.tar.gz`
|
|
|
|
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
2014-08-12 16:13:04 -07:00
|
|
|
|
2014-11-19 18:46:40 -08:00
|
|
|
# Correct tar file order
|
|
|
|
mkdir -p temp
|
|
|
|
pushd temp
|
2014-11-25 15:36:55 -08:00
|
|
|
tar xf ../$SOURCEDIST
|
2014-12-23 16:42:40 -08:00
|
|
|
find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
2014-11-19 18:46:40 -08:00
|
|
|
popd
|
|
|
|
|
2014-08-12 16:13:04 -07:00
|
|
|
ORIGPATH="$PATH"
|
|
|
|
# Extract the release tarball into a dir for each host and build
|
|
|
|
for i in ${HOSTS}; do
|
|
|
|
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
|
|
|
|
mkdir -p distsrc-${i}
|
|
|
|
cd distsrc-${i}
|
2014-11-25 15:36:55 -08:00
|
|
|
INSTALLPATH=`pwd`/installed/${DISTNAME}
|
|
|
|
mkdir -p ${INSTALLPATH}
|
|
|
|
tar --strip-components=1 -xf ../$SOURCEDIST
|
2014-08-12 16:13:04 -07:00
|
|
|
|
2014-11-25 15:36:55 -08:00
|
|
|
./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
|
2014-08-12 16:13:04 -07:00
|
|
|
make ${MAKEOPTS}
|
|
|
|
make install-strip
|
2014-11-21 16:26:45 -08:00
|
|
|
|
|
|
|
make deploydir
|
|
|
|
mkdir -p unsigned-app-${i}
|
|
|
|
cp contrib/macdeploy/detached-sig-apply.sh unsigned-app-${i}
|
|
|
|
cp contrib/macdeploy/detached-sig-create.sh unsigned-app-${i}
|
|
|
|
cp ${BASEPREFIX}/${i}/native/bin/dmg ${BASEPREFIX}/${i}/native/bin/genisoimage unsigned-app-${i}
|
|
|
|
cp ${BASEPREFIX}/${i}/native/bin/${i}-codesign_allocate unsigned-app-${i}/codesign_allocate
|
|
|
|
cp ${BASEPREFIX}/${i}/native/bin/${i}-pagestuff unsigned-app-${i}/pagestuff
|
|
|
|
mv dist unsigned-app-${i}
|
|
|
|
pushd unsigned-app-${i}
|
2014-12-23 16:42:40 -08:00
|
|
|
find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz
|
2014-11-21 16:26:45 -08:00
|
|
|
popd
|
|
|
|
|
2014-08-12 16:13:04 -07:00
|
|
|
make deploy
|
2015-05-07 01:12:27 -07:00
|
|
|
${WRAP_DIR}/dmg dmg Bitcoin-Core.dmg ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
|
2014-11-25 15:36:55 -08:00
|
|
|
|
|
|
|
cd installed
|
|
|
|
find . -name "lib*.la" -delete
|
|
|
|
find . -name "lib*.a" -delete
|
|
|
|
rm -rf ${DISTNAME}/lib/pkgconfig
|
2015-02-12 14:07:13 -08:00
|
|
|
find ${DISTNAME} | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
|
2014-11-25 15:36:55 -08:00
|
|
|
cd ../../
|
2014-08-12 16:13:04 -07:00
|
|
|
done
|
|
|
|
mkdir -p $OUTDIR/src
|
2014-11-25 15:36:55 -08:00
|
|
|
mv $SOURCEDIST $OUTDIR/src
|
|
|
|
mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-osx64.tar.gz
|