File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 4
4
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
5
export LC_ALL=C
6
6
set -e -o pipefail
7
+
8
+ # Environment variables for determinism
9
+ export TAR_OPTIONS=" --owner=0 --group=0 --numeric-owner --mtime='@${SOURCE_DATE_EPOCH} ' --sort=name"
7
10
export TZ=UTC
8
11
9
12
# Although Guix _does_ set umask when building its own packages (in our case,
@@ -82,15 +85,32 @@ mkdir -p "$DISTSRC"
82
85
done
83
86
;;
84
87
* darwin* )
85
- # Apply detached codesignatures to dist/ (in-place)
86
- signapple apply dist/Bitcoin-Qt.app codesignatures/osx/dist/Bitcoin-Qt.app
88
+ case " $HOST " in
89
+ arm64* ) ARCH=" arm64" ;;
90
+ x86_64* ) ARCH=" x86_64" ;;
91
+ esac
92
+
93
+ # Apply detached codesignatures (in-place)
94
+ signapple apply dist/Bitcoin-Qt.app codesignatures/osx/" ${HOST} " /dist/Bitcoin-Qt.app
95
+ find " ${DISTNAME} " -wholename " */bin/*" -type f | while read -r bin
96
+ do
97
+ signapple apply " ${bin} " " codesignatures/osx/${HOST} /${bin} .${ARCH} sign"
98
+ done
87
99
88
100
# Make a .zip from dist/
89
101
cd dist/
90
102
find . -print0 \
91
103
| xargs -0r touch --no-dereference --date=" @${SOURCE_DATE_EPOCH} "
92
104
find . | sort \
93
105
| zip -X@ " ${OUTDIR} /${DISTNAME} -${HOST} .zip"
106
+ cd ..
107
+
108
+ # Make a .tar.gz from bins
109
+ find " ${DISTNAME} " -print0 \
110
+ | sort --zero-terminated \
111
+ | tar --create --no-recursion --mode=' u+rw,go+r-w,a+X' --null --files-from=- \
112
+ | gzip -9n > " ${OUTDIR} /${DISTNAME} -${HOST} .tar.gz" \
113
+ || ( rm -f " ${OUTDIR} /${DISTNAME} -${HOST} .tar.gz" && exit 1 )
94
114
;;
95
115
* )
96
116
exit 1
You can’t perform that action at this time.
0 commit comments