diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2015-06-04 21:45:52 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2015-06-09 11:20:35 +0200 |
commit | 048b4aefcea1d9f51d5543f13d8dd1e386b8e52c (patch) | |
tree | df84db2469351c59f24d30fec332c12b8d585f83 /scripts/lib/ptxd_make_world_common.sh | |
parent | eed3ed9d9bab6ef81a822708b8e49710efa482f3 (diff) | |
download | ptxdist-048b4aefcea1d9f51d5543f13d8dd1e386b8e52c.tar.gz ptxdist-048b4aefcea1d9f51d5543f13d8dd1e386b8e52c.tar.xz |
add helper to build python packages
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_make_world_common.sh')
-rw-r--r-- | scripts/lib/ptxd_make_world_common.sh | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh index 4c3c78f9d..d32a166af 100644 --- a/scripts/lib/ptxd_make_world_common.sh +++ b/scripts/lib/ptxd_make_world_common.sh @@ -112,6 +112,10 @@ ptxd_make_world_init_compat() { # install_opt + if [[ -z "${pkg_install_opt}" && "${pkg_conf_tool}" =~ "python" ]]; then + local install_opt_ptr="ptx_install_opt_python_${pkg_type}" + pkg_install_opt="${!install_opt_ptr}" + fi if [ -z "${pkg_install_opt}" ]; then pkg_install_opt="install" @@ -127,7 +131,11 @@ ptxd_make_world_init_compat() { fi # DESTDIR - pkg_install_opt="DESTDIR=\"${pkg_pkg_dir}\" INSTALL_ROOT=\"${pkg_pkg_dir}\" ${pkg_install_opt}" + if [[ "${pkg_conf_tool}" =~ "python" ]]; then + pkg_install_opt="${pkg_install_opt} --root=${pkg_pkg_dir}" + else + pkg_install_opt="DESTDIR=\"${pkg_pkg_dir}\" INSTALL_ROOT=\"${pkg_pkg_dir}\" ${pkg_install_opt}" + fi # # pkg_binconfig_glob @@ -304,6 +312,15 @@ ptxd_make_world_init() { unset conf_opt_ptr conf_env_ptr ;; + python|python3) + local build_python_ptr="ptx_${pkg_conf_tool}_${pkg_type}" + local env_ptr="ptx_conf_env_${pkg_type}" + + ptx_build_python="${!build_python_ptr}" + pkg_make_env="${pkg_conf_env:-${!env_ptr}}" + pkg_make_opt="${pkg_make_opt:-build}" + pkg_install_env="${pkg_conf_env:-${!env_ptr}}" + ;; *) ;; esac |