add openwrt sdk
[openwrt.git] / openwrt / package / chillispot / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=chillispot
6 PKG_VERSION:=1.0RC2
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=1b924c0bd592253b1d13af4885ea041a
9
10 PKG_SOURCE_URL:=http://www.chillispot.org/download/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
13 PKG_CAT:=zcat
14 PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
15 PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
16
17 $(DL_DIR)/$(PKG_SOURCE):
18 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
19
20 $(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE)
21 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
22 touch $(PKG_BUILD_DIR)/.unpacked
23
24 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
25 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
26 $(TARGET_CONFIGURE_OPTS) \
27 CFLAGS="$(TARGET_CFLAGS)" \
28 ac_cv_func_malloc_0_nonnull=yes \
29 ac_cv_func_memcmp_working=yes \
30 ac_cv_func_setvbuf_reversed=no \
31 ./configure \
32 --target=$(GNU_TARGET_NAME) \
33 --host=$(GNU_TARGET_NAME) \
34 --build=$(GNU_HOST_NAME) \
35 --prefix=/usr \
36 --exec-prefix=/usr \
37 --bindir=/usr/bin \
38 --datadir=/usr/share \
39 --includedir=/usr/include \
40 --infodir=/usr/share/info \
41 --libdir=/usr/lib \
42 --libexecdir=/usr/lib/locate \
43 --localstatedir=/var/lib \
44 --mandir=/usr/share/man \
45 --sbindir=/usr/sbin \
46 --sysconfdir=/etc \
47 $(DISABLE_NLS) \
48 );
49 touch $(PKG_BUILD_DIR)/.configured
50
51 $(PKG_BUILD_DIR)/src/chilli: $(PKG_BUILD_DIR)/.configured
52 $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS)
53
54 $(PKG_IPK): $(PKG_BUILD_DIR)/src/chilli
55 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
56 mkdir -p $(PKG_IPK_DIR)/usr/sbin
57 cp $(PKG_BUILD_DIR)/src/chilli $(PKG_IPK_DIR)/usr/sbin/
58 $(STRIP) $(PKG_IPK_DIR)/usr/sbin/*
59 mkdir -p $(PKG_IPK_DIR)/etc
60 cp $(PKG_BUILD_DIR)/doc/chilli.conf $(PKG_IPK_DIR)/etc
61 cp -a ./ipkg/* $(PKG_IPK_DIR)/
62 find $(PKG_IPK_DIR) -name CVS | xargs rm -rf
63 mkdir -p $(PACKAGE_DIR)
64 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
65
66 $(IPKG_STATE_DIR)/info/openvpn.list: $(PKG_IPK)
67 $(IPKG) install $(PKG_IPK)
68
69 source: $(DL_DIR)/$(PKG_SOURCE)
70 prepare: $(PKG_BUILD_DIR)/.unpacked
71 compile: $(PKG_IPK)
72 install: $(IPKG_STATE_DIR)/info/openvpn.list
73
74 clean:
75 rm -rf $(PKG_BUILD_DIR)
76 rm -f $(PKG_IPK)
This page took 0.041945 seconds and 5 git commands to generate.