2011-02-01 09:27:14 -08:00
|
|
|
---
|
|
|
|
name: "bitcoin"
|
|
|
|
suites:
|
2014-01-14 04:20:30 -08:00
|
|
|
- "precise"
|
2011-02-01 09:27:14 -08:00
|
|
|
architectures:
|
|
|
|
- "i386"
|
|
|
|
- "amd64"
|
|
|
|
packages:
|
2014-01-31 12:37:43 -08:00
|
|
|
- "g++"
|
2011-10-14 08:38:37 -07:00
|
|
|
- "libqt4-dev"
|
2011-02-01 09:27:14 -08:00
|
|
|
- "git-core"
|
2011-08-23 05:33:53 -07:00
|
|
|
- "unzip"
|
2012-02-15 11:42:51 -08:00
|
|
|
- "pkg-config"
|
2013-05-27 16:55:01 -07:00
|
|
|
- "autoconf2.13"
|
|
|
|
- "libtool"
|
|
|
|
- "automake"
|
|
|
|
- "faketime"
|
2013-09-10 12:15:10 -07:00
|
|
|
- "bsdmainutils"
|
2013-07-21 23:50:39 -07:00
|
|
|
reference_datetime: "2013-06-01 00:00:00"
|
2011-02-01 09:27:14 -08:00
|
|
|
remotes:
|
|
|
|
- "url": "https://github.com/bitcoin/bitcoin.git"
|
|
|
|
"dir": "bitcoin"
|
|
|
|
files:
|
2014-04-07 22:26:22 -07:00
|
|
|
- "bitcoin-deps-linux32-gitian-r4.zip"
|
|
|
|
- "bitcoin-deps-linux64-gitian-r4.zip"
|
2014-01-15 11:01:27 -08:00
|
|
|
- "boost-linux32-1.55.0-gitian-r1.zip"
|
|
|
|
- "boost-linux64-1.55.0-gitian-r1.zip"
|
2011-02-01 09:27:14 -08:00
|
|
|
script: |
|
2013-05-27 16:55:01 -07:00
|
|
|
STAGING="$HOME/install"
|
2014-01-14 04:20:30 -08:00
|
|
|
OPTFLAGS='-O2'
|
2014-01-15 01:12:24 -08:00
|
|
|
BINDIR="${OUTDIR}/bin/${GBUILD_BITS}" # 32/64 bit build specific output directory
|
2014-02-05 07:44:58 -08:00
|
|
|
TEMPDIR="$HOME/tempdir"
|
|
|
|
export TZ=UTC
|
2013-05-27 16:55:01 -07:00
|
|
|
export LIBRARY_PATH="$STAGING/lib"
|
2014-01-15 01:12:24 -08:00
|
|
|
mkdir -p ${BINDIR}
|
2011-04-27 16:26:14 -07:00
|
|
|
#
|
2014-01-15 01:12:24 -08:00
|
|
|
mkdir -p $STAGING
|
|
|
|
cd $STAGING
|
2014-04-07 22:26:22 -07:00
|
|
|
unzip ../build/bitcoin-deps-linux${GBUILD_BITS}-gitian-r4.zip
|
2014-01-15 11:01:27 -08:00
|
|
|
unzip ../build/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip
|
2014-01-15 01:12:24 -08:00
|
|
|
cd ../build
|
2014-03-20 04:03:36 -07:00
|
|
|
|
|
|
|
function do_configure {
|
|
|
|
./configure "$@" --enable-upnp-default --prefix=$STAGING --with-protoc-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}" BOOST_CHRONO_EXTRALIBS="-lrt"
|
|
|
|
}
|
2014-01-14 04:20:30 -08:00
|
|
|
#
|
2011-04-27 16:26:14 -07:00
|
|
|
cd bitcoin
|
2013-05-27 16:55:01 -07:00
|
|
|
./autogen.sh
|
2014-03-20 04:03:36 -07:00
|
|
|
do_configure
|
2013-05-27 16:55:01 -07:00
|
|
|
make dist
|
2014-02-05 07:44:58 -08:00
|
|
|
DISTNAME=`echo bitcoin-*.tar.gz`
|
2014-03-20 04:03:36 -07:00
|
|
|
|
|
|
|
# Build dynamic versions of everything
|
|
|
|
# (with static linking to boost and openssl as well a some non-OS deps)
|
2013-05-27 16:55:01 -07:00
|
|
|
mkdir -p distsrc
|
|
|
|
cd distsrc
|
2014-02-05 07:44:58 -08:00
|
|
|
tar --strip-components=1 -xf ../$DISTNAME
|
2014-03-20 04:03:36 -07:00
|
|
|
do_configure --bindir=$BINDIR
|
2011-10-14 08:38:37 -07:00
|
|
|
make $MAKEOPTS
|
2013-05-27 16:55:01 -07:00
|
|
|
make $MAKEOPTS install-strip
|
2014-03-20 04:03:36 -07:00
|
|
|
make $MAKEOPTS clean
|
|
|
|
|
|
|
|
# Build fully static versions of bitcoind and bitcoin-cli for older Linux distros
|
|
|
|
STATIC_BINDIR="$HOME/bindir.static"
|
|
|
|
mkdir -p $STATIC_BINDIR
|
|
|
|
# For 32-bit, -pie cannot be used with -static, as invalid executables are generated
|
|
|
|
# For 64-bit, -pie with -static causes a link error
|
|
|
|
# Disable hardening in configure and manually pass 'static-safe' hardening flags
|
|
|
|
OPTFLAGS='-O2 -static -Wstack-protector -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now'
|
|
|
|
do_configure --bindir=$STATIC_BINDIR --disable-tests --enable-upnp-default --without-gui --disable-hardening
|
|
|
|
make $MAKEOPTS
|
|
|
|
make $MAKEOPTS install-strip
|
|
|
|
cp $STATIC_BINDIR/bitcoind $BINDIR/bitcoind.static
|
|
|
|
cp $STATIC_BINDIR/bitcoin-cli $BINDIR/bitcoin-cli.static
|
2014-02-05 07:44:58 -08:00
|
|
|
|
|
|
|
# sort distribution tar file and normalize user/group/mtime information for deterministic output
|
2013-05-27 16:55:01 -07:00
|
|
|
mkdir -p $OUTDIR/src
|
2014-02-05 07:44:58 -08:00
|
|
|
rm -rf $TEMPDIR
|
|
|
|
mkdir -p $TEMPDIR
|
|
|
|
cd $TEMPDIR
|
|
|
|
tar -xvf $HOME/build/bitcoin/$DISTNAME | sort | tar --no-recursion -cT /dev/stdin --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 --mtime="$REFERENCE_DATETIME" | gzip -n > $OUTDIR/src/$DISTNAME
|