2 # Copyright (C) 2010 Jo-Philipp Wich <xm@subsignal.org>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
13 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_NAME
)
14 PKG_BUILD_DEPENDS
:= libcyassl liblua
16 include $(INCLUDE_DIR
)/package.mk
18 define Package
/uhttpd
/default
21 TITLE
:=uHTTPd
- tiny
, single threaded HTTP server
22 MAINTAINER
:=Jo-Philipp Wich
<xm@subsignal.org
>
26 $(Package
/uhttpd
/default
)
30 define Package
/uhttpd
/description
31 uHTTPd is a tiny single threaded HTTP server with TLS
, CGI and Lua
32 support. It is intended
as a drop-in replacement for the Busybox
37 define Package
/uhttpd-mod-tls
38 $(Package
/uhttpd
/default
)
40 DEPENDS
:=uhttpd
+libcyassl
43 define Package
/uhttpd-mod-tls
/description
44 The TLS plugin adds HTTPS support to uHTTPd.
48 define Package
/uhttpd-mod-lua
49 $(Package
/uhttpd
/default
)
51 DEPENDS
:=uhttpd
+liblua
54 define Package
/uhttpd-mod-lua
/description
55 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
59 # hack to use CyASSL headers
60 TARGET_CFLAGS
+= -I
$(firstword $(wildcard $(BUILD_DIR
)/cyassl-
*/include))
62 MAKE_VARS
+= FPIC
="$(FPIC)"
65 mkdir
-p
$(PKG_BUILD_DIR
)
66 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
69 define Package
/uhttpd
/conffiles
75 define Package
/uhttpd
/install
76 $(INSTALL_DIR
) $(1)/etc
/init.d
77 $(INSTALL_BIN
) .
/files
/uhttpd.init
$(1)/etc
/init.d
/uhttpd
78 $(INSTALL_DIR
) $(1)/etc
/config
79 $(INSTALL_CONF
) .
/files
/uhttpd.config
$(1)/etc
/config
/uhttpd
80 $(INSTALL_DIR
) $(1)/usr
/sbin
81 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd
$(1)/usr
/sbin
/uhttpd
84 define Package
/uhttpd-mod-tls
/install
85 $(INSTALL_DIR
) $(1)/usr
/lib
86 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_tls.so
$(1)/usr
/lib
/
89 define Package
/uhttpd-mod-lua
/install
90 $(INSTALL_DIR
) $(1)/usr
/lib
91 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_lua.so
$(1)/usr
/lib
/
95 $(eval
$(call BuildPackage
,uhttpd
))
96 $(eval
$(call BuildPackage
,uhttpd-mod-tls
))
97 $(eval
$(call BuildPackage
,uhttpd-mod-lua
))