add mac partition support
[openwrt.git] / obsolete-buildroot / make / chillispot.mk
1 #############################################################
2 #
3 # chillispot
4 #
5 #############################################################
6
7 CHILLISPOT_VERSION:=0.96
8 CHILLISPOT_RELEASE:=1
9
10 CHILLISPOT_SOURCE:=chillispot-$(CHILLISPOT_VERSION).tar.gz
11 CHILLISPOT_SITE:=http://www.chillispot.org/download/
12 CHILLISPOT_CAT:=zcat
13 CHILLISPOT_DIR:=$(BUILD_DIR)/chillispot-$(CHILLISPOT_VERSION)
14 CHILLISPOT_BINARY:=src/chilli
15 CHILLISPOT_TARGET_BINARY:=usr/sbin/chilli
16
17 CHILLISPOT_BUILD_DIR := $(BUILD_DIR)/chillispot_$(CHILLISPOT_VERSION)-$(CHILLISPOT_RELEASE)
18 CHILLISPOT_IPK_DIR := $(OPENWRT_IPK_DIR)/chillispot
19 CHILLISPOT_IPK := $(CHILLISPOT_BUILD_DIR)_$(ARCH).ipk
20
21
22 $(DL_DIR)/$(CHILLISPOT_SOURCE):
23 $(WGET) -P $(DL_DIR) $(CHILLISPOT_SITE)/$(CHILLISPOT_SOURCE)
24
25 chillispot-source: $(DL_DIR)/$(CHILLISPOT_SOURCE)
26
27 $(CHILLISPOT_DIR)/.stamp-unpacked: $(DL_DIR)/$(CHILLISPOT_SOURCE)
28 $(CHILLISPOT_CAT) $(DL_DIR)/$(CHILLISPOT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
29
30 touch $(CHILLISPOT_DIR)/.stamp-unpacked
31
32 $(CHILLISPOT_DIR)/.stamp-configured: $(CHILLISPOT_DIR)/.stamp-unpacked
33 (cd $(CHILLISPOT_DIR); rm -rf config.cache; \
34 $(TARGET_CONFIGURE_OPTS) \
35 CFLAGS="$(TARGET_CFLAGS)" \
36 ac_cv_func_malloc_0_nonnull=yes \
37 ac_cv_func_memcmp_working=yes \
38 ac_cv_func_setvbuf_reversed=no \
39 ./configure \
40 --target=$(GNU_TARGET_NAME) \
41 --host=$(GNU_TARGET_NAME) \
42 --build=$(GNU_HOST_NAME) \
43 --prefix=/usr \
44 --exec-prefix=/usr \
45 --bindir=/usr/bin \
46 --sbindir=/usr/sbin \
47 --libexecdir=/usr/lib/locate \
48 --sysconfdir=/etc \
49 --datadir=/usr/share \
50 --localstatedir=/var/lib \
51 --mandir=/usr/man \
52 --infodir=/usr/info \
53 $(DISABLE_NLS) \
54 $(DISABLE_LARGEFILE) \
55 );
56 touch $(CHILLISPOT_DIR)/.stamp-configured
57
58 $(CHILLISPOT_DIR)/.stamp-built: $(CHILLISPOT_DIR)/.stamp-configured
59 $(MAKE) CC=$(TARGET_CC) $(TARGET_CONFIGURE_OPTS) -C $(CHILLISPOT_DIR)
60 touch $(CHILLISPOT_DIR)/.stamp-built
61
62 $(CHILLISPOT_BUILD_DIR)/CONTROL/control: $(CHILLISPOT_DIR)/.stamp-built
63 rm -rf $(CHILLISPOT_BUILD_DIR)
64 mkdir -p $(CHILLISPOT_BUILD_DIR)/usr/sbin
65 cp -a $(CHILLISPOT_DIR)/src/chilli $(CHILLISPOT_BUILD_DIR)/usr/sbin/
66 $(STRIP) $(CHILLISPOT_BUILD_DIR)/usr/sbin/*
67 mkdir -p $(CHILLISPOT_BUILD_DIR)/etc
68 cp -a $(CHILLISPOT_DIR)/doc/chilli.conf $(CHILLISPOT_BUILD_DIR)/etc
69 cp -a $(CHILLISPOT_IPK_DIR)/root/* $(CHILLISPOT_BUILD_DIR)/
70 chmod 0755 $(CHILLISPOT_BUILD_DIR)/etc
71 chmod 0600 $(CHILLISPOT_BUILD_DIR)/etc/chilli.conf
72 chmod 0755 $(CHILLISPOT_BUILD_DIR)/etc/init.d
73 chmod 0755 $(CHILLISPOT_BUILD_DIR)/etc/init.d/*
74 chmod 0755 $(CHILLISPOT_BUILD_DIR)/usr
75 chmod 0755 $(CHILLISPOT_BUILD_DIR)/usr/sbin
76 chmod 0755 $(CHILLISPOT_BUILD_DIR)/usr/sbin/*
77 cp -a $(CHILLISPOT_IPK_DIR)/CONTROL $(CHILLISPOT_BUILD_DIR)/
78 perl -pi -e "s/^Vers.*:.*$$/Version: $(CHILLISPOT_VERSION)-$(CHILLISPOT_RELEASE)/" $(CHILLISPOT_BUILD_DIR)/CONTROL/control
79 perl -pi -e "s/^Arch.*:.*$$/Architecture: $(ARCH)/" $(CHILLISPOT_BUILD_DIR)/CONTROL/control
80
81 touch $(CHILLISPOT_BUILD_DIR)/CONTROL/control
82
83
84 $(CHILLISPOT_IPK): $(CHILLISPOT_BUILD_DIR)/CONTROL/control
85 cd $(BUILD_DIR); $(IPKG_BUILD) $(CHILLISPOT_BUILD_DIR)
86
87
88 chillispot-ipk: ipkg-utils $(CHILLISPOT_IPK)
89
90 chillispot-clean:
91 $(MAKE) -C $(CHILLISPOT_DIR) clean
92
93 chillispot-dirclean:
94 rm -rf $(CHILLISPOT_DIR)
This page took 0.051329 seconds and 5 git commands to generate.