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
25 $(Package
/uhttpd
/default
)
29 define Package
/uhttpd
/description
30 uHTTPd is a tiny single threaded HTTP server with TLS
, CGI and Lua
31 support. It is intended
as a drop-in replacement for the Busybox
36 define Package
/uhttpd-mod-tls
37 $(Package
/uhttpd
/default
)
39 DEPENDS
:=uhttpd
+libcyassl
42 define Package
/uhttpd-mod-tls
/description
43 The TLS plugin adds HTTPS support to uHTTPd.
47 define Package
/uhttpd-mod-lua
48 $(Package
/uhttpd
/default
)
50 DEPENDS
:=uhttpd
+liblua
53 define Package
/uhttpd-mod-lua
/description
54 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
58 # hack to use CyASSL headers
59 TARGET_CFLAGS
+= -I
$(firstword $(wildcard $(BUILD_DIR
)/cyassl-
*/include))
61 MAKE_VARS
+= FPIC
="$(FPIC)"
64 mkdir
-p
$(PKG_BUILD_DIR
)
65 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
68 define Package
/uhttpd
/conffiles
72 define Package
/uhttpd
/install
73 $(INSTALL_DIR
) $(1)/etc
/init.d
74 $(INSTALL_BIN
) .
/files
/uhttpd.init
$(1)/etc
/init.d
/uhttpd
75 $(INSTALL_DIR
) $(1)/etc
/config
76 $(INSTALL_CONF
) .
/files
/uhttpd.config
$(1)/etc
/config
/uhttpd
77 $(INSTALL_DIR
) $(1)/usr
/sbin
78 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd
$(1)/usr
/sbin
/uhttpd
81 define Package
/uhttpd-mod-tls
/install
82 $(INSTALL_DIR
) $(1)/usr
/lib
83 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_tls.so
$(1)/usr
/lib
/
86 define Package
/uhttpd-mod-lua
/install
87 $(INSTALL_DIR
) $(1)/usr
/lib
88 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_lua.so
$(1)/usr
/lib
/
92 $(eval
$(call BuildPackage
,uhttpd
))
93 $(eval
$(call BuildPackage
,uhttpd-mod-tls
))
94 $(eval
$(call BuildPackage
,uhttpd-mod-lua
))