summaryrefslogtreecommitdiffstats
path: root/obsolete-buildroot/make/chillispot.mk
diff options
context:
space:
mode:
authormbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-08-24 23:50:14 +0000
committermbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-08-24 23:50:14 +0000
commit097635b79bc6ddd6066a8369db6e298a25daa96e (patch)
treedb8218863c9124ae287832ccd846ad4d96c2e05e /obsolete-buildroot/make/chillispot.mk
parent54da0f9e4ba892d2613d4f0d0c4bf4eecdcfd0a4 (diff)
massive changes
- sstrip cleanup from mjn3 - various patches from nico and others: http://openwrt.org/forum/viewtopic.php?t=368 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@145 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'obsolete-buildroot/make/chillispot.mk')
-rw-r--r--obsolete-buildroot/make/chillispot.mk74
1 files changed, 45 insertions, 29 deletions
diff --git a/obsolete-buildroot/make/chillispot.mk b/obsolete-buildroot/make/chillispot.mk
index 206eb2ca1..9cc9a9448 100644
--- a/obsolete-buildroot/make/chillispot.mk
+++ b/obsolete-buildroot/make/chillispot.mk
@@ -4,7 +4,9 @@
#
#############################################################
-CHILLISPOT_VERSION:=0.95
+CHILLISPOT_VERSION:=0.96
+CHILLISPOT_RELEASE:=1
+
CHILLISPOT_SOURCE:=chillispot-$(CHILLISPOT_VERSION).tar.gz
CHILLISPOT_SITE:=http://www.chillispot.org/download/
CHILLISPOT_CAT:=zcat
@@ -12,20 +14,27 @@ CHILLISPOT_DIR:=$(BUILD_DIR)/chillispot-$(CHILLISPOT_VERSION)
CHILLISPOT_BINARY:=src/chilli
CHILLISPOT_TARGET_BINARY:=usr/sbin/chilli
+CHILLISPOT_BUILD_DIR := $(BUILD_DIR)/chillispot_$(CHILLISPOT_VERSION)-$(CHILLISPOT_RELEASE)
+CHILLISPOT_IPK_DIR := $(OPENWRT_IPK_DIR)/chillispot
+CHILLISPOT_IPK := $(CHILLISPOT_BUILD_DIR)_$(ARCH).ipk
+
+
$(DL_DIR)/$(CHILLISPOT_SOURCE):
$(WGET) -P $(DL_DIR) $(CHILLISPOT_SITE)/$(CHILLISPOT_SOURCE)
chillispot-source: $(DL_DIR)/$(CHILLISPOT_SOURCE)
-$(CHILLISPOT_DIR)/.unpacked: $(DL_DIR)/$(CHILLISPOT_SOURCE)
+$(CHILLISPOT_DIR)/.stamp-unpacked: $(DL_DIR)/$(CHILLISPOT_SOURCE)
$(CHILLISPOT_CAT) $(DL_DIR)/$(CHILLISPOT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
- sed -i -e s:"-ggdb"::g $(CHILLISPOT_DIR)/src/Makefile.in
- touch $(CHILLISPOT_DIR)/.unpacked
-$(CHILLISPOT_DIR)/.configured: $(CHILLISPOT_DIR)/.unpacked
+ touch $(CHILLISPOT_DIR)/.stamp-unpacked
+
+$(CHILLISPOT_DIR)/.stamp-configured: $(CHILLISPOT_DIR)/.stamp-unpacked
(cd $(CHILLISPOT_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
+ ac_cv_func_malloc_0_nonnull=yes \
+ ac_cv_func_memcmp_working=yes \
ac_cv_func_setvbuf_reversed=no \
./configure \
--target=$(GNU_TARGET_NAME) \
@@ -44,35 +53,42 @@ $(CHILLISPOT_DIR)/.configured: $(CHILLISPOT_DIR)/.unpacked
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
);
- sed -i -e s:"#define HAVE_MALLOC 0":"#define HAVE_MALLOC 1":g \
- -e s:"#define malloc rpl_malloc"::g \
- $(CHILLISPOT_DIR)/config.h
- touch $(CHILLISPOT_DIR)/.configured
+ touch $(CHILLISPOT_DIR)/.stamp-configured
-$(CHILLISPOT_DIR)/$(CHILLISPOT_BINARY): $(CHILLISPOT_DIR)/.configured
+$(CHILLISPOT_DIR)/.stamp-built: $(CHILLISPOT_DIR)/.stamp-configured
$(MAKE) CC=$(TARGET_CC) $(TARGET_CONFIGURE_OPTS) -C $(CHILLISPOT_DIR)
+ touch $(CHILLISPOT_DIR)/.stamp-built
+
+$(CHILLISPOT_BUILD_DIR)/CONTROL/control: $(CHILLISPOT_DIR)/.stamp-built
+ rm -rf $(CHILLISPOT_BUILD_DIR)
+ mkdir -p $(CHILLISPOT_BUILD_DIR)/usr/sbin
+ cp -a $(CHILLISPOT_DIR)/src/chilli $(CHILLISPOT_BUILD_DIR)/usr/sbin/
+ $(STRIP) $(CHILLISPOT_BUILD_DIR)/usr/sbin/*
+ mkdir -p $(CHILLISPOT_BUILD_DIR)/etc
+ cp -a $(CHILLISPOT_DIR)/doc/chilli.conf $(CHILLISPOT_BUILD_DIR)/etc
+ cp -a $(CHILLISPOT_IPK_DIR)/root/* $(CHILLISPOT_BUILD_DIR)/
+ chmod 0755 $(CHILLISPOT_BUILD_DIR)/etc
+ chmod 0600 $(CHILLISPOT_BUILD_DIR)/etc/chilli.conf
+ chmod 0755 $(CHILLISPOT_BUILD_DIR)/etc/init.d
+ chmod 0755 $(CHILLISPOT_BUILD_DIR)/etc/init.d/*
+ chmod 0755 $(CHILLISPOT_BUILD_DIR)/usr
+ chmod 0755 $(CHILLISPOT_BUILD_DIR)/usr/sbin
+ chmod 0755 $(CHILLISPOT_BUILD_DIR)/usr/sbin/*
+ cp -a $(CHILLISPOT_IPK_DIR)/CONTROL $(CHILLISPOT_BUILD_DIR)/
+ perl -pi -e "s/^Vers.*:.*$$/Version: $(CHILLISPOT_VERSION)-$(CHILLISPOT_RELEASE)/" $(CHILLISPOT_BUILD_DIR)/CONTROL/control
+ perl -pi -e "s/^Arch.*:.*$$/Architecture: $(ARCH)/" $(CHILLISPOT_BUILD_DIR)/CONTROL/control
+
+ touch $(CHILLISPOT_BUILD_DIR)/CONTROL/control
+
+
+$(CHILLISPOT_IPK): $(CHILLISPOT_BUILD_DIR)/CONTROL/control
+ cd $(BUILD_DIR); $(IPKG_BUILD) $(CHILLISPOT_BUILD_DIR)
+
-# This stuff is needed to work around GNU make deficiencies
-chillispot-target_binary: $(CHILLISPOT_DIR)/$(CHILLISPOT_BINARY)
- @if [ -L $(TARGET_DIR)/$(CHILLISPOT_TARGET_BINARY) ] ; then \
- rm -f $(TARGET_DIR)/$(CHILLISPOT_TARGET_BINARY); fi;
- @if [ ! -f $(CHILLISPOT_DIR)/$(CHILLISPOT_BINARY) -o $(TARGET_DIR)/$(CHILLISPOT_TARGET_BINARY) \
- -ot $(CHILLISPOT_DIR)/$(CHILLISPOT_BINARY) ] ; then \
- set -x; \
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(CHILLISPOT_DIR) install; \
- $(STRIP) $(TARGET_DIR)/$(CHILLISPOT_TARGET_BINARY)
- rm -rf $(TARGET_DIR)/usr/man; fi;
-
-chillispot: $(CHILLISPOT_DIR)/$(CHILLISPOT_BINARY)
- #chillispot-target_binary
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(CHILLISPOT_DIR) install
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(CHILLISPOT_DIR)/doc install
- $(STRIP) $(TARGET_DIR)/$(CHILLISPOT_TARGET_BINARY)
-
+chillispot-ipk: ipkg-utils $(CHILLISPOT_IPK)
chillispot-clean:
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(CHILLISPOT_DIR) uninstall
- -$(MAKE) -C $(CHILLISPOT_DIR) clean
+ $(MAKE) -C $(CHILLISPOT_DIR) clean
chillispot-dirclean:
rm -rf $(CHILLISPOT_DIR)