summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/package.sh38
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/package.sh b/lib/package.sh
index 8a02725..b4a0d97 100644
--- a/lib/package.sh
+++ b/lib/package.sh
@@ -17,19 +17,19 @@
# You should have received a copy of the GNU General Public License
# along with opkbuild. If not, see <http://www.gnu.org/licenses/>.
-_OB_PACKAGE_DIR=
-_OB_PACKAGE_FORMAT=
-_OB_BINARY_PACKAGES=
+_ob_package_dir=
+_ob_package_format=
+_ob_binary_packages=
_ob_got_binary_packages=false
-_OB_SOURCE_PARAMETERS=
-_OB_BINARY_PARAMETERS=
+_ob_source_parameters=
+_ob_binary_parameters=
_ob_package_do()
{
local func="${1}"
shift 1 || _ob_abort
- "_ob_${func}_${_OB_PACKAGE_FORMAT}" "${@}" || return ${?}
+ "_ob_${func}_${_ob_package_format}" "${@}" || return ${?}
return 0
}
@@ -48,22 +48,22 @@ ob_init_package()
local dir="${1}"
shift 1 || _ob_abort
- _OB_PACKAGE_DIR="$(cd -- "${dir}" && pwd)"
+ _ob_package_dir="$(cd -- "${dir}" && pwd)"
- if [ -r "${_OB_PACKAGE_DIR}/format" ]; then
- case "$(cat -- "${_OB_PACKAGE_DIR}/format")" in
+ if [ -r "${_ob_package_dir}/format" ]; then
+ case "$(cat -- "${_ob_package_dir}/format")" in
2.0)
- _OB_PACKAGE_FORMAT='2'
+ _ob_package_format='2'
;;
esac
fi
- if [ -z "${_OB_PACKAGE_FORMAT}" ]; then
+ if [ -z "${_ob_package_format}" ]; then
_ob_error_msg 'unable_to_detect_package_format'
return 1
fi
- _OB_BINARY_PACKAGES=
+ _ob_binary_packages=
_ob_package_do 'parse_package_metadata' || return ${?}
@@ -116,7 +116,7 @@ ob_get_binary_packages()
pkgs_clean=' '
- for pkg in ${_OB_BINARY_PACKAGES}; do
+ for pkg in ${_ob_binary_packages}; do
# Validate the name.
if ! ob_validate_binary_name "${pkg}"; then
@@ -136,7 +136,7 @@ ob_get_binary_packages()
esac
pkgs_clean="${pkgs_clean}${pkg_clean} "
- _OB_BINARY_PACKAGES="${_OB_BINARY_PACKAGES} ${pkgs}"
+ _ob_binary_packages="${_ob_binary_packages} ${pkgs}"
done
@@ -146,7 +146,7 @@ ob_get_binary_packages()
pkgs=''
- for pkg in ${_OB_BINARY_PACKAGES}; do
+ for pkg in ${_ob_binary_packages}; do
if [ -n "${host_arch}" ] && ! ob_arch_is_concerned \
"${host_arch}" "$(ob_get_binary_parameter \
"${pkg}" 'Architecture')"; then
@@ -283,7 +283,7 @@ _ob_set_binary_packages()
local packages="${1}"
shift 1 || _ob_abort
- _OB_BINARY_PACKAGES="${packages}"
+ _ob_binary_packages="${packages}"
return 0
}
@@ -303,7 +303,7 @@ _ob_set_source_parameter()
EOF
)"
- _OB_SOURCE_PARAMETERS="${_OB_SOURCE_PARAMETERS} ${name}"
+ _ob_source_parameters="${_ob_source_parameters} ${name}"
eval "_OB_SRCFIELD_${name}=\"\${value}\""
@@ -336,11 +336,11 @@ _ob_set_binary_parameter()
EOF
)"
- case " ${_OB_BINARY_PARAMETERS} " in
+ case " ${_ob_binary_parameters} " in
*" ${name} "*)
;;
*)
- _OB_BINARY_PARAMETERS="${_OB_BINARY_PARAMETERS} ${name}"
+ _ob_binary_parameters="${_ob_binary_parameters} ${name}"
;;
esac