diff options
author | P. J. McDermott <pjm@nac.net> | 2012-10-23 23:13:42 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-10-23 23:13:42 (EDT) |
commit | e5f49eb31fd010af3594e0a3227ff4c63ec32314 (patch) | |
tree | a0118c68ab4f78e0ec837150a5ec2705b9face6b | |
parent | 4c84ad7c560c2f93aaba43b56e1aec4334038d20 (diff) |
Implement ob_set_package_substvars().
-rw-r--r-- | lib/package.sh | 17 | ||||
-rw-r--r-- | lib/package/2.sh | 27 |
2 files changed, 44 insertions, 0 deletions
diff --git a/lib/package.sh b/lib/package.sh index 6a77ca0..63d599a 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -334,6 +334,23 @@ ob_summarize_package_plat() return ${?} } +ob_set_package_substvars() +{ + _ob_local _obspsv_pkg + + if [ ${#} -eq 1 ]; then + _obspsv_pkg="${1}" + else + _ob_return 125 + return ${?} + fi + + _ob_package_do 'set_package_substvars' "${_obspsv_pkg}" + + _ob_return ${?} + return ${?} +} + _ob_package_do() { _ob_local _obpd_func diff --git a/lib/package/2.sh b/lib/package/2.sh index 745369f..d9f049a 100644 --- a/lib/package/2.sh +++ b/lib/package/2.sh @@ -153,3 +153,30 @@ EOF _ob_return 0 return ${?} } + +_ob_set_package_substvars_2() +{ + _ob_local _obspsv2_pkg + + if [ ${#} -eq 1 ]; then + _obspsv2_pkg="${1}" + else + _ob_return 125 + return ${?} + fi + + ob_parse_control "${_OB_PACKAGE_DIR}/substvars" _ob_substvar_2 + + ob_set_substvar 'Source-Version' "$(ob_get_source_parameter 'Version')" + ob_set_substvar 'Binary-Version' "$(ob_get_source_parameter 'Version')" +} + +_ob_substvar_2() +{ + _ob_local + + ob_set_substvar "${OB_CONTROL_NAME}" "${OB_CONTROL_VALUE}" + + _ob_return 0 + return ${?} +} |