Added luci configuration for openconnect protocol
[project/luci.git] / contrib / uci / Makefile
1 include ../../build/config.mk
2 include ../../build/gccconfig.mk
3
4 UCI_VERSION  = 0.8.0
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_GITREV   = aa3ab8012bfbf793d2884c08ea924545a04e9544
10 UCI_SITE     = http://nbd.name
11 UCI_DIR      = uci.git
12 UCI_FILE     = uci-$(UCI_VERSION)$(UCI_APPEND).tar.gz
13 UCI_URL      = $(UCI_SITE)/gitweb.cgi?p=uci.git;a=snapshot;h=$(UCI_GITREV)
14 UCI_PATCHDIR = patches
15
16 all: compile
17
18 include ../../build/module.mk
19
20 $(UCI_FILE):
21         wget -O $@ "$(UCI_URL)" || rm -f $@
22
23 $(UCI_DIR)/.prepared: $(UCI_FILE)
24         rm -rf $(UCI_DIR)
25         tar xvfz $(UCI_FILE)
26         (cd $(UCI_PATCHDIR); ls *.patch | sort > series) || true
27         [ -f "$(UCI_PATCHDIR)/series" ] && while read patch; do \
28                 patch -d $(UCI_DIR) -p1 < $(UCI_PATCHDIR)/$$patch; \
29         done < $(UCI_PATCHDIR)/series || true
30         touch $@
31
32 compile: $(UCI_DIR)/.prepared
33         $(MAKE) -C $(UCI_DIR) CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OS="$(OS)"
34         mkdir -p dist/usr/lib dist/usr/bin
35         $(MAKE) -C $(UCI_DIR) install DESTDIR=../dist prefix=/usr
36         $(MAKE) -C $(UCI_DIR)/lua CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OS="$(OS)"
37         $(MAKE) -C $(UCI_DIR)/lua install DESTDIR=../../dist luadir=$(LUA_LIBRARYDIR)
38
39 compile-all: compile
40
41 clean:
42         rm -rf $(UCI_PATCHDIR)/series
43         rm -rf $(UCI_DIR) $(UCI_FILE)