2014-01-20 13:38:50 +01:00
|
|
|
---
|
2015-06-02 16:41:54 +02:00
|
|
|
name: "bitcoin-win-0.12"
|
2014-08-13 01:13:04 +02:00
|
|
|
enable_cache: true
|
2014-01-20 13:38:50 +01:00
|
|
|
suites:
|
|
|
|
- "precise"
|
|
|
|
architectures:
|
|
|
|
- "amd64"
|
2014-08-13 01:13:04 +02:00
|
|
|
packages:
|
|
|
|
- "g++"
|
2014-01-20 13:38:50 +01:00
|
|
|
- "git-core"
|
2014-08-13 01:13:04 +02:00
|
|
|
- "pkg-config"
|
2014-01-20 13:38:50 +01:00
|
|
|
- "autoconf2.13"
|
|
|
|
- "libtool"
|
|
|
|
- "automake"
|
2014-08-13 01:13:04 +02:00
|
|
|
- "faketime"
|
2014-01-20 13:38:50 +01:00
|
|
|
- "bsdmainutils"
|
2014-08-13 01:13:04 +02:00
|
|
|
- "mingw-w64"
|
|
|
|
- "g++-mingw-w64"
|
|
|
|
- "nsis"
|
2014-11-26 00:36:55 +01:00
|
|
|
- "zip"
|
2015-06-02 16:39:25 +02:00
|
|
|
reference_datetime: "2015-06-01 00:00:00"
|
2014-01-20 13:38:50 +01:00
|
|
|
remotes:
|
|
|
|
- "url": "https://github.com/bitcoin/bitcoin.git"
|
|
|
|
"dir": "bitcoin"
|
2014-08-13 01:13:04 +02:00
|
|
|
files: []
|
2014-01-20 13:38:50 +01:00
|
|
|
script: |
|
2014-08-13 01:13:04 +02:00
|
|
|
WRAP_DIR=$HOME/wrapped
|
|
|
|
HOSTS="x86_64-w64-mingw32 i686-w64-mingw32"
|
2015-10-09 19:56:44 +02:00
|
|
|
CONFIGFLAGS="--enable-reduce-exports"
|
2014-08-13 01:13:04 +02:00
|
|
|
FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip"
|
2014-11-26 00:36:55 +01:00
|
|
|
FAKETIME_PROGS="date makensis zip"
|
2014-08-13 01:13:04 +02:00
|
|
|
|
2014-01-31 21:37:43 +01:00
|
|
|
export QT_RCC_TEST=1
|
2014-08-13 01:13:04 +02:00
|
|
|
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
|
|
|
|
|
|
|
|
# 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}
|
|
|
|
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
|
|
|
|
|
|
|
|
# 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}
|
|
|
|
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
|
|
|
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
|
|
|
|
# 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-26 00:36:55 +01:00
|
|
|
SOURCEDIST=`echo bitcoin-*.tar.gz`
|
|
|
|
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
2014-08-13 01:13:04 +02:00
|
|
|
|
2014-11-20 03:46:40 +01:00
|
|
|
# Correct tar file order
|
|
|
|
mkdir -p temp
|
|
|
|
pushd temp
|
2014-11-26 00:36:55 +01:00
|
|
|
tar xf ../$SOURCEDIST
|
2014-12-24 01:42:40 +01:00
|
|
|
find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
2015-06-29 21:02:37 +02:00
|
|
|
mkdir -p $OUTDIR/src
|
|
|
|
cp ../$SOURCEDIST $OUTDIR/src
|
2014-11-20 03:46:40 +01:00
|
|
|
popd
|
|
|
|
|
2014-08-13 01:13:04 +02: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-26 00:36:55 +01:00
|
|
|
INSTALLPATH=`pwd`/installed/${DISTNAME}
|
|
|
|
mkdir -p ${INSTALLPATH}
|
|
|
|
tar --strip-components=1 -xf ../$SOURCEDIST
|
2014-08-13 01:13:04 +02:00
|
|
|
|
2014-11-26 00:36:55 +01: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-13 01:13:04 +02:00
|
|
|
make ${MAKEOPTS}
|
2014-01-20 13:38:50 +01:00
|
|
|
make deploy
|
|
|
|
make install-strip
|
2014-08-13 01:13:04 +02:00
|
|
|
cp -f bitcoin-*setup*.exe $OUTDIR/
|
2014-11-26 00:36:55 +01:00
|
|
|
cd installed
|
|
|
|
mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
|
|
|
|
find . -name "lib*.la" -delete
|
|
|
|
find . -name "lib*.a" -delete
|
|
|
|
rm -rf ${DISTNAME}/lib/pkgconfig
|
2015-02-12 23:07:13 +01:00
|
|
|
find ${DISTNAME} -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip
|
2014-11-26 00:36:55 +01:00
|
|
|
cd ../..
|
2014-08-13 01:13:04 +02:00
|
|
|
done
|
2015-06-29 21:02:37 +02:00
|
|
|
cd $OUTDIR
|
|
|
|
rename 's/-setup\.exe$/-setup-unsigned.exe/' *-setup.exe
|
|
|
|
find . -name "*-setup-unsigned.exe" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz
|
2014-11-26 00:36:55 +01:00
|
|
|
mv ${OUTDIR}/${DISTNAME}-x86_64-*.zip ${OUTDIR}/${DISTNAME}-win64.zip
|
|
|
|
mv ${OUTDIR}/${DISTNAME}-i686-*.zip ${OUTDIR}/${DISTNAME}-win32.zip
|