From 9180e7e7a51ca8f465013ae8640d16f2e54a8899 Mon Sep 17 00:00:00 2001 From: George McCollister Date: Thu, 19 May 2011 16:03:58 -0500 Subject: opkg can now be used instead of ipkg opkg and opkg-utils can now be used to build .ipk files and generate images from them. No longer default HOST_IPKG_UTILS and HOST_IPKG to yes. HOST_PACKAGE_MANAGEMENT_IPKG will select HOST_IPKG. HOST_IPKG will select HOST_IPKG_UTILS. Added package management selection to hosttools. Changed scripts to use the package management utilities for the selected package management system. Signed-off-by: George McCollister Signed-off-by: Michael Olbrich --- scripts/lib/ptxd_make_opkg_finish.sh | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 scripts/lib/ptxd_make_opkg_finish.sh (limited to 'scripts/lib/ptxd_make_opkg_finish.sh') diff --git a/scripts/lib/ptxd_make_opkg_finish.sh b/scripts/lib/ptxd_make_opkg_finish.sh new file mode 100644 index 000000000..97e10340f --- /dev/null +++ b/scripts/lib/ptxd_make_opkg_finish.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# +# Copyright (C) 2005, 2006, 2007 Robert Schwebel +# 2008, 2009, 2010 by Marc Kleine-Budde +# 2011 by George McCollister +# +# 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. +# + +# +# the actual opkg package creation, will run in fakeroot +# +ptxd_make_opkg_finish_impl() { + chown -R 0:0 "${pkg_xpkg_tmp}" && + ptxd_make_xpkg_pkg "${pkg_opkg_tmp}" "${pkg_xpkg_cmds}" "${pkg_xpkg_perms}" && + opkg-build ${pkg_opkg_extra_args} "${pkg_opkg_tmp}" "${ptx_pkg_dir}" +} +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}" ) + fi + fake_args[${#fake_args[@]}]="-u" + + export ${!pkg_*} ${!ptx_*} + fakeroot "${fake_args[@]}" -- ptxd_make_opkg_finish_impl +} +export -f ptxd_make_opkg_finish -- cgit v1.2.3