d5c07a359a76e20b2022b4a1b8ca4f5c3c7702bf
[openwrt.git] / 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/default
18 SECTION:=net
19 CATEGORY:=Network
20 TITLE:=uHTTPd - tiny, single threaded HTTP server
21 endef
22
23 define Package/uhttpd
24 $(Package/uhttpd/default)
25 MENU:=1
26 endef
27
28 define Package/uhttpd/description
29 uHTTPd is a tiny single threaded HTTP server with TLS, CGI and Lua
30 support. It is intended as a drop-in replacement for the Busybox
31 HTTP daemon.
32 endef
33
34
35 define Package/uhttpd-mod-tls
36 $(Package/uhttpd/default)
37 TITLE+= (TLS plugin)
38 DEPENDS:=uhttpd +libcyassl
39 endef
40
41 define Package/uhttpd-mod-tls/description
42 The TLS plugin adds HTTPS support to uHTTPd.
43 endef
44
45
46 define Package/uhttpd-mod-lua
47 $(Package/uhttpd/default)
48 TITLE+= (Lua plugin)
49 DEPENDS:=uhttpd +liblua
50 endef
51
52 define Package/uhttpd-mod-lua/description
53 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
54 endef
55
56
57 # hack to use CyASSL headers
58 TARGET_CFLAGS += -I$(firstword $(wildcard $(BUILD_DIR)/cyassl-*/include))
59 MAKE_VARS += FPIC="$(FPIC)"
60
61 define Build/Prepare
62 mkdir -p $(PKG_BUILD_DIR)
63 $(CP) ./src/* $(PKG_BUILD_DIR)/
64 endef
65
66 define Package/uhttpd/conffiles
67 /etc/config/uhttpd
68 endef
69
70 define Package/uhttpd/install
71 $(INSTALL_DIR) $(1)/etc/init.d
72 $(INSTALL_BIN) ./files/uhttpd.init $(1)/etc/init.d/uhttpd
73 $(INSTALL_DIR) $(1)/etc/config
74 $(INSTALL_CONF) ./files/uhttpd.config $(1)/etc/config/uhttpd
75 $(INSTALL_DIR) $(1)/usr/sbin
76 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd
77 endef
78
79 define Package/uhttpd-mod-tls/install
80 $(INSTALL_DIR) $(1)/usr/lib
81 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_tls.so $(1)/usr/lib/
82 endef
83
84 define Package/uhttpd-mod-lua/install
85 $(INSTALL_DIR) $(1)/usr/lib
86 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_lua.so $(1)/usr/lib/
87 endef
88
89
90 $(eval $(call BuildPackage,uhttpd))
91 $(eval $(call BuildPackage,uhttpd-mod-tls))
92 $(eval $(call BuildPackage,uhttpd-mod-lua))
This page took 0.041544 seconds and 3 git commands to generate.