2 name: "bitcoin-linux-0.10"
18 reference_datetime: "2013-06-01 00:00:00"
20 - "url": "https://github.com/bitcoin/bitcoin.git"
24 WRAP_DIR=$HOME/wrapped
25 HOSTS="i686-pc-linux-gnu x86_64-unknown-linux-gnu"
26 CONFIGFLAGS="--enable-upnp-default --enable-glibc-back-compat"
27 FAKETIME_HOST_PROGS=""
28 FAKETIME_PROGS="date ar ranlib nm strip"
32 export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
34 export BUILD_DIR=`pwd`
36 if test -n "$GBUILD_CACHE_ENABLED"; then
37 export SOURCES_PATH=${GBUILD_COMMON_CACHE}
38 export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
39 mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
42 # Create global faketime wrappers
43 for prog in ${FAKETIME_PROGS}; do
44 echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
45 echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
46 echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
47 echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
48 echo "\$REAL \$@" >> $WRAP_DIR/${prog}
49 chmod +x ${WRAP_DIR}/${prog}
52 # Create per-host faketime wrappers
54 for prog in ${FAKETIME_HOST_PROGS}; do
55 echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
56 echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
57 echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
58 echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
59 echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
60 chmod +x ${WRAP_DIR}/${i}-${prog}
63 export PATH=${WRAP_DIR}:${PATH}
66 BASEPREFIX=`pwd`/depends
67 # Build dependencies for each host
69 make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
72 # Create the release tarball using (arbitrarily) the first host
74 ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
76 DISTNAME=`echo bitcoin-*.tar.gz`
78 # Correct tar file order
82 find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$DISTNAME
86 # Extract the release tarball into a dir for each host and build
88 export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
91 tar --strip-components=1 -xf ../$DISTNAME
93 ./configure --prefix=${BASEPREFIX}/${i} --bindir=${OUTDIR}/${i}/bin --includedir=${OUTDIR}/${i}/include --libdir=${OUTDIR}/${i}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
99 mv $DISTNAME $OUTDIR/src
100 mv ${OUTDIR}/x86_64-* ${OUTDIR}/64
101 mv ${OUTDIR}/i686-* ${OUTDIR}/32
103 # Delete unwanted stuff
104 find ${OUTDIR} -name "lib*.la" -delete