summaryrefslogtreecommitdiffhomepage
path: root/dist/dist_zipdist.dist
diff options
context:
space:
mode:
Diffstat (limited to 'dist/dist_zipdist.dist')
-rw-r--r--dist/dist_zipdist.dist49
1 files changed, 49 insertions, 0 deletions
diff --git a/dist/dist_zipdist.dist b/dist/dist_zipdist.dist
new file mode 100644
index 00000000..36c45892
--- /dev/null
+++ b/dist/dist_zipdist.dist
@@ -0,0 +1,49 @@
+#
+# set +o errexit -o noglob is assumed.
+#
+
+pkg_dist_zipdist_all() {
+ local _dist_fname="" _pkg_name="" _pkglist_fname="${PREFIX}/pkglist.native";
+ if rtl_lmatch "${ARG_DIST}" "zipdist" ","; then
+ echo "msg_pkg dist dist_zipdist Building deployable distribution ZIP archive..." >&3;
+ rtl_log_msg info "Finished building deployable distribution ZIP archive.";
+ for _pkg_name in $(cat "${_pkglist_fname}"); do
+ if ! stat "${BUILD_WORKDIR}/${_pkg_name}-native-${DEFAULT_TARGET}" >/dev/null 2>&1; then
+ rtl_log_msg failexit "Error: missing package build directory for package \`${_pkg_name}'.";
+ fi;
+ done;
+ _dist_fname="${DEFAULT_ZIPDIST_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.zip";
+ if [ -e "${BUILD_WORKDIR}/zipdist" ]; then
+ rtl_fileop rm "${BUILD_WORKDIR}/zipdist";
+ fi;
+ rtl_fileop mkdir "${BUILD_WORKDIR}/zipdist";
+ "${BUILD_WORKDIR}/mpackage/mpackage.sh" \
+ --defroot="${DEFAULT_ZIPDIST_DEFROOT}" \
+ --flysyms \
+ --minroot="${PREFIX_MINIPIX}" \
+ --objroot="${BUILD_WORKDIR}" \
+ --pkgroot="${BUILD_WORKDIR}/zipdist/pkgroot" \
+ --product=Midipix \
+ --subset="${_pkglist_fname}" \
+ --symbols \
+ --sysroot="${BUILD_WORKDIR}/zipdist/sysroot" \
+ --target="${DEFAULT_TARGET}" \
+ --tmproot="${BUILD_WORKDIR}/zipdist/tmproot" \
+ --zipfile="${PREFIX}/${_dist_fname}";
+ echo "msg_pkg dist dist_zipdist Finished building deployable distribution ZIP archive." >&3;
+ rtl_log_msg info "Finished building deployable distribution ZIP archive.";
+ if [ -n "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" ]\
+ && [ -x "$(which gpg 2>/dev/null)" ]\
+ && gpg --list-keys "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" >/dev/null 2>&1; then
+ echo "msg_pkg dist dist_zipdist Signing deployable distribution ZIP archive..." >&3;
+ rtl_log_msg info "Signing deployable distribution ZIP archive...";
+ gpg --armor --passphrase-file /dev/null \
+ --local-user "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" \
+ --sign "${PREFIX}/${_dist_fname}";
+ echo "msg_pkg dist dist_zipdist Signed deployable distribution ZIP archive." >&3;
+ rtl_log_msg info "Signed deployable distribution ZIP archive.";
+ fi;
+ fi;
+};
+
+# vim:filetype=sh