From 1903bd0109a88bf0e8c9938f888dcfcc631351be Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Sun, 19 Jun 2011 10:54:33 +0200 Subject: ptxd_make_xpkg: handle DEPENDS in ptxd_make_xpkg_prepare Signed-off-by: Michael Olbrich --- scripts/lib/ptxd_make_ipkg_finish.sh | 8 -------- scripts/lib/ptxd_make_opkg_finish.sh | 8 -------- scripts/lib/ptxd_make_xpkg_finish.sh | 2 -- scripts/lib/ptxd_make_xpkg_prepare.sh | 13 +++++++++++-- 4 files changed, 11 insertions(+), 20 deletions(-) (limited to 'scripts/lib') diff --git a/scripts/lib/ptxd_make_ipkg_finish.sh b/scripts/lib/ptxd_make_ipkg_finish.sh index fe9195483..2ef23e682 100644 --- a/scripts/lib/ptxd_make_ipkg_finish.sh +++ b/scripts/lib/ptxd_make_ipkg_finish.sh @@ -25,14 +25,6 @@ export -f ptxd_make_ipkg_finish_impl # create an ipkg package # ptxd_make_ipkg_finish() { - local dep - - # replace space with ", " - dep="${pkg_xpkg_deps[*]}" - dep="${dep// /, }" - - sed -i -e "s:@DEPENDS@:${dep}:g" "${pkg_xpkg_control}" || return - local -a fake_args if [ -f "${pkg_fake_env}" ]; then fake_args=( "-i" "${pkg_fake_env}" ) diff --git a/scripts/lib/ptxd_make_opkg_finish.sh b/scripts/lib/ptxd_make_opkg_finish.sh index 97e10340f..583a5ef24 100644 --- a/scripts/lib/ptxd_make_opkg_finish.sh +++ b/scripts/lib/ptxd_make_opkg_finish.sh @@ -25,14 +25,6 @@ export -f ptxd_make_opkg_finish_impl # create an opkg package # ptxd_make_opkg_finish() { - local dep - - # replace space with ", " - dep="${pkg_xpkg_deps[*]}" - dep="${dep// /, }" - - sed -i -e "s:@DEPENDS@:${dep}:g" "${pkg_xpkg_control}" || return - local -a fake_args if [ -f "${pkg_fake_env}" ]; then fake_args=( "-i" "${pkg_fake_env}" ) diff --git a/scripts/lib/ptxd_make_xpkg_finish.sh b/scripts/lib/ptxd_make_xpkg_finish.sh index 9ca9c16a6..3acac21e1 100644 --- a/scripts/lib/ptxd_make_xpkg_finish.sh +++ b/scripts/lib/ptxd_make_xpkg_finish.sh @@ -91,8 +91,6 @@ EOF # # create pkg # - ptxd_make_xpkg_deps && - echo "xpkg_finish: creating ${pkg_xpkg_type} package ... " && "ptxd_make_${pkg_xpkg_type}_finish" && rm -rf "${pkg_xpkg_tmp}" || { diff --git a/scripts/lib/ptxd_make_xpkg_prepare.sh b/scripts/lib/ptxd_make_xpkg_prepare.sh index 7a14c8041..06edd1a03 100644 --- a/scripts/lib/ptxd_make_xpkg_prepare.sh +++ b/scripts/lib/ptxd_make_xpkg_prepare.sh @@ -13,6 +13,7 @@ # # ptxd_make_xpkg_prepare() { + local dep ptxd_make_xpkg_init || return echo "install_init: preparing for image creation of '${pkg_xpkg}'..." @@ -25,17 +26,25 @@ ptxd_make_xpkg_prepare() { mkdir -p -- "${pkg_xpkg_control_dir}" && touch "${pkg_xpkg_cmds}" || return + ptxd_make_xpkg_deps || return + + # replace space with ", " + dep="${pkg_xpkg_deps[*]}" + dep="${dep// /, }" + # - # replace ARCH and PACKAGE in control file + # replace ARCH PACKAGE, VERSION and DEPENDS in control file # echo -e "\ install_init: @ARCH@ -> ${PTXDIST_IPKG_ARCH_STRING} install_init: @PACKAGE@ -> ${pkg_xpkg} -install_init: @VERSION@ -> ${pkg_xpkg_version}" +install_init: @VERSION@ -> ${pkg_xpkg_version} +install_init: @DEPENDS@ -> ${dep}" ARCH="${PTXDIST_IPKG_ARCH_STRING}" \ PACKAGE="${pkg_xpkg}" \ VERSION="${pkg_xpkg_version}" \ + DEPENDS="${dep}" \ ptxd_replace_magic "${PTXDIST_TOPDIR}/config/xpkg/ipkg.control" > \ "${pkg_xpkg_control}" || return -- cgit v1.2.3