contrib/package: add uhttpd, a drop-in replacement for busybox httpd
[project/luci.git] / contrib / package / uhttpd / Makefile
1 #
2 # Copyright (C) 2010 Jo-Philipp Wich <xm@subsignal.org>
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=uhttpd
11 PKG_RELEASE:=1
12
13 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
14
15 include $(INCLUDE_DIR)/package.mk
16
17 define Package/uhttpd
18   SECTION:=net
19   CATEGORY:=Network
20   TITLE:=uHTTPd - tiny, single threaded HTTP server
21   DEPENDS:=+liblua +libcyassl
22 endef
23
24 define Package/uhttpd/description
25  uHTTPd is a tiny single threaded HTTP server with TLS, CGI and Lua
26  support. It is intended as a drop-in replacement for the Busybox
27  HTTP daemon.
28 endef
29
30 define Build/Prepare
31         mkdir -p $(PKG_BUILD_DIR)
32         $(CP) ./src/* $(PKG_BUILD_DIR)/
33 endef
34
35 TARGET_CFLAGS += --std=c99 -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=500
36 TARGET_LDFLAGS += -lz -lm -lcrypt
37
38 define Package/uhttpd/install
39         $(INSTALL_DIR) $(1)/sbin
40         $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/sbin/
41 endef
42
43 $(eval $(call BuildPackage,uhttpd))