x86/ep80579: switch to 3.3
[openwrt/svn-archive/archive.git] / include / package-ipkg.mk
index 9cccff261a8aa597778e8e4ddb300cf434f965d6..e0a8118ae60996578a3d3a52adac006ef1b8576d 100644 (file)
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2006,2007 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -30,7 +30,7 @@ IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/opkg
 define BuildIPKGVariable
 ifdef Package/$(1)/$(2)
   $(call shexport,Package/$(1)/$(2))
-  $(1)_COMMANDS += $(SH_FUNC) var2file "$(call shvar,Package/$(1)/$(2))" $(2);
+  $(1)_COMMANDS += var2file "$(call shvar,Package/$(1)/$(2))" $(2);
 endif
 endef
 
@@ -71,7 +71,7 @@ ifeq ($(DUMP),)
     endif
 
     IDEPEND_$(1):=$$(call filter_deps,$$(DEPENDS))
-  
+
     $(eval $(call BuildIPKGVariable,$(1),conffiles))
     $(eval $(call BuildIPKGVariable,$(1),preinst))
     $(eval $(call BuildIPKGVariable,$(1),postinst))
@@ -91,7 +91,7 @@ ifeq ($(DUMP),)
        @rm -rf $(PACKAGE_DIR)/$(1)_* $$(IDIR_$(1))
        mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL
        $(call Package/$(1)/install,$$(IDIR_$(1)))
-       -find $$(IDIR_$(1)) -name 'CVS' -o -name '.svn' -o -name '.#*' | $(XARGS) rm -rf
+       -find $$(IDIR_$(1)) -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| $(XARGS) rm -rf
        $(RSTRIP) $$(IDIR_$(1))
        ( \
                echo "Package: $(1)"; \
@@ -113,7 +113,7 @@ ifeq ($(DUMP),)
                echo -n "Description: "; $(SH_FUNC) getvar $(call shvar,Package/$(1)/description) | sed -e 's,^[[:space:]]*, ,g'; \
        ) > $$(IDIR_$(1))/CONTROL/control
        chmod 644 $$(IDIR_$(1))/CONTROL/control
-       (cd $$(IDIR_$(1))/CONTROL; \
+       $(SH_FUNC) (cd $$(IDIR_$(1))/CONTROL; \
                $($(1)_COMMANDS) \
        )
 
@@ -123,7 +123,7 @@ ifeq ($(DUMP),)
                        for x in $$(KEEP_$(1)); do \
                                [ -f "$$(IDIR_$(1))/$$$$x" ] || keepfiles="$$$${keepfiles:+$$$$keepfiles }$$$$x"; \
                        done; \
-                       [ -z "$keepfiles" ] || { \
+                       [ -z "$$$$keepfiles" ] || { \
                                mkdir -p $$(IDIR_$(1))/lib/upgrade/keep.d; \
                                for x in $$$$keepfiles; do echo $$$$x >> $$(IDIR_$(1))/lib/upgrade/keep.d/$(1); done; \
                        }; \