summaryrefslogtreecommitdiffstats
path: root/scripts/lib/ptxd_make_world_install.sh
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2010-04-20 11:45:46 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2010-04-22 12:11:02 +0200
commit61fccbbd14d2bb377db6c000f3364151ed9de979 (patch)
treee2318fac0d931959d6cd97d27ffbc16031f6ffc9 /scripts/lib/ptxd_make_world_install.sh
parentb50674a438e9a5d0dc547f94834ec248ddf00059 (diff)
downloadptxdist-61fccbbd14d2bb377db6c000f3364151ed9de979.tar.gz
ptxdist-61fccbbd14d2bb377db6c000f3364151ed9de979.tar.xz
[install] create install.[un]pack stages to support devel packages
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_make_world_install.sh')
-rw-r--r--scripts/lib/ptxd_make_world_install.sh46
1 files changed, 43 insertions, 3 deletions
diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh
index 42cdb6ad8..a8c570f51 100644
--- a/scripts/lib/ptxd_make_world_install.sh
+++ b/scripts/lib/ptxd_make_world_install.sh
@@ -57,13 +57,36 @@ ptxd_make_world_install() {
}
export -f ptxd_make_world_install
+#
+# unpack
+#
+# unpack the dev tarball to pkg_pkg_dir
+#
+ptxd_make_world_install_unpack() {
+ local pkg_prefix
+
+ ptxd_make_world_init &&
+
+ case "${pkg_type}" in
+ host|cross) pkg_prefix="${pkg_type}-" ;;
+ *) pkg_prefix="" ;;
+ esac &&
+
+ if [ \! -e "${ptx_pkg_dev_dir}/${pkg_pkg_dev}" ]; then
+ ptxd_bailout "Internal error: '$(ptxd_print_path ${ptx_pkg_dev_dir}/${pkg_pkg_dev})' does not exist."
+ fi &&
+ rm -rf -- "${pkg_pkg_dir}" &&
+ mkdir -p -- "${ptx_pkg_dir}" &&
+ tar -x -C "${ptx_pkg_dir}" -z -f "${ptx_pkg_dev_dir}/${pkg_pkg_dev}"
+}
+export -f ptxd_make_world_install_unpack
#
-# post
+# pack
#
-# cleanup an copy to sysroot
+# pack the dev tarball from pkg_pkg_dir
#
-ptxd_make_world_install_post() {
+ptxd_make_world_install_pack() {
ptxd_make_world_init &&
# remove empty dirs
@@ -82,6 +105,23 @@ ptxd_make_world_install_post() {
xargs -r -0 gawk -f "${PTXDIST_LIB_DIR}/ptxd_make_world_install_mangle_pc.awk" &&
check_pipe_status &&
+ if [ "${pkg_pkg_dev}" != "NO" -a "$(ptxd_get_ptxconf PTXCONF_PROJECT_CREATE_DEVPKGS)" = "y" ]; then
+ tar -c -C "${ptx_pkg_dir}" -z -f "${ptx_pkg_dir}/${pkg_pkg_dev}" "${pkg_pkg_dir##*/}"
+ fi
+}
+export -f ptxd_make_world_install_pack
+
+#
+# post
+#
+# cleanup an copy to sysroot
+#
+ptxd_make_world_install_post() {
+ ptxd_make_world_init &&
+ # do nothing if pkg_pkg_dir does not exist
+ if [ \! -d "${pkg_pkg_dir}" ]; then
+ return
+ fi &&
# prefix paths in la files with sysroot
find "${pkg_pkg_dir}" -name "*.la" -print0 | xargs -r -0 -- \
sed -i \