From c27beab66023847435fb88cd5cc75916dca37057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Mon, 20 Nov 2017 21:45:21 +0000 Subject: Refactors build steps along the sequence {setup,fetch,configure,build,install}. subr/mode_check_updates.subr: seperated into check_updates.sh. subr/post_{copy_etc,sha256sums,tarballs}.subr: absorbed into `dist' target. --- subr/post_tarballs.subr | 95 ------------------------------------------------- 1 file changed, 95 deletions(-) delete mode 100644 subr/post_tarballs.subr (limited to 'subr/post_tarballs.subr') diff --git a/subr/post_tarballs.subr b/subr/post_tarballs.subr deleted file mode 100644 index 2082366b..00000000 --- a/subr/post_tarballs.subr +++ /dev/null @@ -1,95 +0,0 @@ -# -# set -o errexit -o noglob are assumed. -# - -postp_tarball_dist() { - TARBALL_FNAME="${TARBALL_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.${TARBALL_SUFFIX}"; - tar -cpf - $(find . -maxdepth 2 -mindepth 1 -type d \ - -not -path ./${PREFIX_BASENAME} \ - -not -path ./${PREFIX_BASENAME}.bak \ - -not -path ./${PREFIX_BASENAME}.bak/\* \ - -not -path ./tmp -not -path ./tmp/\*) \ - midipix_shortcut.vbs midipix.sh README SHA256SUMS |\ - "${TARBALL_COMPRESS_CMD}" ${TARBALL_COMPRESS_ARGS} -c > "${TARBALL_FNAME}"; - log_msg info "Finished building binary distribution tarball."; - if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_SIGN_GPG_KEY}" ] && \ - gpg --list-keys "${TARBALL_SIGN_GPG_KEY}" >/dev/null 2>&1; then - gpg --armor --passphrase-file /dev/null \ - --local-user "${TARBALL_SIGN_GPG_KEY}" --sign "${TARBALL_FNAME}"; - log_msg info "Signed binary distribution tarball."; - fi; -}; - -postp_tarball_toolchain() { - TARBALL_CROSS_FNAME="${TARBALL_CROSS_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.${TARBALL_SUFFIX}"; - tar -cpf - bin include lib lib64 libexec share "${TARGET}" |\ - "${TARBALL_COMPRESS_CMD}" ${TARBALL_COMPRESS_ARGS} -c > "${TARBALL_CROSS_FNAME}"; - log_msg info "Finished building toolchain tarball."; - if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_SIGN_GPG_KEY}" ] && \ - gpg --list-keys "${TARBALL_SIGN_GPG_KEY}" >/dev/null 2>&1; then - gpg --armor --passphrase-file /dev/null \ - --local-user "${TARBALL_SIGN_GPG_KEY}" --sign "${TARBALL_CROSS_FNAME}"; - log_msg info "Signed toolchain tarball."; - fi; -}; - -postp_tarball_minipix() { - TARBALL_MINIPIX_FNAME="${TARBALL_MINIPIX_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.${TARBALL_SUFFIX}"; - tar -cpf - minipix \ - midipix_shortcut.vbs midipix.sh README |\ - "${TARBALL_COMPRESS_CMD}" ${TARBALL_COMPRESS_ARGS} -c > "${TARBALL_MINIPIX_FNAME}"; - log_msg info "Finished building binary Minipix distribution tarball."; - if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_SIGN_GPG_KEY}" ] && \ - gpg --list-keys "${TARBALL_SIGN_GPG_KEY}" >/dev/null 2>&1; then - gpg --armor --passphrase-file /dev/null \ - --local-user "${TARBALL_SIGN_GPG_KEY}" --sign "${TARBALL_MINIPIX_FNAME}"; - log_msg info "Signed binary Minipix distribution tarball."; - fi; -}; - -postp_tarball_src() { - TARBALL_SRC_FNAME="${TARBALL_SRC_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.${TARBALL_SUFFIX}"; - log_msg info "Building source tarball..."; - tar -cpf - $(find tmp -mindepth 2 -maxdepth 2 \ - -not -path tmp/.\* \ - -not -path tmp/ntctty/.git \ - -not -path tmp/psxscl/.git \ - -not -path tmp/ptycon/.git) |\ - "${TARBALL_COMPRESS_CMD}" ${TARBALL_COMPRESS_ARGS} -c > "${TARBALL_SRC_FNAME}"; - log_msg info "Finished building source tarball."; - if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_SIGN_GPG_KEY}" ] && \ - gpg --list-keys "${TARBALL_SIGN_GPG_KEY}" >/dev/null 2>&1; then - gpg --armor --passphrase-file /dev/null \ - --local-user "${TARBALL_SIGN_GPG_KEY}" --sign "${TARBALL_SRC_FNAME}"; - log_msg info "Signed source tarball."; - fi; -}; - -post_tarballs() { - if [ "${BUILD_SCRIPT_RC:-0}" -eq 0 ]\ - && [ "${ARG_TARBALL:-0}" -eq 1 ]; then - log_msg info "Building distribution tarballs..."; - case "${TARBALL_SUFFIX}" in - bz2) if [ -n "$(which pbzip2 2>/dev/null)" ]; then - TARBALL_COMPRESS_CMD="pbzip2"; - else - TARBALL_COMPRESS_CMD="bzip2"; - fi; ;; - gz) if [ -n "$(which pigz 2>/dev/null)" ]; then - TARBALL_COMPRESS_CMD="pigz"; - else - TARBALL_COMPRESS_CMD="gzip"; - fi; ;; - xz) TARBALL_COMPRESS_CMD="xz"; - TARBALL_COMPRESS_ARGS="-T0"; ;; - *) log_msg failexit "Unknown tarball suffix \`.${TARBALL_SUFFIX}'."; - esac; - build_fileop cd "${PREFIX}"; PREFIX_BASENAME="${PREFIX_NATIVE##*/}"; - postp_tarball_dist; postp_tarball_toolchain; postp_tarball_minipix; - if [ "${BUILD}" = "debug" ]; then - postp_tarball_src; - fi; - fi; -}; - -# vim:filetype=sh -- cgit v1.2.3