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 SUBMENU
:=Web Servers
/Proxies
22 TITLE
:=uHTTPd
- tiny
, single threaded HTTP server
23 MAINTAINER
:=Jo-Philipp Wich
<xm@subsignal.org
>
27 $(Package
/uhttpd
/default
)
31 define Package
/uhttpd
/description
32 uHTTPd is a tiny single threaded HTTP server with TLS
, CGI and Lua
33 support. It is intended
as a drop-in replacement for the Busybox
38 define Package
/uhttpd-mod-tls
39 $(Package
/uhttpd
/default
)
41 DEPENDS
:=uhttpd
+libcyassl
44 define Package
/uhttpd-mod-tls
/description
45 The TLS plugin adds HTTPS support to uHTTPd.
49 define Package
/uhttpd-mod-lua
50 $(Package
/uhttpd
/default
)
52 DEPENDS
:=uhttpd
+liblua
55 define Package
/uhttpd-mod-lua
/description
56 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
60 # hack to use CyASSL headers
61 TARGET_CFLAGS
+= -I
$(firstword $(wildcard $(BUILD_DIR
)/cyassl-
*/include))
63 MAKE_VARS
+= FPIC
="$(FPIC)"
66 mkdir
-p
$(PKG_BUILD_DIR
)
67 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
70 define Package
/uhttpd
/conffiles
76 define Package
/uhttpd
/install
77 $(INSTALL_DIR
) $(1)/etc
/init.d
78 $(INSTALL_BIN
) .
/files
/uhttpd.init
$(1)/etc
/init.d
/uhttpd
79 $(INSTALL_DIR
) $(1)/etc
/config
80 $(INSTALL_CONF
) .
/files
/uhttpd.config
$(1)/etc
/config
/uhttpd
81 $(INSTALL_DIR
) $(1)/usr
/sbin
82 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd
$(1)/usr
/sbin
/uhttpd
85 define Package
/uhttpd-mod-tls
/install
86 $(INSTALL_DIR
) $(1)/usr
/lib
87 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_tls.so
$(1)/usr
/lib
/
90 define Package
/uhttpd-mod-lua
/install
91 $(INSTALL_DIR
) $(1)/usr
/lib
92 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_lua.so
$(1)/usr
/lib
/
96 $(eval
$(call BuildPackage
,uhttpd
))
97 $(eval
$(call BuildPackage
,uhttpd-mod-tls
))
98 $(eval
$(call BuildPackage
,uhttpd-mod-lua
))