2011-02-01 09:27:14 -08:00
|
|
|
---
|
2017-03-03 20:37:33 -08:00
|
|
|
name: "zcash-1.0.7"
|
2014-08-12 16:13:04 -07:00
|
|
|
enable_cache: true
|
2016-10-10 11:09:40 -07:00
|
|
|
distro: "debian"
|
2011-02-01 09:27:14 -08:00
|
|
|
suites:
|
2016-10-08 11:21:06 -07:00
|
|
|
- "jessie"
|
2011-02-01 09:27:14 -08:00
|
|
|
architectures:
|
|
|
|
- "amd64"
|
2015-12-25 04:14:26 -08:00
|
|
|
packages:
|
2015-10-28 23:29:48 -07:00
|
|
|
- "autoconf"
|
2013-05-27 16:55:01 -07:00
|
|
|
- "automake"
|
2013-09-10 12:15:10 -07:00
|
|
|
- "bsdmainutils"
|
2014-08-12 16:13:04 -07:00
|
|
|
- "binutils-gold"
|
2015-11-19 04:25:08 -08:00
|
|
|
- "ca-certificates"
|
2016-10-14 19:27:25 -07:00
|
|
|
- "faketime"
|
2016-10-07 03:06:03 -07:00
|
|
|
- "g++-multilib"
|
|
|
|
- "git-core"
|
|
|
|
- "libc6-dev"
|
|
|
|
- "libtool"
|
|
|
|
- "m4"
|
|
|
|
- "ncurses-dev"
|
|
|
|
- "pkg-config"
|
2015-11-19 04:25:08 -08:00
|
|
|
- "python"
|
2016-10-07 03:06:03 -07:00
|
|
|
- "unzip"
|
|
|
|
- "wget"
|
|
|
|
- "zlib1g-dev"
|
2011-02-01 09:27:14 -08:00
|
|
|
remotes:
|
2016-10-07 03:06:03 -07:00
|
|
|
- "url": "https://github.com/zcash/zcash.git"
|
|
|
|
"dir": "zcash"
|
2014-08-12 16:13:04 -07:00
|
|
|
files: []
|
2011-02-01 09:27:14 -08:00
|
|
|
script: |
|
2014-08-12 16:13:04 -07:00
|
|
|
WRAP_DIR=$HOME/wrapped
|
2016-10-10 18:33:00 -07:00
|
|
|
HOSTS="x86_64-unknown-linux-gnu"
|
|
|
|
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests --with-gui=no --enable-hardening"
|
2016-10-14 18:14:32 -07:00
|
|
|
MAKEOPTS="V=1 NO_QT=1"
|
2014-08-12 16:13:04 -07:00
|
|
|
FAKETIME_HOST_PROGS=""
|
2016-06-07 19:09:28 -07:00
|
|
|
FAKETIME_PROGS="date ar ranlib nm strip objcopy"
|
2016-10-10 18:33:00 -07:00
|
|
|
HOST_CFLAGS="-fwrapv -fno-strict-aliasing -Werror -g"
|
|
|
|
HOST_CXXFLAGS="-fwrapv -fno-strict-aliasing -Werror -g"
|
2016-06-07 19:09:28 -07:00
|
|
|
HOST_LDFLAGS=-static-libstdc++
|
2014-08-12 16:13:04 -07:00
|
|
|
|
2016-10-10 18:33:00 -07:00
|
|
|
export QT_RCC_TEST=0
|
2014-08-12 16:13:04 -07: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
|
|
|
|
|
2016-04-05 04:29:04 -07:00
|
|
|
function create_global_faketime_wrappers {
|
2014-08-12 16:13:04 -07:00
|
|
|
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-28 23:29:48 -07:00
|
|
|
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
2016-04-05 04:29:04 -07:00
|
|
|
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
|
2014-08-12 16:13:04 -07:00
|
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${prog}
|
|
|
|
done
|
2016-04-05 04:29:04 -07:00
|
|
|
}
|
2014-08-12 16:13:04 -07:00
|
|
|
|
2016-04-05 04:29:04 -07:00
|
|
|
function create_per-host_faketime_wrappers {
|
2014-08-12 16:13:04 -07:00
|
|
|
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-28 23:29:48 -07:00
|
|
|
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
2016-04-05 04:29:04 -07:00
|
|
|
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
|
2014-08-12 16:13:04 -07:00
|
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${i}-${prog}
|
|
|
|
done
|
|
|
|
done
|
2016-04-05 04:29:04 -07:00
|
|
|
}
|
|
|
|
|
2014-08-12 16:13:04 -07:00
|
|
|
export PATH=${WRAP_DIR}:${PATH}
|
2014-03-20 04:03:36 -07:00
|
|
|
|
2016-04-05 04:29:04 -07:00
|
|
|
# Faketime for depends so intermediate results are comparable
|
|
|
|
create_global_faketime_wrappers "2000-01-01 12:00:00"
|
|
|
|
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
|
|
|
|
2016-10-07 03:06:03 -07:00
|
|
|
cd zcash
|
2014-08-12 16:13:04 -07:00
|
|
|
BASEPREFIX=`pwd`/depends
|
|
|
|
# Build dependencies for each host
|
|
|
|
for i in $HOSTS; do
|
2016-10-14 18:14:32 -07:00
|
|
|
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
|
2014-08-12 16:13:04 -07:00
|
|
|
done
|
|
|
|
|
2016-04-05 04:29:04 -07:00
|
|
|
# Faketime for binaries
|
|
|
|
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
|
|
|
|
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
|
|
|
|
|
2014-08-12 16:13:04 -07:00
|
|
|
# Create the release tarball using (arbitrarily) the first host
|
2013-05-27 16:55:01 -07:00
|
|
|
./autogen.sh
|
2016-06-07 11:51:51 -07:00
|
|
|
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
|
2013-05-27 16:55:01 -07:00
|
|
|
make dist
|
2016-10-07 03:06:03 -07:00
|
|
|
SOURCEDIST=`echo zcash-*.tar.gz`
|
2014-11-25 15:36:55 -08:00
|
|
|
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
|
2014-11-19 18:46:40 -08:00
|
|
|
# Correct tar file order
|
|
|
|
mkdir -p temp
|
|
|
|
pushd temp
|
2014-11-25 15:36:55 -08:00
|
|
|
tar xf ../$SOURCEDIST
|
2016-10-07 03:06:03 -07:00
|
|
|
find zcash* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
|
2014-11-19 18:46:40 -08:00
|
|
|
popd
|
|
|
|
|
2014-08-12 16:13:04 -07: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-25 15:36:55 -08:00
|
|
|
INSTALLPATH=`pwd`/installed/${DISTNAME}
|
|
|
|
mkdir -p ${INSTALLPATH}
|
|
|
|
tar --strip-components=1 -xf ../$SOURCEDIST
|
2014-03-20 04:03:36 -07:00
|
|
|
|
2016-06-07 19:09:28 -07: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}" LDFLAGS="${HOST_LDFLAGS}"
|
2014-08-12 16:13:04 -07:00
|
|
|
make ${MAKEOPTS}
|
2016-07-21 12:41:06 -07:00
|
|
|
make ${MAKEOPTS} -C src check-security
|
2016-06-07 19:09:28 -07:00
|
|
|
make install DESTDIR=${INSTALLPATH}
|
2014-11-25 15:36:55 -08:00
|
|
|
cd installed
|
|
|
|
find . -name "lib*.la" -delete
|
|
|
|
find . -name "lib*.a" -delete
|
|
|
|
rm -rf ${DISTNAME}/lib/pkgconfig
|
2016-06-07 19:09:28 -07:00
|
|
|
find ${DISTNAME}/bin -type f -executable -exec objcopy --only-keep-debug {} {}.dbg \; -exec strip -s {} \; -exec objcopy --add-gnu-debuglink={}.dbg {} \;
|
|
|
|
find ${DISTNAME}/lib -type f -exec objcopy --only-keep-debug {} {}.dbg \; -exec strip -s {} \; -exec objcopy --add-gnu-debuglink={}.dbg {} \;
|
|
|
|
find ${DISTNAME} -not -name "*.dbg" | 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
|
|
|
|
find ${DISTNAME} -name "*.dbg" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}-debug.tar.gz
|
2014-11-25 15:36:55 -08:00
|
|
|
cd ../../
|
2016-06-07 19:09:28 -07:00
|
|
|
rm -rf distsrc-${i}
|
2014-08-12 16:13:04 -07:00
|
|
|
done
|
2013-05-27 16:55:01 -07:00
|
|
|
mkdir -p $OUTDIR/src
|
2014-11-25 15:36:55 -08:00
|
|
|
mv $SOURCEDIST $OUTDIR/src
|
2016-06-07 19:09:28 -07:00
|
|
|
mv ${OUTDIR}/${DISTNAME}-x86_64-*-debug.tar.gz ${OUTDIR}/${DISTNAME}-linux64-debug.tar.gz
|
2014-11-25 15:36:55 -08:00
|
|
|
mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-linux64.tar.gz
|