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
)
15 include $(INCLUDE_DIR
)/package.mk
17 define Package
/uhttpd
/default
20 TITLE
:=uHTTPd
- tiny
, single threaded HTTP server
24 $(Package
/uhttpd
/default
)
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
35 define Package
/uhttpd-mod-tls
36 $(Package
/uhttpd
/default
)
38 DEPENDS
:=uhttpd
+libcyassl
41 define Package
/uhttpd-mod-tls
/description
42 The TLS plugin adds HTTPS support to uHTTPd.
46 define Package
/uhttpd-mod-lua
47 $(Package
/uhttpd
/default
)
49 DEPENDS
:=uhttpd
+liblua
52 define Package
/uhttpd-mod-lua
/description
53 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
57 # hack to use CyASSL headers
58 TARGET_CFLAGS
+= -I
$(firstword $(wildcard $(BUILD_DIR
)/cyassl-
*/include))
60 MAKE_VARS
+= FPIC
="$(FPIC)"
63 mkdir
-p
$(PKG_BUILD_DIR
)
64 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
67 define Package
/uhttpd
/conffiles
71 define Package
/uhttpd
/install
72 $(INSTALL_DIR
) $(1)/etc
/init.d
73 $(INSTALL_BIN
) .
/files
/uhttpd.init
$(1)/etc
/init.d
/uhttpd
74 $(INSTALL_DIR
) $(1)/etc
/config
75 $(INSTALL_CONF
) .
/files
/uhttpd.config
$(1)/etc
/config
/uhttpd
76 $(INSTALL_DIR
) $(1)/usr
/sbin
77 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd
$(1)/usr
/sbin
/uhttpd
80 define Package
/uhttpd-mod-tls
/install
81 $(INSTALL_DIR
) $(1)/usr
/lib
82 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_tls.so
$(1)/usr
/lib
/
85 define Package
/uhttpd-mod-lua
/install
86 $(INSTALL_DIR
) $(1)/usr
/lib
87 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_lua.so
$(1)/usr
/lib
/
91 $(eval
$(call BuildPackage
,uhttpd
))
92 $(eval
$(call BuildPackage
,uhttpd-mod-tls
))
93 $(eval
$(call BuildPackage
,uhttpd-mod-lua
))