This patch allows an ipkg install and then invoking post-processing rules to 
customize it in-place on the target.

An example is target/linux/x86/geos/target.mk:

...
CS5535_MASK:=0x0E00048
...

define Package/kmod-gpio-cs5535/customize
        @echo "Modifying $(2:kmod-%=%)"
        sed -i -r -e 's/$$$$$$$$/ mask=$(CS5535_MASK)/' 
$(1)/etc/modules.d/??-gpio-cs5535
endef

Signed-off-by: Philip Prindeville

---
Index: include/package-ipkg.mk
===================================================================
--- include/package-ipkg.mk    (revision 23212)
+++ include/package-ipkg.mk    (working copy)
@@ -119,6 +119,7 @@
     @[ -d $(TARGET_DIR)/tmp ] || mkdir -p $(TARGET_DIR)/tmp
     $(OPKG) install $$(IPKG_$(1))
     $(if $(PKGFLAGS),for flag in $(PKGFLAGS); do $(OPKG) flag $$$$flag $(1); 
done)
+    $(call Package/$(1)/customize,$(TARGET_DIR),$(1))

     $(1)-clean:
     rm -f $(PACKAGE_DIR)/$(1)_*

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to