2 # Copyright (C) 2010-2011 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_CONFIG_DEPENDS
:= \
15 CONFIG_PACKAGE_uhttpd-mod-lua \
16 CONFIG_PACKAGE_uhttpd-mod-tls \
17 CONFIG_PACKAGE_uhttpd-mod-tls_cyassl \
18 CONFIG_PACKAGE_uhttpd-mod-tls_openssl
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/uhttpd
/default
25 SUBMENU
:=Web Servers
/Proxies
26 TITLE
:=uHTTPd
- tiny
, single threaded HTTP server
27 MAINTAINER
:=Jo-Philipp Wich
<xm@subsignal.org
>
31 $(Package
/uhttpd
/default
)
35 define Package
/uhttpd
/description
36 uHTTPd is a tiny single threaded HTTP server with TLS
, CGI and Lua
37 support. It is intended
as a drop-in replacement for the Busybox
42 define Package
/uhttpd-mod-tls
43 $(Package
/uhttpd
/default
)
45 DEPENDS
:=uhttpd
+PACKAGE_uhttpd-mod-tls_cyassl
:libcyassl
+PACKAGE_uhttpd-mod-tls_openssl
:libopenssl
48 define Package
/uhttpd-mod-tls
/description
49 The TLS plugin adds HTTPS support to uHTTPd.
52 define Package
/uhttpd-mod-tls
/config
54 depends on PACKAGE_uhttpd-mod-tls
56 default PACKAGE_uhttpd-mod-tls_cyassl
58 config PACKAGE_uhttpd-mod-tls_cyassl
61 config PACKAGE_uhttpd-mod-tls_openssl
70 ifneq ($(CONFIG_PACKAGE_uhttpd-mod-tls_cyassl
),)
72 TLS_CFLAGS
:=-I
$(STAGING_DIR
)/usr
/include/cyassl
-DTLS_IS_CYASSL
75 ifneq ($(CONFIG_PACKAGE_uhttpd-mod-tls_openssl
),)
77 TLS_CFLAGS
:=-DTLS_IS_OPENSSL
81 define Package
/uhttpd-mod-lua
82 $(Package
/uhttpd
/default
)
84 DEPENDS
:=uhttpd
+liblua
87 define Package
/uhttpd-mod-lua
/description
88 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
92 TARGET_CFLAGS
+= $(TLS_CFLAGS
)
95 LUA_SUPPORT
="$(if $(CONFIG_PACKAGE_uhttpd-mod-lua),1)" \
96 TLS_SUPPORT
="$(if $(CONFIG_PACKAGE_uhttpd-mod-tls),1)" \
97 UHTTPD_TLS
="$(UHTTPD_TLS)"
100 mkdir
-p
$(PKG_BUILD_DIR
)
101 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
104 define Package
/uhttpd
/conffiles
110 define Package
/uhttpd
/install
111 $(INSTALL_DIR
) $(1)/etc
/init.d
112 $(INSTALL_BIN
) .
/files
/uhttpd.init
$(1)/etc
/init.d
/uhttpd
113 $(INSTALL_DIR
) $(1)/etc
/config
114 $(INSTALL_CONF
) .
/files
/uhttpd.config
$(1)/etc
/config
/uhttpd
115 $(INSTALL_DIR
) $(1)/usr
/sbin
116 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd
$(1)/usr
/sbin
/uhttpd
119 define Package
/uhttpd-mod-tls
/install
120 $(INSTALL_DIR
) $(1)/usr
/lib
121 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_tls.so
$(1)/usr
/lib
/
124 define Package
/uhttpd-mod-lua
/install
125 $(INSTALL_DIR
) $(1)/usr
/lib
126 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_lua.so
$(1)/usr
/lib
/
130 $(eval
$(call BuildPackage
,uhttpd
))
131 $(eval
$(call BuildPackage
,uhttpd-mod-tls
))
132 $(eval
$(call BuildPackage
,uhttpd-mod-lua
))