summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh2
-rw-r--r--dist/dist_digest.dist (renamed from vars/invariants_digest.vars)2
-rw-r--r--dist/dist_gitref.dist (renamed from vars/invariants_gitref.vars)2
-rw-r--r--dist/dist_minipix.dist (renamed from vars/invariants_minipix.vars)14
-rw-r--r--dist/dist_zipdist.dist (renamed from vars/invariants_zipdist.vars)10
-rw-r--r--groups/999.dist.group10
-rw-r--r--groups/999.invariants.group10
-rw-r--r--subr/build_init.subr4
-rw-r--r--subr/ex_pkg_env.subr6
9 files changed, 33 insertions, 27 deletions
diff --git a/build.sh b/build.sh
index 16087116..0a09c250 100755
--- a/build.sh
+++ b/build.sh
@@ -42,7 +42,7 @@ buildp_dispatch_pkg_state() {
local _msg="${1}" _group_name="${2}" _pkg_name="${3}";
case "${_msg}" in
disabled_pkg) : $((BUILD_NSKIP+=1)); rtl_log_msg vnfo "$(printf "Skipping disabled package \`%s'." "${_pkg_name}")"; ;;
- missing_pkg) rtl_log_msg failexit "Error: package \`${_pkg_name}' missing in build.vars."; ;;
+ missing_pkg) rtl_log_msg failexit "Error: unknown package \`${_pkg_name}'."; ;;
msg_pkg) shift 3; rtl_log_msg vucc "$(printf "%s/%s: %s" "${_group_name}" "${_pkg_name}" "${*}")"; ;;
skipped_pkg) : $((BUILD_NSKIP+=1)); rtl_log_msg vnfo "$(printf "Skipping finished package \`%s'." "${_pkg_name}")"; ;;
start_pkg) rtl_log_msg info "$(printf "[%03d/%03d] Starting \`%s' build..." "${4}" "${5}" "${_pkg_name}")"; ;;
diff --git a/vars/invariants_digest.vars b/dist/dist_digest.dist
index 0a444655..335b63e7 100644
--- a/vars/invariants_digest.vars
+++ b/dist/dist_digest.dist
@@ -2,7 +2,7 @@
# set +o errexit -o noglob is assumed.
#
-pkg_invariants_digest_all() {
+pkg_dist_digest_all() {
local _fname="";
if rtl_lmatch "${ARG_DIST}" "tbz2" "," \
|| rtl_lmatch "${ARG_DIST}" "tgz" "," \
diff --git a/vars/invariants_gitref.vars b/dist/dist_gitref.dist
index 755656c3..a04b0f01 100644
--- a/vars/invariants_gitref.vars
+++ b/dist/dist_gitref.dist
@@ -2,7 +2,7 @@
# set +o errexit -o noglob is assumed.
#
-pkg_invariants_gitref_all() {
+pkg_dist_gitref_all() {
(rtl_fileop cd "${MIDIPIX_BUILD_PWD}" && git rev-parse HEAD > "${PREFIX}/build.gitref");
};
diff --git a/vars/invariants_minipix.vars b/dist/dist_minipix.dist
index 1c188eca..04267d3b 100644
--- a/vars/invariants_minipix.vars
+++ b/dist/dist_minipix.dist
@@ -2,7 +2,7 @@
# set +o errexit -o noglob is assumed.
#
-pkgp_invariants_minipix_is_newer() {
+pkgp_dist_minipix_is_newer() {
local _new_fname="${1}" _new_ts="" _old_dname="${2}" _old_ts="";
if ! _old_ts="$(stat -c %Y "${_old_dname%%/}/${_new_fname##*/}" 2>/dev/null)" \
|| ! _new_ts="$(stat -c %Y "${_new_fname}" 2>/dev/null)"; then
@@ -14,7 +14,7 @@ pkgp_invariants_minipix_is_newer() {
fi;
};
-pkg_invariants_minipix_all() {
+pkg_dist_minipix_all() {
local _dname="" _fname="" _pname="";
if rtl_lmatch "${ARG_DIST}" "minipix" ","; then
for _dname in "${PREFIX_MINIPIX}/bin" "${PREFIX_MINIPIX}/share"; do
@@ -24,13 +24,13 @@ pkg_invariants_minipix_all() {
done;
for _fname in clear reset tset; do
if [ -e "${PREFIX_NATIVE}/bin/${_fname}" ]\
- && pkgp_invariants_minipix_is_newer "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin"; then
+ && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin"; then
rtl_fileop cp_follow "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin";
fi;
done;
for _pname in $([ -e "${PREFIX}/minipix_dist/bin" ] && find "${PREFIX}/minipix_dist/bin" \
-maxdepth 1 -perm /a=x -type f -and \( -not -name "lib*" \)); do
- if pkgp_invariants_minipix_is_newer "${_pname}" "${PREFIX_MINIPIX}/bin"; then
+ if pkgp_dist_minipix_is_newer "${_pname}" "${PREFIX_MINIPIX}/bin"; then
rtl_fileop cp_follow "${_pname}" "${PREFIX_MINIPIX}/bin";
fi;
done;
@@ -40,7 +40,7 @@ pkg_invariants_minipix_all() {
libu16ports.so.0 libtinfo.so.6 libtinfow.so.6 libunistring.so.2 \
libuuid.so.1; do
if [ -e "${PREFIX_NATIVE}/lib/${_fname}" ]\
- && pkgp_invariants_minipix_is_newer "${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin"; then
+ && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin"; then
rtl_fileop cp_follow \
"${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin";
fi;
@@ -52,7 +52,7 @@ pkg_invariants_minipix_all() {
done;
for _fname in nano vim; do
if [ -e "${PREFIX}/minipix_dist/share/${_fname}" ]\
- && pkgp_invariants_minipix_is_newer "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share"; then
+ && pkgp_dist_minipix_is_newer "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share"; then
rtl_fileop cp_follow "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share";
fi;
done;
@@ -68,7 +68,7 @@ pkg_invariants_minipix_all() {
rtl_fileop mkdir "${PREFIX_MINIPIX}/${_dname}";
fi;
if [ -e "${PREFIX_NATIVE}/${_dname}/${_fname}" ]\
- && pkgp_invariants_minipix_is_newer "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}"; then
+ && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}"; then
rtl_fileop cp_follow "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}";
fi;
done;
diff --git a/vars/invariants_zipdist.vars b/dist/dist_zipdist.dist
index 09633997..36c45892 100644
--- a/vars/invariants_zipdist.vars
+++ b/dist/dist_zipdist.dist
@@ -2,10 +2,10 @@
# set +o errexit -o noglob is assumed.
#
-pkg_invariants_zipdist_all() {
+pkg_dist_zipdist_all() {
local _dist_fname="" _pkg_name="" _pkglist_fname="${PREFIX}/pkglist.native";
if rtl_lmatch "${ARG_DIST}" "zipdist" ","; then
- echo "msg_pkg invariants invariants_zipdist Building deployable distribution ZIP archive..." >&3;
+ 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
@@ -30,17 +30,17 @@ pkg_invariants_zipdist_all() {
--target="${DEFAULT_TARGET}" \
--tmproot="${BUILD_WORKDIR}/zipdist/tmproot" \
--zipfile="${PREFIX}/${_dist_fname}";
- echo "msg_pkg invariants invariants_zipdist Finished building deployable distribution ZIP archive." >&3;
+ 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 invariants invariants_zipdist Signing deployable distribution ZIP archive..." >&3;
+ 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 invariants invariants_zipdist Signed deployable distribution ZIP archive." >&3;
+ echo "msg_pkg dist dist_zipdist Signed deployable distribution ZIP archive." >&3;
rtl_log_msg info "Signed deployable distribution ZIP archive.";
fi;
fi;
diff --git a/groups/999.dist.group b/groups/999.dist.group
new file mode 100644
index 00000000..01af27f4
--- /dev/null
+++ b/groups/999.dist.group
@@ -0,0 +1,10 @@
+#
+# Build group dist
+#
+DIST_FORCE=1;
+DIST_NO_LOG_VARS=1;
+DIST_PACKAGES="dist_digest dist_gitref dist_minipix dist_zipdist";
+: ${PKG_DIST_TARBALLS_DEPENDS:="dist_digest dist_minipix"};
+: ${PKG_DIST_ZIPDIST_DEPENDS:="dist_minipix"};
+
+# vim:filetype=sh textwidth=0
diff --git a/groups/999.invariants.group b/groups/999.invariants.group
deleted file mode 100644
index f2aa5b87..00000000
--- a/groups/999.invariants.group
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Build group invariants
-#
-INVARIANTS_FORCE=1;
-INVARIANTS_NO_LOG_VARS=1;
-INVARIANTS_PACKAGES="invariants_digest invariants_gitref invariants_minipix invariants_zipdist";
-: ${PKG_INVARIANTS_TARBALLS_DEPENDS:="invariants_digest invariants_minipix"};
-: ${PKG_INVARIANTS_ZIPDIST_DEPENDS:="invariants_minipix"};
-
-# vim:filetype=sh textwidth=0
diff --git a/subr/build_init.subr b/subr/build_init.subr
index 213bf7d6..aebe3b0e 100644
--- a/subr/build_init.subr
+++ b/subr/build_init.subr
@@ -231,7 +231,9 @@ buildp_init_vars() {
if [ -z "${BUILD_GROUPS}" ]; then
BUILD_GROUPS="${_default_build_groups}";
fi;
- BUILD_GROUPS="$(rtl_lconcat "$(rtl_lfilter "${BUILD_GROUPS}" "invariants")" "invariants")";
+ if [ -n "${ARG_DIST}" ]; then
+ BUILD_GROUPS="$(rtl_lconcat "$(rtl_lfilter "${BUILD_GROUPS}" "dist")" "dist")";
+ fi;
for _group in ${BUILD_GROUPS}; do
if ! rtl_lmatch "${_groups}" "${_group}"; then
_rc=1; _status="Error: unknown build group \`${_group}'."; break;
diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr
index 7f58d3d0..9b0d9437 100644
--- a/subr/ex_pkg_env.subr
+++ b/subr/ex_pkg_env.subr
@@ -85,7 +85,11 @@ exp_pkg_env_set() {
ex_pkg_env() {
local _build_steps_default="${1}" _build_vars_default="${2}" _group_name="${3}" \
_pkg_name="${4}" _restart_at="${5}" _workdir="${6}" _vname="";
- rtl_fileop source_opt "vars/${_pkg_name}.vars";
+ if [ "${_group_name}" = "dist" ]; then
+ rtl_fileop source_opt "dist/${_pkg_name}.dist";
+ else
+ rtl_fileop source_opt "vars/${_pkg_name}.vars";
+ fi;
if ! exp_pkg_env_set "${_build_vars_default}" "${_group_name}" "${_pkg_name}"\
|| ! exp_pkg_env_defaults "${_build_steps_default}" "${_pkg_name}" "${_workdir}"; then
return "${?}";