diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-07-16 15:29:26 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-07-16 15:29:26 +0200 |
commit | 1520848b7812e6daf8f78cf084fbb14f57802082 (patch) | |
tree | db5f006c0d84ecf42a2173aa26a5ea2032038a2c /scripts/lib/ptxd_make_xpkg_prepare.sh | |
parent | 97cdd287d8ed06c3154340f04f43d491df669a13 (diff) | |
parent | 219728562e61ab5cf73bb6b5499fb68a36b273d2 (diff) | |
download | ptxdist-1520848b7812e6daf8f78cf084fbb14f57802082.tar.gz ptxdist-1520848b7812e6daf8f78cf084fbb14f57802082.tar.xz |
Merge branch 'next/image_cleanups' of git://git.pengutronix.de/git/mkl/ptxdist
Conflicts:
scripts/lib/ptxd_make_install.sh
This is due to "360f73777af1661d85ae0aa2434b6acde22da9fa" Fix
dependencies to files in projectroot.
The modifications to ptxd_make_install_init have been moved to
ptxd_make_xpkg_prepare.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_make_xpkg_prepare.sh')
-rw-r--r-- | scripts/lib/ptxd_make_xpkg_prepare.sh | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_make_xpkg_prepare.sh b/scripts/lib/ptxd_make_xpkg_prepare.sh new file mode 100644 index 000000000..61b520c98 --- /dev/null +++ b/scripts/lib/ptxd_make_xpkg_prepare.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# +# Copyright (C) 2005, 2006, 2007 Robert Schwebel <r.schwebel@pengutronix.de> +# 2008, 2009, 2010 by Marc Kleine-Budde <mkl@pengutronix.de> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# +ptxd_make_xpkg_prepare() { + ptxd_make_xpkg_init || return + + echo "install_init: preparing for image creation of '${pkg_xpkg}'..." + + rm -fr -- \ + "${pkg_xpkg_tmp}" \ + "${pkg_xpkg_cmds}" \ + "${pkg_xpkg_perms}" \ + "${pkg_xpkg_install_deps}" && + mkdir -p -- "${pkg_ipkg_control_dir}" && + touch "${pkg_xpkg_cmds}" || return + + # + # replace ARCH and PACKAGE in control file + # + echo -e "\ +install_init: @ARCH@ -> ${PTXDIST_IPKG_ARCH_STRING} +install_init: @PACKAGE@ -> ${pkg_xpkg} +install_init: @VERSION@ -> ${pkg_xpkg_version}" + + ARCH="${PTXDIST_IPKG_ARCH_STRING}" \ + PACKAGE="${pkg_xpkg}" \ + VERSION="${pkg_xpkg_version}" \ + ptxd_replace_magic "${PTXDIST_TOPDIR}/config/xpkg/ipkg.control" > \ + "${pkg_ipkg_control}" || return + + local script + for script in preinst postinst prerm postrm; do + echo -n "install_init: ${script} " + + if ptxd_get_path "${PTXDIST_PATH_RULES//://${pkg_xpkg}.${script} }"; then + install -m 0755 \ + -D "${ptxd_reply}" \ + "${pkg_ipkg_control_dir}/${script}" || return + + echo "packaging: '$(ptxd_print_path "${ptxd_reply}")'" + + # FIXME: install ipkg rather than executing script + if [ "${script}" = "preinst" ]; then + echo "install_init: executing '${ptxd_reply}'" + DESTDIR="${ptx_nfsroot}" /bin/sh "${ptxd_reply}" + DESTDIR="${ptx_nfsroot_dbg}" /bin/sh "${ptxd_reply}" + fi + else + echo "not available" + fi + done +} +export -f ptxd_make_xpkg_prepare |