#!/bin/bash
# dev/package/load - package configuration file support

set -e

lib_load 'dev/package/git'


######
# Library Configuration

dev_package_load_config_init() {
	lib_setting_vars -ro package_i7 system_i7 site_i7
	package_i7="$package_repodir/package.i7"
	system_i7="$package_repodir/system.i7"
	site_i7="$package_repodir/site.i7"

	lib_setting_vars -ro --null PREFIX
	lib_setting_vars -ro EXEC_PREFIX DATA_PREFIX \
			PKG VERSION AUTHOR \
			URL SUPPORT_NAME SUPPORT_EMAIL
	lib_setting_arrays -ro APPS CONF LIBS DIST GROUP_ORDER
	lib_setting_assocs -ro GROUP_NAMES

	lib_setting_vars RELEASE_TYPE

	lib_setting_vars DOWNLOAD_SCHEME DOWNLOAD_HOST DOWNLOAD_PATH
	lib_setting_vars PUBLISH_SSH_HOST PUBLISH_SSH_PATH

	# site specific settings (in site.i7)
	lib_setting_vars -ro --null SITE_BRANCH SITE_VERSION

	config_pkg_files_append "$package_i7" "$system_i7" "$site_i7"
}

dev_package_load_config_check() {
	RELEASE_TYPE=${RELEASE_TYPE:-release}
	case "$RELEASE_TYPE" in
	(debug|release) ;;
	(*) error "\$RELEASE_TYPE is not valid: $RELEASE_TYPE" ;;
	esac

	EXEC_PREFIX=${EXEC_PREFIX:-${PREFIX:-/usr}}
	DATA_PREFIX=${DATA_PREFIX:-${PREFIX:-/var}}
}

is_package_release() { [ "$RELEASE_TYPE" = release ]; }

View the Script Reference Index


Generated on Tue Apr 25 21:20:39 PDT 2017 by mcsh i7 v0.18.0.