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-tls_cyassl \
16 CONFIG_PACKAGE_uhttpd-mod-tls_openssl
18 include $(INCLUDE_DIR
)/package.mk
20 define Package
/uhttpd
/default
23 SUBMENU
:=Web Servers
/Proxies
24 TITLE
:=uHTTPd
- tiny
, single threaded HTTP server
25 MAINTAINER
:=Jo-Philipp Wich
<xm@subsignal.org
>
29 $(Package
/uhttpd
/default
)
33 define Package
/uhttpd
/description
34 uHTTPd is a tiny single threaded HTTP server with TLS
, CGI and Lua
35 support. It is intended
as a drop-in replacement for the Busybox
40 define Package
/uhttpd-mod-tls
41 $(Package
/uhttpd
/default
)
43 DEPENDS
:=uhttpd
+PACKAGE_uhttpd-mod-tls_cyassl
:libcyassl
+PACKAGE_uhttpd-mod-tls_openssl
:libopenssl
46 define Package
/uhttpd-mod-tls
/description
47 The TLS plugin adds HTTPS support to uHTTPd.
50 define Package
/uhttpd-mod-tls
/config
52 depends on PACKAGE_uhttpd-mod-tls
54 default PACKAGE_uhttpd-mod-tls_cyassl
56 config PACKAGE_uhttpd-mod-tls_cyassl
59 config PACKAGE_uhttpd-mod-tls_openssl
67 ifneq ($(CONFIG_PACKAGE_uhttpd-mod-tls_cyassl
),)
69 TLS_CFLAGS
:=-I
$(STAGING_DIR
)/usr
/include/cyassl
72 ifneq ($(CONFIG_PACKAGE_uhttpd-mod-tls_openssl
),)
77 define Package
/uhttpd-mod-lua
78 $(Package
/uhttpd
/default
)
80 DEPENDS
:=uhttpd
+liblua
83 define Package
/uhttpd-mod-lua
/description
84 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
88 TARGET_CFLAGS
+= $(TLS_CFLAGS
)
89 MAKE_VARS
+= FPIC
="$(FPIC)" UHTTPD_TLS
="$(UHTTPD_TLS)"
92 mkdir
-p
$(PKG_BUILD_DIR
)
93 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
96 define Package
/uhttpd
/conffiles
102 define Package
/uhttpd
/install
103 $(INSTALL_DIR
) $(1)/etc
/init.d
104 $(INSTALL_BIN
) .
/files
/uhttpd.init
$(1)/etc
/init.d
/uhttpd
105 $(INSTALL_DIR
) $(1)/etc
/config
106 $(INSTALL_CONF
) .
/files
/uhttpd.config
$(1)/etc
/config
/uhttpd
107 $(INSTALL_DIR
) $(1)/usr
/sbin
108 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd
$(1)/usr
/sbin
/uhttpd
111 define Package
/uhttpd-mod-tls
/install
112 $(INSTALL_DIR
) $(1)/usr
/lib
113 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_tls.so
$(1)/usr
/lib
/
116 define Package
/uhttpd-mod-lua
/install
117 $(INSTALL_DIR
) $(1)/usr
/lib
118 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_lua.so
$(1)/usr
/lib
/
122 $(eval
$(call BuildPackage
,uhttpd
))
123 $(eval
$(call BuildPackage
,uhttpd-mod-tls
))
124 $(eval
$(call BuildPackage
,uhttpd-mod-lua
))