802fb209e66b58a3610b4428a26109dcc7ca91a4
[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 +zlib
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 # hack to use CyASSL headers
31 TARGET_CFLAGS += -I$(firstword $(wildcard $(BUILD_DIR)/cyassl-*/include))
32
33 define Build/Prepare
34         mkdir -p $(PKG_BUILD_DIR)
35         $(CP) ./src/* $(PKG_BUILD_DIR)/
36 endef
37
38 define Package/uhttpd/conffiles
39 /etc/config/uhttpd
40 endef
41
42 define Package/uhttpd/install
43         $(INSTALL_DIR) $(1)/etc/init.d
44         $(INSTALL_BIN) ./files/uhttpd.init $(1)/etc/init.d/uhttpd
45         $(INSTALL_DIR) $(1)/etc/config
46         $(INSTALL_CONF) ./files/uhttpd.config $(1)/etc/config/uhttpd
47         $(INSTALL_DIR) $(1)/usr/sbin
48         $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd
49 endef
50
51 $(eval $(call BuildPackage,uhttpd))