1 #############################################################
5 #############################################################
7 CHILLISPOT_VERSION
:=0.96
10 CHILLISPOT_SOURCE
:=chillispot-
$(CHILLISPOT_VERSION
).
tar.gz
11 CHILLISPOT_SITE
:=http
://www.chillispot.org
/download
/
13 CHILLISPOT_DIR
:=$(BUILD_DIR
)/chillispot-
$(CHILLISPOT_VERSION
)
14 CHILLISPOT_BINARY
:=src
/chilli
15 CHILLISPOT_TARGET_BINARY
:=usr
/sbin
/chilli
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
22 $(DL_DIR
)/$(CHILLISPOT_SOURCE
):
23 $(WGET
) -P
$(DL_DIR
) $(CHILLISPOT_SITE
)/$(CHILLISPOT_SOURCE
)
25 chillispot-source
: $(DL_DIR
)/$(CHILLISPOT_SOURCE
)
27 $(CHILLISPOT_DIR
)/.stamp-unpacked
: $(DL_DIR
)/$(CHILLISPOT_SOURCE
)
28 $(CHILLISPOT_CAT
) $(DL_DIR
)/$(CHILLISPOT_SOURCE
) |
tar -C
$(BUILD_DIR
) -xvf
-
30 touch
$(CHILLISPOT_DIR
)/.stamp-unpacked
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 \
40 --target
=$(GNU_TARGET_NAME
) \
41 --host
=$(GNU_TARGET_NAME
) \
42 --build
=$(GNU_HOST_NAME
) \
47 --libexecdir
=/usr
/lib
/locate \
49 --datadir=/usr
/share \
50 --localstatedir
=/var
/lib \
54 $(DISABLE_LARGEFILE
) \
56 touch
$(CHILLISPOT_DIR
)/.stamp-configured
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
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
81 touch
$(CHILLISPOT_BUILD_DIR
)/CONTROL
/control
84 $(CHILLISPOT_IPK
): $(CHILLISPOT_BUILD_DIR
)/CONTROL
/control
85 cd
$(BUILD_DIR
); $(IPKG_BUILD
) $(CHILLISPOT_BUILD_DIR
)
88 chillispot-ipk
: ipkg-utils
$(CHILLISPOT_IPK
)
91 $(MAKE
) -C
$(CHILLISPOT_DIR
) clean
94 rm -rf
$(CHILLISPOT_DIR
)