summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-10-04 19:37:46 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-10-04 19:37:46 (EDT)
commitf549203fe3fbeb8074030cf98ddf4314f93fb571 (patch)
tree55a94ca4e4adac18a21f78e007255e5b357a2eb9 /src
parent08be8e33e55ada3f15ef1c8b49572f7e783325f0 (diff)
Use ob_get_system_path() in utilities.
Diffstat (limited to 'src')
-rw-r--r--src/ob-buildenv.sh6
-rw-r--r--src/ob-installdocs.sh16
-rw-r--r--src/ob-installplatconf.sh3
-rw-r--r--src/opkbuild.sh3
4 files changed, 17 insertions, 11 deletions
diff --git a/src/ob-buildenv.sh b/src/ob-buildenv.sh
index 286c6e2..0b6acfd 100644
--- a/src/ob-buildenv.sh
+++ b/src/ob-buildenv.sh
@@ -72,9 +72,9 @@ EOF
setup_build_flags()
{
- # TODO: Don't hardcode path.
- if [ -r "/usr/local/share/opkhelper/buildflags/${OB_HOST_ARCH_CPU}" ]; then
- . /usr/local/share/opkhelper/buildflags/${OB_HOST_ARCH_CPU}
+ build_flags="$(ob_get_system_path 'buildflags' "${OB_HOST_ARCH}")"
+ if [ -r "${build_flags}" ]; then
+ . "${build_flags}"
fi
}
diff --git a/src/ob-installdocs.sh b/src/ob-installdocs.sh
index 663a29f..cf3aae3 100644
--- a/src/ob-installdocs.sh
+++ b/src/ob-installdocs.sh
@@ -36,27 +36,31 @@ main()
if [ ${?} -ne 0 ]; then
ob_error "$(ob_get_msg 'cant_get_doc_pkg')"
fi
+ doc_pkg_doc_dir="$(ob_get_system_path 'package-docs' \
+ "${doc_pkg}" "${OB_BINARY_VERSION}")"
for pkg in $(ob_get_binary_packages); do
- doc_dir="${pkg}.data/usr/share/doc/${pkg}"
- mkdir -p "${doc_dir}" || \
+ doc_dir="$(ob_get_system_path 'package-docs' \
+ "${pkg}" "${OB_BINARY_VERSION}")"
+ data_doc_dir="${pkg}.data/${doc_dir}"
+ mkdir -p "${data_doc_dir}" || \
ob_error "$(ob_get_msg 'cant_make_doc_dir')"
if [ "${pkg}" = "${doc_pkg}" ]; then
ob_info "$(ob_get_msg 'installing_docs')" "${pkg}"
ob_get_doc_files | while read src dest; do
if [ -f "${src}" ]; then
- mkdir -p "${doc_dir}/${dest%/*}" || \
+ mkdir -p "${data_doc_dir}/${dest%/*}" || \
ob_error "$(ob_get_msg 'cant_make_doc_dir')"
- cp -R "${src}" "${doc_dir}/${dest}" || \
+ cp -R "${src}" "${data_doc_dir}/${dest}" || \
ob_error "$(ob_get_msg 'cant_cp_doc_file')" "${src}"
elif [ -d "${src}" ]; then
- cp -R "${src}/." "${doc_dir}/${dest}" || \
+ cp -R "${src}/." "${data_doc_dir}/${dest}" || \
ob_error "$(ob_get_msg 'cant_cp_doc_file')" "${src}"
fi
done
else
ob_info "$(ob_get_msg 'linking_docs')" "${pkg}"
- ln -s "/usr/share/doc/${doc_pkg}" "${doc_dir}" || \
+ ln -s "${doc_pkg_doc_dir}" "${data_doc_dir}" || \
ob_error "$(ob_get_msg 'cant_ln_doc_dir')"
fi
done
diff --git a/src/ob-installplatconf.sh b/src/ob-installplatconf.sh
index 107a76e..ff88e15 100644
--- a/src/ob-installplatconf.sh
+++ b/src/ob-installplatconf.sh
@@ -63,7 +63,8 @@ copy_config()
ob_error "$(ob_get_msg 'cant_make_config_dest_dir')" "${dest%/*}"
# Find the config package files.
# TODO: Don't hardcode path.
- config_dir_base="/usr/share/config/${OB_HOST_PLATFORM}/${OB_SOURCE}"
+ config_dir_base="$(ob_get_system_path 'platconf' \
+ "${OB_SOURCE}" "${OB_SOURCE_VERSION}" "${OB_HOST_PLATFORM}")"
if [ -d "${config_dir_base}-${OB_SOURCE_VERSION_UPSTREAM}" ]; then
src_base="${config_dir_base}-${OB_SOURCE_VERSION_UPSTREAM}"
elif [ -d "${config_dir_base}" ]; then
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index 18aac09..64c27b6 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -259,7 +259,8 @@ build_source()
{
src="$(ob_get_source_parameter 'Source')"
ver="$(ob_get_source_parameter 'Version')"
- src_pkg_data_base="src:${src}.data/usr/src/${src}_${ver}"
+ src_pkg_data_base="src:${src}.data$(ob_get_system_path 'package-source' \
+ "${src}" "${ver}")"
"${opt_uid0_cmd}" mkdir -p \
"${src_pkg_data_base}" || \