2018-10-09 16:16:55 -06:00
|
|
|
---
|
2020-09-08 19:45:53 -06:00
|
|
|
name: "monero-osx-0.17"
|
2018-10-09 16:16:55 -06:00
|
|
|
enable_cache: true
|
|
|
|
suites:
|
|
|
|
- "bionic"
|
|
|
|
architectures:
|
|
|
|
- "amd64"
|
|
|
|
packages:
|
|
|
|
- "ca-certificates"
|
|
|
|
- "curl"
|
|
|
|
- "g++"
|
|
|
|
- "git"
|
|
|
|
- "pkg-config"
|
|
|
|
- "autoconf"
|
|
|
|
- "libtool"
|
|
|
|
- "automake"
|
|
|
|
- "faketime"
|
|
|
|
- "bsdmainutils"
|
|
|
|
- "cmake"
|
|
|
|
- "libcap-dev"
|
|
|
|
- "libz-dev"
|
|
|
|
- "libbz2-dev"
|
|
|
|
- "python"
|
|
|
|
- "python-dev"
|
|
|
|
- "python-setuptools"
|
|
|
|
remotes:
|
|
|
|
- "url": "https://github.com/monero-project/monero.git"
|
|
|
|
"dir": "monero"
|
|
|
|
files:
|
|
|
|
- "MacOSX10.11.sdk.tar.gz"
|
|
|
|
script: |
|
|
|
|
WRAP_DIR=$HOME/wrapped
|
|
|
|
HOSTS="x86_64-apple-darwin11"
|
|
|
|
FAKETIME_HOST_PROGS=""
|
2019-11-17 04:14:31 -07:00
|
|
|
FAKETIME_PROGS="ar ranlib date dmg genisoimage python"
|
2018-10-09 16:16:55 -06:00
|
|
|
|
|
|
|
export GZIP="-9n"
|
|
|
|
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}
|
2021-08-30 22:19:09 -06:00
|
|
|
export GITIAN=1
|
2018-10-09 16:16:55 -06:00
|
|
|
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
|
|
|
|
fi
|
|
|
|
|
|
|
|
export ZERO_AR_DATE=1
|
|
|
|
|
|
|
|
function create_global_faketime_wrappers {
|
|
|
|
for prog in ${FAKETIME_PROGS}; do
|
|
|
|
echo '#!/usr/bin/env 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/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
|
|
|
|
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
|
|
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${prog}
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
function create_per-host_faketime_wrappers {
|
|
|
|
for i in $HOSTS; do
|
|
|
|
for prog in ${FAKETIME_HOST_PROGS}; do
|
|
|
|
echo '#!/usr/bin/env 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/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
|
|
|
|
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
|
|
|
|
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
|
|
|
|
chmod +x ${WRAP_DIR}/${i}-${prog}
|
|
|
|
done
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
# Faketime for depends so intermediate results are comparable
|
|
|
|
export PATH_orig=${PATH}
|
|
|
|
create_global_faketime_wrappers "2000-01-01 12:00:00"
|
|
|
|
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
|
|
|
export PATH=${WRAP_DIR}:${PATH}
|
|
|
|
|
2019-06-12 08:16:17 -06:00
|
|
|
git config --global core.abbrev 9
|
2018-10-09 16:16:55 -06:00
|
|
|
cd monero
|
2019-06-27 14:25:20 -06:00
|
|
|
# Set the version string that gets added to the tar archive name
|
|
|
|
version="`git describe`"
|
|
|
|
if [[ $version == *"-"*"-"* ]]; then
|
|
|
|
version="`git rev-parse --short=9 HEAD`"
|
|
|
|
version="`echo $version | head -c 9`"
|
|
|
|
fi
|
|
|
|
|
2018-10-09 16:16:55 -06:00
|
|
|
BASEPREFIX=`pwd`/contrib/depends
|
|
|
|
|
|
|
|
mkdir -p ${BASEPREFIX}/SDKs
|
|
|
|
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.11.sdk.tar.gz
|
|
|
|
|
|
|
|
# Build dependencies for each host
|
2019-11-13 07:23:31 -07:00
|
|
|
export TAR_OPTIONS=--mtime=2000-01-01T12:00:00
|
2018-10-09 16:16:55 -06:00
|
|
|
for i in $HOSTS; do
|
|
|
|
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Faketime for binaries
|
|
|
|
export PATH=${PATH_orig}
|
|
|
|
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
|
|
|
|
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
|
|
|
|
export PATH=${WRAP_DIR}:${PATH}
|
|
|
|
|
|
|
|
ORIGPATH="$PATH"
|
|
|
|
# Build in a new dir for each host
|
2019-11-13 07:23:31 -07:00
|
|
|
export TAR_OPTIONS=--mtime=${REFERENCE_DATE}T${REFERENCE_TIME}
|
2018-10-09 16:16:55 -06:00
|
|
|
for i in ${HOSTS}; do
|
|
|
|
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake .. -DCMAKE_TOOLCHAIN_FILE=${BASEPREFIX}/${i}/share/toolchain.cmake
|
2019-06-11 17:09:49 -06:00
|
|
|
make ${MAKEOPTS}
|
2019-11-03 22:05:38 -07:00
|
|
|
chmod 755 bin/*
|
2021-10-14 08:30:43 -06:00
|
|
|
cp ../LICENSE ../README.md ../docs/ANONYMITY_NETWORKS.md bin
|
|
|
|
chmod 644 bin/LICENSE bin/*.md
|
2019-06-27 14:25:20 -06:00
|
|
|
DISTNAME=monero-${i}-${version}
|
2018-10-09 16:16:55 -06:00
|
|
|
mv bin ${DISTNAME}
|
2019-11-03 22:05:38 -07:00
|
|
|
find ${DISTNAME}/ | sort | tar --no-recursion --owner=0 --group=0 -c -T - | bzip2 -9 > ${OUTDIR}/${DISTNAME}.tar.bz2
|
2018-10-09 16:16:55 -06:00
|
|
|
cd ..
|
|
|
|
rm -rf build
|
|
|
|
done
|
|
|
|
|