| |
| |
| |
| |
| 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 ${MSG_zipdist_begin}" >&3; |
| rtl_log_msg "zipdist" "${MSG_zipdist_begin}"; |
| for _pkg_name in $(cat "${_pkglist_fname}"); do |
| if [ ! -e "${BUILD_WORKDIR}/${_pkg_name}-native-${DEFAULT_TARGET}" ]; then |
| rtl_log_msg "fatalexit" "${MSG_zipdist_missing_pkg_build_dir}" "${_pkg_name}"; |
| fi; |
| done; |
| _dist_fname="${DEFAULT_ZIPDIST_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.zip"; |
| if [ -e "${BUILD_WORKDIR}/zipdist" ]\ |
| && ! rtl_fileop rm "${BUILD_WORKDIR}/zipdist"; then |
| return 1; |
| elif ! rtl_fileop mkdir "${BUILD_WORKDIR}/zipdist"; then |
| return 1; |
| elif ! "${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}"; then |
| return 1; |
| else |
| echo "msg_pkg dist dist_zipdist ${MSG_zipdist_finished}" >&3; |
| rtl_log_msg "zipdist" "${MSG_zipdist_finished}"; |
| 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 ${MSG_zipdist_signing}" >&3; |
| rtl_log_msg "zipdist" "${MSG_zipdist_signing}"; |
| if ! gpg --armor --passphrase-file /dev/null \ |
| --local-user "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" \ |
| --sign "${PREFIX}/${_dist_fname}"; then |
| return 1; |
| fi; |
| echo "msg_pkg dist dist_zipdist ${MSG_zipdist_signed}" >&3; |
| rtl_log_msg "zipdist" "${MSG_zipdist_signed}"; |
| fi; |
| fi; |
| fi; |
| }; |
| |
| |