2011-02-01 18:27:14 +01:00
|
|
|
---
|
2014-08-13 01:13:04 +02:00
|
|
|
name: "bitcoin-linux-0.10"
|
|
|
|
enable_cache: true
|
2011-02-01 18:27:14 +01:00
|
|
|
suites:
|
2014-01-14 13:20:30 +01:00
|
|
|
- "precise"
|
2011-02-01 18:27:14 +01:00
|
|
|
architectures:
|
|
|
|
- "amd64"
|
|
|
|
packages:
|
2014-08-13 01:13:04 +02:00
|
|
|
- "g++-multilib"
|
2011-02-01 18:27:14 +01:00
|
|
|
- "git-core"
|
2012-02-15 20:42:51 +01:00
|
|
|
- "pkg-config"
|
2013-05-28 01:55:01 +02:00
|
|
|
- "autoconf2.13"
|
|
|
|
- "libtool"
|
|
|
|
- "automake"
|
|
|
|
- "faketime"
|
2013-09-10 21:15:10 +02:00
|
|
|
- "bsdmainutils"
|
2014-08-13 01:13:04 +02:00
|
|
|
- "binutils-gold"
|
2015-02-24 01:43:25 +01:00
|
|
|
- "libstdc++6-4.6-pic"
|
2013-07-22 08:50:39 +02:00
|
|
|
reference_datetime: "2013-06-01 00:00:00"
|
2011-02-01 18:27:14 +01:00
|
|
|
remotes:
|
|
|
|
- "url": "https://github.com/bitcoin/bitcoin.git"
|
|
|
|
"dir": "bitcoin"
|
2014-08-13 01:13:04 +02:00
|
|
|
files: []
|
2011-02-01 18:27:14 +01:00
|
|
|
script: |
|
2014-08-13 01:13:04 +02:00
|
|
|
WRAP_DIR=$HOME/wrapped
|
|
|
|
HOSTS="i686-pc-linux-gnu x86_64-unknown-linux-gnu"
|
2015-02-24 00:18:08 +01:00
|
|
|
CONFIGFLAGS="--enable-upnp-default --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
|
2014-08-13 01:13:04 +02:00
|
|
|
FAKETIME_HOST_PROGS=""
|
|
|
|
FAKETIME_PROGS="date ar ranlib nm strip"
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# 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}
|
2014-03-20 12:03:36 +01:00
|
|
|
|
2011-04-28 01:26:14 +02:00
|
|
|
cd bitcoin
|
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
|
|
|
|
|
2015-02-24 01:43:25 +01:00
|
|
|
# Ubuntu precise hack: Not an issue in later versions.
|
|
|
|
# Precise's libstdc++.a is non-pic. There's an optional libstdc++6-4.6-pic
|
|
|
|
# package which provides libstdc++_pic.a, but the linker can't find it.
|
|
|
|
# Symlink it to a path that will be included in our link-line so that the
|
|
|
|
# linker picks it up before the default libstdc++.a.
|
|
|
|
# This is only necessary for 64bit.
|
|
|
|
ln -s /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++_pic.a ${BASEPREFIX}/x86_64-unknown-linux-gnu/lib/libstdc++.a
|
|
|
|
|
2014-08-13 01:13:04 +02:00
|
|
|
# Create the release tarball using (arbitrarily) the first host
|
2013-05-28 01:55:01 +02:00
|
|
|
./autogen.sh
|
2014-08-13 01:13:04 +02:00
|
|
|
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
|
2013-05-28 01:55:01 +02:00
|
|
|
make dist
|
2014-11-26 00:36:55 +01:00
|
|
|
SOURCEDIST=`echo bitcoin-*.tar.gz`
|
|
|
|
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
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
|
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-03-20 12:03:36 +01: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}
|
|
|
|
make install-strip
|
2014-11-26 00:36:55 +01:00
|
|
|
cd installed
|
|
|
|
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} | 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-26 00:36:55 +01:00
|
|
|
cd ../../
|
2014-08-13 01:13:04 +02:00
|
|
|
done
|
2013-05-28 01:55:01 +02:00
|
|
|
mkdir -p $OUTDIR/src
|
2014-11-26 00:36:55 +01:00
|
|
|
mv $SOURCEDIST $OUTDIR/src
|
|
|
|
mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-linux64.tar.gz
|
|
|
|
mv ${OUTDIR}/${DISTNAME}-i686-*.tar.gz ${OUTDIR}/${DISTNAME}-linux32.tar.gz
|
2014-11-20 03:46:40 +01:00
|
|
|
|