* luci/contrib: use bleeding edge uci version from git
[project/luci.git] / contrib / uci / Makefile
1 include ../../build/config.mk
2 include ../../build/gccconfig.mk
3
4 #UCI_VERSION = 0.4.8
5 #UCI_SITE = http://mirror2.openwrt.org/sources
6 #UCI_DIR = uci-$(UCI_VERSION)
7 #UCI_FILE = $(UCI_DIR).tar.gz
8 #UCI_URL = $(UCI_SITE)/$(UCI_FILE)
9 UCI_VERSION = 0.4.8+git20080818-1
10 UCI_SITE = http://nbd.name
11 UCI_DIR = uci.git
12 UCI_FILE = 672d68a8765c242dd939a31b520acbe1c9c1d7c2.tar.gz
13 UCI_URL = $(UCI_SITE)/gitweb.cgi?p=uci.git;a=snapshot;h=672d68a8765c242dd939a31b520acbe1c9c1d7c2
14
15 all: compile
16
17 include ../../build/module.mk
18
19 $(UCI_FILE):
20         wget -O $@ "$(UCI_URL)" || rm -f $@
21
22 $(UCI_DIR)/.prepared: $(UCI_FILE)
23         rm -rf $(UCI_DIR)
24         tar xvfz $(UCI_FILE)
25         touch $@
26
27 compile: $(UCI_DIR)/.prepared
28         $(MAKE) -C $(UCI_DIR) CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OS="$(OS)"
29         mkdir -p dist/usr/lib dist/usr/bin
30         $(MAKE) -C $(UCI_DIR) install DESTDIR=../dist prefix=/usr
31         $(MAKE) -C $(UCI_DIR)/lua CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OS="$(OS)"
32         $(MAKE) -C $(UCI_DIR)/lua install DESTDIR=../../dist luadir=$(LUA_LIBRARYDIR)
33
34
35 compile-all: compile
36
37 clean:
38         rm -rf $(UCI_DIR) $(UCI_FILE)