contrib/uci: apply patch series during host uci build
[project/luci.git] / contrib / uci / Makefile
index 31551af..98e5ed4 100644 (file)
@@ -1,12 +1,12 @@
 include ../../build/config.mk
 include ../../build/gccconfig.mk
 
-UCI_VERSION  = 0.6.1
+UCI_VERSION  = 0.7.5
 UCI_SITE    = http://mirror2.openwrt.org/sources
 UCI_DIR     = uci-$(UCI_VERSION)
 UCI_FILE    = $(UCI_DIR).tar.gz
 UCI_URL     = $(UCI_SITE)/$(UCI_FILE)
-#UCI_GITREV   = 43124956bc9c1083e476f6cadaedf27b7788d004
+#UCI_GITREV   = c79cc497e7b0caa0f9f6a2c978fa9a5f0f097463
 #UCI_SITE     = http://nbd.name
 #UCI_DIR      = uci.git
 #UCI_FILE     = uci-$(UCI_VERSION)$(UCI_APPEND).tar.gz
@@ -23,9 +23,12 @@ $(UCI_FILE):
 $(UCI_PATCHDIR)/series:
        (cd $(UCI_PATCHDIR); ls *.patch | sort > series)
 
-$(UCI_DIR)/.prepared: $(UCI_FILE)
+$(UCI_DIR)/.prepared: $(UCI_PATCHDIR)/series $(UCI_FILE)
        rm -rf $(UCI_DIR)
        tar xvfz $(UCI_FILE)
+       while read patch; do \
+         patch -d $(UCI_DIR) -p1 < $(UCI_PATCHDIR)/$$patch; \
+       done < $(UCI_PATCHDIR)/series
        touch $@
 
 compile: $(UCI_DIR)/.prepared