summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
Diffstat (limited to 'rules')
-rw-r--r--rules/host-ipkg-utils.in3
-rw-r--r--rules/host-ipkg.in4
-rw-r--r--rules/host-package-management.in22
-rw-r--r--rules/post/image_ipkg.make9
-rw-r--r--rules/post/ptxd_make_image_common.make1
-rw-r--r--rules/post/ptxd_make_xpkg_common.make4
-rw-r--r--rules/post/virtual.make7
7 files changed, 40 insertions, 10 deletions
diff --git a/rules/host-ipkg-utils.in b/rules/host-ipkg-utils.in
index ff5018a08..52e8a0d14 100644
--- a/rules/host-ipkg-utils.in
+++ b/rules/host-ipkg-utils.in
@@ -2,8 +2,7 @@
config HOST_IPKG_UTILS
tristate
- # no prompt, policy is that we always need it
- default y
+ default ALLYES
help
ipkg-utils let you build packages in the ipkg format.
diff --git a/rules/host-ipkg.in b/rules/host-ipkg.in
index 00c8b2a5d..c940daaeb 100644
--- a/rules/host-ipkg.in
+++ b/rules/host-ipkg.in
@@ -2,8 +2,8 @@
config HOST_IPKG
tristate
- default y
- # no prompt, policy is that we always need it
+ default ALLYES
+ select HOST_IPKG_UTILS
help
ipkg is used on the development host to install packets into
some directory. Example:
diff --git a/rules/host-package-management.in b/rules/host-package-management.in
new file mode 100644
index 000000000..f3d0f414e
--- /dev/null
+++ b/rules/host-package-management.in
@@ -0,0 +1,22 @@
+## SECTION=hosttools
+
+choice
+ prompt "package management "
+ default HOST_PACKAGE_MANAGEMENT_IPKG
+
+ config HOST_PACKAGE_MANAGEMENT_IPKG
+ bool
+ select HOST_IPKG
+ prompt "ipkg "
+
+ config HOST_PACKAGE_MANAGEMENT_OPKG
+ bool
+ select HOST_OPKG
+ prompt "opkg "
+endchoice
+
+config HOST_PACKAGE_MANAGEMENT
+ string
+ default "ipkg" if HOST_PACKAGE_MANAGEMENT_IPKG
+ default "opkg" if HOST_PACKAGE_MANAGEMENT_OPKG
+
diff --git a/rules/post/image_ipkg.make b/rules/post/image_ipkg.make
index 038538326..9d71bea74 100644
--- a/rules/post/image_ipkg.make
+++ b/rules/post/image_ipkg.make
@@ -18,13 +18,14 @@ $(STATEDIR)/ipkg-push: $(STATEDIR)/host-ipkg-utils.install.post $(STATEDIR)/worl
ifdef PTXCONF_IMAGE_IPKG_FORCED_PUSH
rm -rf $(PTXCONF_SETUP_IPKG_REPOSITORY)/$(PTXCONF_PROJECT)/dists/$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION)
endif
- @echo "pushing ipkg pakets to ipkg-repository..."
+ @echo "pushing ipkg packages to ipkg-repository..."
@$(HOST_ENV) $(PTXDIST_TOPDIR)/scripts/ipkg-push \
--ipkgdir $(call remove_quotes,$(PKGDIR)) \
--repodir $(call remove_quotes,$(PTXCONF_SETUP_IPKG_REPOSITORY)) \
--revision $(call remove_quotes,$(PTXDIST_VERSION_FULL)) \
--project $(call remove_quotes,$(PTXCONF_PROJECT)) \
- --dist $(call remove_quotes,$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION))
+ --dist $(call remove_quotes,$(PTXCONF_PROJECT)$(PTXCONF_PROJECT_VERSION)) \
+ --type $(PTXCONF_HOST_PACKAGE_MANAGEMENT)
@echo "ipkg-repository updated"
@touch $@
@@ -37,8 +38,8 @@ PHONY += $(PKGDIR)/Packages
$(PKGDIR)/Packages: $(STATEDIR)/host-ipkg-utils.install.post
@echo "Creating ipkg index '$@'..."
@rm -f $(PKGDIR)/Packages*
- @$(HOST_ENV) \
- ipkg-make-index -l "$(PKGDIR)/Packages.filelist" -p "$(@)" "$(PKGDIR)"
+ @$(HOST_ENV) $(PTXCONF_HOST_PACKAGE_MANAGEMENT)-make-index \
+ -l "$(PKGDIR)/Packages.filelist" -p "$(@)" "$(PKGDIR)"
@echo "done."
# vim: syntax=make
diff --git a/rules/post/ptxd_make_image_common.make b/rules/post/ptxd_make_image_common.make
index 1581173f7..25bfdb4ce 100644
--- a/rules/post/ptxd_make_image_common.make
+++ b/rules/post/ptxd_make_image_common.make
@@ -18,6 +18,7 @@ image/env = \
$(call ptx/env) \
image_pkgs_selected_target="$(call ptx/escape,$(PTX_PACKAGES_INSTALL))" \
image_repo_dist_dir="$(call ptx/escape,$(PTXCONF_SETUP_IPKG_REPOSITORY)/$(call remove_quotes,$(PTXCONF_PROJECT))/dists/$(call remove_quotes,$(PTXCONF_PROJECT))$(call remove_quotes,$(PTXCONF_PROJECT_VERSION)))" \
+ image_xpkg_type=$(PTXCONF_HOST_PACKAGE_MANAGEMENT) \
\
image_work_dir="$(call ptx/escape,$(image/work_dir))" \
image_permissions="$(call ptx/escape,$(image/permissions))"
diff --git a/rules/post/ptxd_make_xpkg_common.make b/rules/post/ptxd_make_xpkg_common.make
index c7bff359a..8d27c35d9 100644
--- a/rules/post/ptxd_make_xpkg_common.make
+++ b/rules/post/ptxd_make_xpkg_common.make
@@ -1,6 +1,7 @@
# -*-makefile-*-
#
# Copyright (C) 2009, 2010 by Marc Kleine-Budde <mkl@pengutronix.de>
+# 2011 by George McCollister <george.mccollister@gmail.com>
#
# See CREDITS for details about who has contributed to this project.
#
@@ -17,7 +18,8 @@ xpkg/env/impl = \
CROSS_STRIP="$(call ptx/escape,$(CROSS_STRIP))" \
pkg_xpkg="$(call ptx/escape,$(1))" \
pkg_ipkg_extra_args=$(PTXCONF_IMAGE_IPKG_EXTRA_ARGS) \
- pkg_xpkg_type="ipkg"
+ pkg_opkg_extra_args=$(PTXCONF_IMAGE_OPKG_EXTRA_ARGS) \
+ pkg_xpkg_type=$(PTXCONF_HOST_PACKAGE_MANAGEMENT)
#
# $1: xpkg label
diff --git a/rules/post/virtual.make b/rules/post/virtual.make
index a484e5284..2d5a2b5e2 100644
--- a/rules/post/virtual.make
+++ b/rules/post/virtual.make
@@ -1,6 +1,7 @@
# -*-makefile-*-
#
# Copyright (C) 2003-2010 by Marc Kleine-Budde <mkl@pengutronix.de>
+# 2011 by George McCollister <george.mccollister@gmail.com>
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
@@ -15,10 +16,14 @@ ifdef PTXCONF_HOST_FAKEROOT
$(STATEDIR)/virtual-cross-tools.install: $(STATEDIR)/host-fakeroot.install.post
endif
-ifdef PTXCONF_HOST_IPKG_UTILS
+ifdef PTXCONF_HOST_PACKAGE_MANAGEMENT_IPKG
$(STATEDIR)/virtual-cross-tools.install: $(STATEDIR)/host-ipkg-utils.install.post
endif
+ifdef PTXCONF_HOST_PACKAGE_MANAGEMENT_OPKG
+$(STATEDIR)/virtual-cross-tools.install: $(STATEDIR)/host-opkg-utils.install.post
+endif
+
ifdef PTXCONF_CROSS_PKG_CONFIG_WRAPPER
$(STATEDIR)/virtual-cross-tools.install: $(STATEDIR)/cross-pkg-config-wrapper.install.post
endif