2014-01-15 10:12:24 +01:00
|
|
|
---
|
|
|
|
name: "bitcoin"
|
|
|
|
suites:
|
|
|
|
- "precise"
|
|
|
|
architectures:
|
|
|
|
- "i386"
|
|
|
|
- "amd64"
|
|
|
|
packages:
|
2014-01-31 21:37:43 +01:00
|
|
|
- "g++"
|
2014-01-15 10:12:24 +01:00
|
|
|
- "unzip"
|
2014-01-15 21:51:37 +01:00
|
|
|
- "zip"
|
2014-01-15 10:12:24 +01:00
|
|
|
- "pkg-config"
|
|
|
|
- "libtool"
|
|
|
|
- "faketime"
|
|
|
|
- "bsdmainutils"
|
|
|
|
reference_datetime: "2013-06-01 00:00:00"
|
|
|
|
remotes: []
|
|
|
|
files:
|
2014-08-07 09:42:22 +02:00
|
|
|
- "openssl-1.0.1i.tar.gz"
|
2014-04-09 13:08:59 +02:00
|
|
|
- "miniupnpc-1.9.tar.gz"
|
2014-01-15 10:12:24 +01:00
|
|
|
- "qrencode-3.4.3.tar.bz2"
|
|
|
|
- "protobuf-2.5.0.tar.bz2"
|
|
|
|
- "db-4.8.30.NC.tar.gz"
|
|
|
|
script: |
|
|
|
|
STAGING="$HOME/install"
|
2014-02-06 11:57:45 +01:00
|
|
|
TEMPDIR="$HOME/tmp"
|
2014-01-15 10:12:24 +01:00
|
|
|
OPTFLAGS='-O2'
|
2014-02-03 22:22:07 +01:00
|
|
|
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
|
|
|
export FAKETIME=$REFERENCE_DATETIME
|
|
|
|
export TZ=UTC
|
2014-01-15 10:12:24 +01:00
|
|
|
export LIBRARY_PATH="$STAGING/lib"
|
|
|
|
# Integrity Check
|
2014-08-07 09:42:22 +02:00
|
|
|
echo "3c179f46ca77069a6a0bac70212a9b3b838b2f66129cb52d568837fc79d8fcc7 openssl-1.0.1i.tar.gz" | sha256sum -c
|
2014-04-09 13:08:59 +02:00
|
|
|
echo "2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464 miniupnpc-1.9.tar.gz" | sha256sum -c
|
2014-01-15 10:12:24 +01:00
|
|
|
echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98 qrencode-3.4.3.tar.bz2" | sha256sum -c
|
|
|
|
echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c
|
|
|
|
echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz" | sha256sum -c
|
|
|
|
|
2014-01-15 20:39:49 +01:00
|
|
|
#
|
2014-08-07 09:42:22 +02:00
|
|
|
tar xzf openssl-1.0.1i.tar.gz
|
|
|
|
cd openssl-1.0.1i
|
2014-01-15 20:39:49 +01:00
|
|
|
# need -fPIC to avoid relocation error in 64 bit builds
|
|
|
|
./config no-shared no-zlib no-dso no-krb5 --openssldir=$STAGING -fPIC
|
2014-02-03 22:22:07 +01:00
|
|
|
# need to build OpenSSL with faketime because a timestamp is embedded into cversion.o
|
2014-01-15 20:39:49 +01:00
|
|
|
make
|
|
|
|
make install_sw
|
|
|
|
cd ..
|
|
|
|
#
|
2014-04-09 13:08:59 +02:00
|
|
|
tar xzfm miniupnpc-1.9.tar.gz
|
|
|
|
cd miniupnpc-1.9
|
2014-01-15 10:12:24 +01:00
|
|
|
# miniupnpc is always built with -fPIC
|
|
|
|
INSTALLPREFIX=$STAGING make $MAKEOPTS install
|
|
|
|
rm -f $STAGING/lib/libminiupnpc.so* # no way to skip shared lib build
|
|
|
|
cd ..
|
|
|
|
#
|
2014-02-03 22:22:07 +01:00
|
|
|
tar xjf qrencode-3.4.3.tar.bz2
|
2014-01-15 10:12:24 +01:00
|
|
|
cd qrencode-3.4.3
|
2014-02-03 22:22:07 +01:00
|
|
|
unset FAKETIME # unset fake time during configure, as it does some clock sanity tests
|
2014-01-15 10:12:24 +01:00
|
|
|
# need --with-pic to avoid relocation error in 64 bit builds
|
2014-02-04 11:55:19 +01:00
|
|
|
./configure --prefix=$STAGING --enable-static --disable-shared --with-pic --without-tools --disable-dependency-tracking
|
2014-02-03 22:22:07 +01:00
|
|
|
# Workaround to prevent re-configuring by make; make all files have a date in the past
|
|
|
|
find . -print0 | xargs -r0 touch -t 200001010000
|
|
|
|
export FAKETIME=$REFERENCE_DATETIME
|
2014-01-15 10:12:24 +01:00
|
|
|
make $MAKEOPTS install
|
|
|
|
cd ..
|
|
|
|
#
|
2014-02-03 22:22:07 +01:00
|
|
|
tar xjf protobuf-2.5.0.tar.bz2
|
2014-01-15 10:12:24 +01:00
|
|
|
cd protobuf-2.5.0
|
|
|
|
mkdir -p $STAGING/host/bin
|
2014-02-03 22:22:07 +01:00
|
|
|
unset FAKETIME # unset fake time during configure, as it does some clock sanity tests
|
2014-01-15 10:12:24 +01:00
|
|
|
# need --with-pic to avoid relocation error in 64 bit builds
|
2014-02-04 11:55:19 +01:00
|
|
|
./configure --prefix=$STAGING --bindir=$STAGING/host/bin --enable-static --disable-shared --with-pic --without-zlib
|
2014-02-03 22:22:07 +01:00
|
|
|
# Workaround to prevent re-configuring by make; make all files have a date in the past
|
|
|
|
find . -print0 | xargs -r0 touch -t 200001010000
|
|
|
|
export FAKETIME=$REFERENCE_DATETIME
|
2014-01-15 10:12:24 +01:00
|
|
|
make $MAKEOPTS install
|
|
|
|
cd ..
|
|
|
|
#
|
|
|
|
tar xzf db-4.8.30.NC.tar.gz
|
|
|
|
cd db-4.8.30.NC/build_unix
|
|
|
|
# need --with-pic to avoid relocation error in 64 bit builds
|
|
|
|
../dist/configure --prefix=$STAGING --enable-cxx --disable-shared --with-pic
|
2014-02-03 22:22:07 +01:00
|
|
|
# Workaround to prevent re-configuring by make; make all files have a date in the past
|
|
|
|
find . -print0 | xargs -r0 touch -t 200001010000
|
2014-01-15 10:12:24 +01:00
|
|
|
make $MAKEOPTS library_build
|
|
|
|
make install_lib install_include
|
|
|
|
cd ../..
|
2014-02-06 11:57:45 +01:00
|
|
|
# post-process all generated libraries to be deterministic
|
|
|
|
# extract them to a temporary directory then re-build them deterministically
|
|
|
|
for LIB in $(find $STAGING -name \*.a); do
|
|
|
|
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
|
|
|
|
ar xv $LIB | cut -b5- > /tmp/list.txt
|
|
|
|
rm $LIB
|
|
|
|
ar crsD $LIB $(cat /tmp/list.txt)
|
|
|
|
done
|
2014-01-15 10:12:24 +01:00
|
|
|
#
|
|
|
|
cd $STAGING
|
2014-08-07 09:42:22 +02:00
|
|
|
find include lib bin host | sort | zip -X@ $OUTDIR/bitcoin-deps-linux${GBUILD_BITS}-gitian-r7.zip
|