diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-07-23 19:49:19 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-07-23 19:49:19 +0000 |
commit | fc7a57fa5d5105a8d4fe193a2401794ee361c7ea (patch) | |
tree | c4a5dc7b3b75b5717570464e0b8352097d7df109 /include | |
parent | 1e8591f79be8a792cc4dd60589441fc44477824d (diff) | |
download | master-187ad058-fc7a57fa5d5105a8d4fe193a2401794ee361c7ea.tar.gz master-187ad058-fc7a57fa5d5105a8d4fe193a2401794ee361c7ea.tar.bz2 master-187ad058-fc7a57fa5d5105a8d4fe193a2401794ee361c7ea.zip |
[buildsystem] use host opkg for installing packages in buildroot and ImageBuilder
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22372 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r-- | include/package-ipkg.mk | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index 87b142aa59..57b06c86d8 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -1,17 +1,20 @@ # -# Copyright (C) 2006,2007 OpenWrt.org +# Copyright (C) 2006-2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # # where to build (and put) .ipk packages -IPKG:= \ +OPKG:= \ IPKG_TMP=$(TMP_DIR)/ipkg \ IPKG_INSTROOT=$(TARGET_DIR) \ IPKG_CONF_DIR=$(STAGING_DIR)/etc \ IPKG_OFFLINE_ROOT=$(TARGET_DIR) \ - $(SCRIPT_DIR)/ipkg -force-defaults -force-depends + $(STAGING_DIR_HOST)/bin/opkg \ + -f $(STAGING_DIR)/etc/opkg.conf \ + --force-depends \ + --force-overwrite # invoke ipkg-build with some default options IPKG_BUILD:= \ @@ -76,7 +79,7 @@ ifeq ($(DUMP),) rm -rf $(STAGING_DIR_ROOT)/tmp-$(1) touch $$@ - $$(IPKG_$(1)): $(STAGING_DIR)/etc/ipkg.conf $(STAMP_BUILT) + $$(IPKG_$(1)): $(STAGING_DIR)/etc/opkg.conf $(STAMP_BUILT) @rm -f $(PACKAGE_DIR)/$(1)_* rm -rf $$(IDIR_$(1)) mkdir -p $$(IDIR_$(1))/CONTROL @@ -111,7 +114,8 @@ ifeq ($(DUMP),) @[ -f $$(IPKG_$(1)) ] || false $$(INFO_$(1)): $$(IPKG_$(1)) - $(IPKG) install $$(IPKG_$(1)) + @[ -d $(TARGET_DIR)/tmp ] || mkdir -p $(TARGET_DIR)/tmp + $(OPKG) install $$(IPKG_$(1)) $(1)-clean: rm -f $(PACKAGE_DIR)/$(1)_* @@ -120,9 +124,11 @@ ifeq ($(DUMP),) endef - $(STAGING_DIR)/etc/ipkg.conf: + $(STAGING_DIR)/etc/opkg.conf: mkdir -p $(STAGING_DIR)/etc - echo "dest root /" > $(STAGING_DIR)/etc/ipkg.conf - echo "option offline_root $(TARGET_DIR)" >> $(STAGING_DIR)/etc/ipkg.conf + ( echo "dest root /" > $@; \ + echo "arch all 100" >> $@; \ + echo "arch $(PKGARCH) 200" >> $@; \ + echo "option offline_root $(TARGET_DIR)" >> $@ ) endif |