2014-01-20 13:38:50 +01:00
|
|
|
---
|
2015-04-29 19:49:14 +02:00
|
|
|
name: "dash-win-0.12"
|
2014-08-13 01:13:04 +02:00
|
|
|
enable_cache: true
|
2014-01-20 13:38:50 +01:00
|
|
|
suites:
|
2015-10-29 07:29:48 +01:00
|
|
|
- "trusty"
|
2014-01-20 13:38:50 +01:00
|
|
|
architectures:
|
|
|
|
- "amd64"
|
2014-08-13 01:13:04 +02:00
|
|
|
packages:
|
2016-02-27 07:09:18 +01:00
|
|
|
- "curl"
|
2014-08-13 01:13:04 +02:00
|
|
|
- "g++"
|
2014-01-20 13:38:50 +01:00
|
|
|
- "git-core"
|
2014-08-13 01:13:04 +02:00
|
|
|
- "pkg-config"
|
2015-10-29 07:29:48 +01:00
|
|
|
- "autoconf"
|
2014-01-20 13:38:50 +01:00
|
|
|
- "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-11-19 13:11:50 +01:00
|
|
|
- "ca-certificates"
|
|
|
|
- "python"
|
2015-12-25 12:30:45 +01:00
|
|
|
reference_datetime: "2016-01-01 00:00:00"
|
2014-01-20 13:38:50 +01:00
|
|
|
remotes:
|
2015-04-03 00:51:08 +02:00
|
|
|
- "url": "https://github.com/dashpay/dash.git"
|
2015-03-19 15:15:08 +01:00
|
|
|
"dir": "dash"
|
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"
|
2016-06-08 20:21:18 +02:00
|
|
|
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests"
|
2016-06-08 04:09:28 +02:00
|
|
|
FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip objcopy"
|
2014-11-26 00:36:55 +01:00
|
|
|
FAKETIME_PROGS="date makensis zip"
|
2016-06-08 04:09:28 +02:00
|
|
|
HOST_CFLAGS="-O2 -g"
|
|
|
|
HOST_CXXFLAGS="-O2 -g"
|
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}
|
2015-10-29 07:29:48 +01:00
|
|
|
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
2014-08-13 01:13:04 +02: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-29 07:29:48 +01:00
|
|
|
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
2014-08-13 01:13:04 +02:00
|
|
|
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
|
|
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${i}-${prog}
|
|
|
|
done
|
|
|
|
done
|
2015-10-30 18:19:09 +01:00
|
|
|
|
|
|
|
# Create per-host linker wrapper
|
|
|
|
# This is only needed for trusty, as the mingw linker leaks a few bytes of
|
|
|
|
# heap, causing non-determinism. See discussion in https://github.com/bitcoin/bitcoin/pull/6900
|
|
|
|
for i in $HOSTS; do
|
|
|
|
mkdir -p ${WRAP_DIR}/${i}
|
|
|
|
for prog in collect2; do
|
|
|
|
echo '#!/bin/bash' > ${WRAP_DIR}/${i}/${prog}
|
|
|
|
REAL=$(${i}-gcc -print-prog-name=${prog})
|
|
|
|
echo "export MALLOC_PERTURB_=255" >> ${WRAP_DIR}/${i}/${prog}
|
|
|
|
echo "${REAL} \$@" >> $WRAP_DIR/${i}/${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${i}/${prog}
|
|
|
|
done
|
|
|
|
for prog in gcc g++; 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/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
|
|
|
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
|
|
|
|
echo "export COMPILER_PATH=${WRAP_DIR}/${i}" >> ${WRAP_DIR}/${i}-${prog}
|
|
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${i}-${prog}
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
2014-08-13 01:13:04 +02:00
|
|
|
export PATH=${WRAP_DIR}:${PATH}
|
|
|
|
|
2015-04-05 23:56:58 +02:00
|
|
|
cd dash
|
2014-08-13 01:13:04 +02:00
|
|
|
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
|
2016-06-07 20:51:51 +02:00
|
|
|
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
2014-08-13 01:13:04 +02:00
|
|
|
make dist
|
2016-10-31 08:48:59 +01:00
|
|
|
SOURCEDIST=`echo dashcore-*.tar.gz`
|
2014-11-26 00:36:55 +01:00
|
|
|
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
|
2016-10-31 08:48:59 +01:00
|
|
|
find dashcore-* | 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
|
|
|
|
2016-06-08 04:09:28 +02:00
|
|
|
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}"
|
2014-08-13 01:13:04 +02:00
|
|
|
make ${MAKEOPTS}
|
2016-01-26 20:50:50 +01:00
|
|
|
make ${MAKEOPTS} -C src check-security
|
2014-01-20 13:38:50 +01:00
|
|
|
make deploy
|
2016-06-08 04:09:28 +02:00
|
|
|
make install DESTDIR=${INSTALLPATH}
|
2016-10-31 08:48:59 +01:00
|
|
|
cp -f dashcore-*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
|
2016-06-08 04:09:28 +02:00
|
|
|
find ${DISTNAME}/bin -type f -executable -exec ${i}-objcopy --only-keep-debug {} {}.dbg \; -exec ${i}-strip -s {} \; -exec ${i}-objcopy --add-gnu-debuglink={}.dbg {} \;
|
|
|
|
find ${DISTNAME}/lib -type f -exec ${i}-objcopy --only-keep-debug {} {}.dbg \; -exec ${i}-strip -s {} \; -exec ${i}-objcopy --add-gnu-debuglink={}.dbg {} \;
|
|
|
|
find ${DISTNAME} -not -name "*.dbg" -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip
|
|
|
|
find ${DISTNAME} -name "*.dbg" -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}-debug.zip
|
|
|
|
cd ../../
|
|
|
|
rm -rf distsrc-${i}
|
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
|
2016-06-08 04:09:28 +02:00
|
|
|
mv ${OUTDIR}/${DISTNAME}-x86_64-*-debug.zip ${OUTDIR}/${DISTNAME}-win64-debug.zip
|
|
|
|
mv ${OUTDIR}/${DISTNAME}-i686-*-debug.zip ${OUTDIR}/${DISTNAME}-win32-debug.zip
|
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
|