]> Git Repo - VerusCoin.git/blame - makeReleaseMac.sh
Merge branch 'dev' of https://github.com/miketout/veruscoin into dev
[VerusCoin.git] / makeReleaseMac.sh
CommitLineData
3412ed51 1#!/bin/sh
17eb3699 2
761f6b23
A
3DIST_DIR=verus-cli
4mkdir ${DIST_DIR}
522c4984 5
398d3395 6cp src/fiat/verus \
522c4984
AD
7 src/verusd \
8 doc/man/verus-cli/mac/README.txt \
9 zcutil/fetch-params.sh \
10 verus-cli
11mv verus-cli/fetch-params.sh verus-cli/fetch-params
761f6b23
A
12chmod +x ${DIST_DIR}/fetch-params
13chmod +x ${DIST_DIR}/verus
14chmod +x ${DIST_DIR}/verusd
c2d0ef72 15
761f6b23 16binaries=("verus" "verusd")
c444a898 17alllibs=()
f60687ca
DD
18for binary in "${binaries[@]}";
19do
c2d0ef72 20 # do the work in the destination directory
761f6b23
A
21 cp src/${binary} ${DIST_DIR}
22 # find the dylibs to copy for verusd
23 DYLIBS=`otool -L ${DIST_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'`
398d3395 24 DYLIBS+=" /usr/local/opt/libidn2/lib/libidn2.0.dylib"
761f6b23 25 echo "copying ${DYLIBS} to ${DIST_DIR}"
f60687ca 26 # copy the dylibs to the srcdir
761f6b23 27 for dylib in ${DYLIBS}; do cp -rf ${dylib} ${DIST_DIR}; done
f60687ca 28done
464a17ce 29
398d3395 30libraries=("libgcc_s.1.dylib" "libgomp.1.dylib" "libidn2.0.dylib" "libstdc++.6.dylib")
464a17ce
DD
31
32for binary in "${libraries[@]}";
33do
761f6b23
A
34 # find the dylibs to copy for verusd
35 DYLIBS=`otool -L ${DIST_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'`
36 echo "copying ${DYLIBS} to ${DIST_DIR}"
464a17ce 37 # copy the dylibs to the srcdir
761f6b23 38 for dylib in ${DYLIBS}; do cp -rf ${dylib} ${DIST_DIR}; alllibs+=(${dylib}); done
464a17ce
DD
39done
40
17eb3699 41indirectlibraries=("libintl.8.dylib" "libunistring.2.dylib")
464a17ce 42
e3938c8e 43for binary in "${indirectlibraries[@]}";
464a17ce
DD
44do
45 # Need to undo this for the dylibs when we are done
761f6b23
A
46 chmod 755 ${DIST_DIR}/${binary}
47 # find the dylibs to copy for verusd
48 DYLIBS=`otool -L ${DIST_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'`
49 echo "copying indirect ${DYLIBS} to ${DIST_DIR}"
c2d0ef72 50 # copy the dylibs to the dest dir
761f6b23 51 for dylib in ${DYLIBS}; do cp -rf ${dylib} ${DIST_DIR}; alllibs+=(${dylib}); done
c444a898
DD
52done
53
54for binary in "${binaries[@]}";
55do
761f6b23 56 # modify verusd to point to dylibs
522c4984 57 echo "modifying ${binary} to use local libraries"
c2d0ef72 58 for dylib in "${alllibs[@]}"
238baa09 59 do
522c4984 60 echo "Next lib is ${dylib} "
761f6b23 61 install_name_tool -change ${dylib} @executable_path/`basename ${dylib}` ${DIST_DIR}/${binary}
c71c9923 62 done
761f6b23 63 chmod +x ${DIST_DIR}/${binary}
c71c9923 64done
c2d0ef72 65
c71c9923
DD
66for binary in "${libraries[@]}";
67do
68 # modify libraries to point to dylibs
522c4984 69 echo "modifying ${binary} to use local libraries"
c71c9923
DD
70 for dylib in "${alllibs[@]}"
71 do
522c4984 72 echo "Next lib is ${dylib} "
761f6b23 73 install_name_tool -change ${dylib} @executable_path/`basename ${dylib}` ${DIST_DIR}/${binary}
c2d0ef72 74 done
464a17ce 75done
c71c9923 76
This page took 0.049939 seconds and 4 git commands to generate.