add special handling for the adm5120 target, which uses subtargets for different...
authorImre Kaloz <kaloz@openwrt.org>
Mon, 3 Aug 2009 11:24:56 +0000 (11:24 +0000)
committerImre Kaloz <kaloz@openwrt.org>
Mon, 3 Aug 2009 11:24:56 +0000 (11:24 +0000)
SVN-Revision: 17101

include/package-defaults.mk
package/opkg/Makefile

index 2cfce7a92dc418ea54b20a207459a1d2088f29da..2b5cb8671cc1e9f555fb31411547e967a4148eab 100644 (file)
@@ -23,7 +23,11 @@ define Package/Default
   else
     VERSION:=$(PKG_RELEASE)
   endif
-  PKGARCH:=$(BOARD)
+  ifneq ($(CONFIG_TARGET_adm5120),y)
+    PKGARCH:=$(BOARD)
+  else
+    PKGARCH:=$(BOARD)_$(ARCH)
+  endif
   PRIORITY:=optional
   DEFAULT:=
   MENU:=
index 9f5faa347475a0d4003b34d2b077bfe50a5e614d..864a13b4789fc7deea15bb8689ff05c273b76e45 100644 (file)
@@ -59,7 +59,7 @@ define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                CC="$(TARGET_CC)" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
-               HOST_CPU="$(BOARD)" \
+               HOST_CPU="$(PKGARCH)" \
                all install
 endef
 
@@ -68,7 +68,7 @@ define Package/opkg/install
        $(INSTALL_DIR) $(1)/bin
        $(INSTALL_DIR) $(1)/etc
        $(INSTALL_DATA) ./files/opkg.conf $(1)/etc/
-       $(SED) 's,$$$$S,$(BOARD),g' -e 's,$$$$A,$(ARCH),g' $(1)/etc/opkg.conf
+       $(SED) 's,$$$$S,$(PKGARCH),g' $(1)/etc/opkg.conf
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopkg.so.* $(1)/usr/lib/