Skip to content

Commit 5566ed3

Browse files
authored
Update gitian-osx.yml
1 parent 1bd7659 commit 5566ed3

File tree

1 file changed

+65
-138
lines changed

1 file changed

+65
-138
lines changed

contrib/gitian-descriptors/gitian-osx.yml

+65-138
Original file line numberDiff line numberDiff line change
@@ -7,150 +7,77 @@ suites:
77
architectures:
88
- "amd64"
99
packages:
10-
- "ca-certificates"
11-
- "curl"
12-
- "g++"
13-
- "git"
10+
- "libdb4.8++-dev"
11+
- "qt4-qmake"
12+
- "libqt4-dev"
13+
- "libboost-system-dev"
14+
- "libboost-filesystem-dev"
15+
- "libboost-program-options-dev"
16+
- "libboost-thread-dev"
17+
- "libssl-dev"
18+
- "git-core"
19+
- "unzip"
1420
- "pkg-config"
15-
- "autoconf"
16-
- "librsvg2-bin"
17-
- "libtiff-tools"
18-
- "libtool"
19-
- "automake"
20-
- "faketime"
21-
- "bsdmainutils"
22-
- "cmake"
23-
- "imagemagick"
24-
- "libz-dev"
21+
- "libpng12-dev"
2522
- "python3"
2623
- "python3-pip"
27-
- "python3-setuptools"
28-
- "fonts-tuffy"
29-
- "xorriso"
30-
- "libtinfo5"
31-
- "pigz"
24+
reference_datetime: "2011-01-30 00:00:00"
3225
remotes:
3326
- "url": "https://github.com/ldoge/ldoge.git"
3427
"dir": "litedoge"
3528
files:
36-
- "https://github.com/ldoge/ldoge.git"
29+
- "miniupnpc-1.6.tar.gz"
30+
- "qrencode-3.2.0.tar.bz2"
31+
- "qt-win32-4.7.4-gitian.zip"
32+
- "boost-win32-1.47.0-gitian.zip"
33+
- "ppcoin-deps-0.0.1.zip"
34+
- "openssl-1.0.1b.tar.gz"
35+
- "db-4.8.30.NC.tar.gz"
36+
- "miniupnpc-1.6.tar.gz"
37+
- "zlib-1.2.7.tar.gz"
38+
- "libpng-1.5.12.tar.gz"
39+
- "qrencode-3.2.0.tar.bz2"
3740
script: |
38-
set -e -o pipefail
39-
40-
WRAP_DIR=$HOME/wrapped
41-
HOSTS="x86_64-apple-darwin18"
42-
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-tests --disable-gui-tests --disable-fuzz-binary --with-gui XORRISOFS=${WRAP_DIR}/xorrisofs DMG=${WRAP_DIR}/dmg"
43-
FAKETIME_HOST_PROGS=""
44-
FAKETIME_PROGS="ar ranlib date dmg xorrisofs"
45-
46-
export TZ="UTC"
47-
export BUILD_DIR="$PWD"
48-
mkdir -p ${WRAP_DIR}
49-
if test -n "$GBUILD_CACHE_ENABLED"; then
50-
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
51-
export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
52-
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
53-
fi
54-
55-
export ZERO_AR_DATE=1
56-
57-
# Use $LIB in LD_PRELOAD to avoid hardcoding the dir (See `man ld.so`)
58-
function create_global_faketime_wrappers {
59-
for prog in ${FAKETIME_PROGS}; do
60-
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
61-
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
62-
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${prog}
63-
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
64-
echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${prog}
65-
chmod +x ${WRAP_DIR}/${prog}
66-
done
67-
}
68-
69-
function create_per-host_faketime_wrappers {
70-
for i in $HOSTS; do
71-
for prog in ${FAKETIME_HOST_PROGS}; do
72-
echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
73-
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
74-
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog}
75-
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
76-
echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${i}-${prog}
77-
chmod +x ${WRAP_DIR}/${i}-${prog}
78-
done
79-
done
80-
}
81-
82-
pip3 install lief==0.12.3
83-
84-
# Faketime for depends so intermediate results are comparable
85-
export PATH_orig=${PATH}
86-
create_global_faketime_wrappers "2000-01-01 12:00:00"
87-
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
88-
export PATH=${WRAP_DIR}:${PATH}
89-
41+
INSTDIR="$HOME/install"
42+
export LIBRARY_PATH="$INSTDIR/lib"
43+
#
44+
tar xzf miniupnpc-1.6.tar.gz
45+
cd miniupnpc-1.6
46+
INSTALLPREFIX=$INSTDIR make $MAKEOPTS install
47+
cd ..
48+
#
49+
tar xjf qrencode-3.2.0.tar.bz2
50+
cd qrencode-3.2.0
51+
./configure --prefix=$INSTDIR --enable-static --disable-shared
52+
make $MAKEOPTS install
53+
cd ..
54+
#
9055
cd litedoge
91-
BASEPREFIX="${PWD}/depends"
92-
93-
mkdir -p ${BASEPREFIX}/SDKs
94-
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz
95-
96-
# Build dependencies for each host
97-
for i in $HOSTS; do
98-
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
99-
done
100-
101-
# Faketime for binaries
102-
export PATH=${PATH_orig}
103-
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
104-
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
105-
export PATH=${WRAP_DIR}:${PATH}
106-
107-
# Define DISTNAME variable.
108-
# shellcheck source=contrib/gitian-descriptors/assign_DISTNAME
109-
source contrib/gitian-descriptors/assign_DISTNAME
110-
111-
GIT_ARCHIVE="${OUTDIR}/src/${DISTNAME}.tar.gz"
112-
113-
# Create the source tarball
114-
mkdir -p "$(dirname "$GIT_ARCHIVE")"
115-
git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD
116-
117-
ORIGPATH="$PATH"
118-
# Extract the git archive into a dir for each host and build
119-
for i in ${HOSTS}; do
120-
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
121-
mkdir -p distsrc-${i}
122-
cd distsrc-${i}
123-
INSTALLPATH="${PWD}/installed/${DISTNAME}"
124-
mkdir -p ${INSTALLPATH}
125-
tar --strip-components=1 -xf "${GIT_ARCHIVE}"
126-
127-
./autogen.sh
128-
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
129-
make ${MAKEOPTS}
130-
make ${MAKEOPTS} -C src check-security
131-
make ${MAKEOPTS} -C src check-symbols
132-
make install-strip INCLUDEPATH="$INSTDIR/include" LIBS="-L$INSTDIR/lib" RELEASE=1
133-
134-
make litedoge-qt
135-
make -f makefile.unix STATIC=1 OPENSSL_INCLUDE_PATH="$INSTDIR/include" OPENSSL_LIB_PATH="$INSTDIR/lib" $MAKEOPTS litedoged USE_UPNP=1 DEBUGFLAGS=
136-
mkdir -p -p $OUTDIR/bin/$GBUILD_BITS
137-
cp osx_volname unsigned-app-${i}/
138-
cp contrib/macdeploy/detached-sig-apply.sh unsigned-app-${i}
139-
cp contrib/macdeploy/detached-sig-create.sh unsigned-app-${i}
140-
cp ${BASEPREFIX}/${i}/native/bin/dmg unsigned-app-${i}
141-
mv dist unsigned-app-${i}
142-
pushd unsigned-app-${i}
143-
find . | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | pigz -9n > ${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz
144-
popd
145-
146-
make deploy OSX_DMG="${OUTDIR}/${DISTNAME}-osx-litedoge-qt.dmg"
147-
148-
cd installed
149-
find . -name "lib*.la" -delete
150-
find . -name "lib*.a" -delete
151-
rm -rf ${DISTNAME}/lib/pkgconfig
152-
find ${DISTNAME} | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | pigz -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
153-
cd ../../
154-
done
155-
156-
mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-osx64.tar.gz
56+
mkdir -p $OUTDIR/src
57+
git archive HEAD | tar -x -C $OUTDIR/src
58+
cp $OUTDIR/src/doc/README $OUTDIR
59+
cp $OUTDIR/src/COPYING $OUTDIR
60+
cd src
61+
make -f makefile.unix STATIC=1 OPENSSL_INCLUDE_PATH="$INSTDIR/include" OPENSSL_LIB_PATH="$INSTDIR/lib" $MAKEOPTS litedoged USE_UPNP=1 DEBUGFLAGS=
62+
mkdir -p $OUTDIR/bin/$GBUILD_BITS
63+
install -s litedoged $OUTDIR/bin/$GBUILD_BITS
64+
#
65+
cd ..
66+
67+
68+
# Install signapple
69+
cd signapple
70+
python3 -m pip install -U pip setuptools
71+
python3 -m pip install .
72+
export PATH="$HOME/.local/bin":$PATH
73+
cd ..
74+
75+
UNSIGNED_TARBALL=litedoge-osx-unsigned.tar.gz
76+
UNSIGNED_APP=dist/Litedoge-Qt.app
77+
SIGNED=litedoge-osx-signed.dmg
78+
79+
tar -xf ${UNSIGNED_TARBALL}
80+
OSX_VOLNAME="$(cat osx_volname)"
81+
./detached-sig-apply.sh ${UNSIGNED_APP} signature/osx/dist
82+
${WRAP_DIR}/xorrisofs -D -l -V "${OSX_VOLNAME}" -no-pad -r -dir-mode 0755 -o uncompressed.dmg signed-app
83+
${WRAP_DIR}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED}

0 commit comments

Comments
 (0)