summaryrefslogtreecommitdiff
path: root/package/tinyhttpd/tinyhttpd.mk
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2007-07-17 00:23:31 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2007-07-17 00:23:31 +0000
commit80de02162d221771af3ef98ce4b2c25dfea1e7e7 (patch)
tree63b4743a0e3bd8dae7ddb3ba086a3a99141d07b1 /package/tinyhttpd/tinyhttpd.mk
parentb9721176badd3655286877e689a26c45fae01caa (diff)
Add new 'tinyhttpd' package and move all other httpd servers to be disabled if the BusyBox server is being used.
Diffstat (limited to 'package/tinyhttpd/tinyhttpd.mk')
-rw-r--r--package/tinyhttpd/tinyhttpd.mk56
1 files changed, 56 insertions, 0 deletions
diff --git a/package/tinyhttpd/tinyhttpd.mk b/package/tinyhttpd/tinyhttpd.mk
new file mode 100644
index 000000000..af13d7d18
--- /dev/null
+++ b/package/tinyhttpd/tinyhttpd.mk
@@ -0,0 +1,56 @@
+#############################################################
+#
+# tinyhttpd
+#
+#############################################################
+TINYHTTPD_VER:=0.1.0
+TINYHTTPD_SOURCE:=tinyhttpd-$(TINYHTTPD_VER).tar.gz
+TINYHTTPD_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/tinyhttpd/$(TINYHTTPD_SOURCE)
+TINYHTTPD_DIR:=$(BUILD_DIR)/tinyhttpd-$(TINYHTTPD_VER)
+TINYHTTPD_CAT:=$(ZCAT)
+TINYHTTPD_BINARY:=httpd
+TINYHTTPD_TARGET_BINARY:=usr/sbin/tinyhttpd
+
+$(DL_DIR)/$(TINYHTTPD_SOURCE):
+ $(WGET) -P $(DL_DIR) $(TINYHTTPD_SITE)/$(TINYHTTPD_SOURCE)
+
+tinyhttpd-source: $(DL_DIR)/$(TINYHTTPD_SOURCE)
+
+#############################################################
+#
+# build tinyhttpd for use on the target system
+#
+#############################################################
+$(TINYHTTPD_DIR)/.unpacked: $(DL_DIR)/$(TINYHTTPD_SOURCE)
+ $(TINYHTTPD_CAT) $(DL_DIR)/$(TINYHTTPD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(TINYHTTPD_DIR) package/tinyhttpd/ tinyhttpd\*.patch
+ touch $(TINYHTTPD_DIR)/.unpacked
+
+$(TINYHTTPD_DIR)/$(TINYHTTPD_BINARY): $(TINYHTTPD_DIR)/.unpacked
+ $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -C $(TINYHTTPD_DIR)
+
+$(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY): $(TINYHTTPD_DIR)/$(TINYHTTPD_BINARY)
+ $(INSTALL) -m 0755 $(TINYHTTPD_DIR)/$(TINYHTTPD_BINARY) $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY)
+ $(STRIP) --strip-unneeded $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY)
+ $(INSTALL) -m 0755 package/tinyhttpd/S85tinyhttpd $(TARGET_DIR)/etc/init.d
+ mkdir -p $(TARGET_DIR)/var/www
+
+tinyhttpd: uclibc $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY)
+
+tinyhttpd-clean:
+ $(MAKE) -C $(TINYHTTPD_DIR) clean
+ @rm -f $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY)
+ @rm -f $(TARGET_DIR)/etc/init.d/S85tinyhttpd
+ @rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/var/www
+
+tinyhttpd-dirclean:
+ rm -rf $(TINYHTTPD_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_TINYHTTPD)),y)
+TARGETS+=tinyhttpd
+endif