2 # Copyright (C) 2010-2015 Jo-Philipp Wich <jo@mein.io>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE_URL
=$(LEDE_GIT
)/project
/uhttpd.git
15 PKG_SOURCE_DATE
:=2016-10-25
16 PKG_SOURCE_VERSION
:=1628fa4b34aa143187353f81e8001b9a15286bda
17 PKG_MIRROR_HASH
:=2ac4ba8dc0b349d72174aac9ff693a73a214295a9890fe3d2a8eedcad54d06e3
18 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
21 PKG_BUILD_DEPENDS
= ustream-ssl
23 include $(INCLUDE_DIR
)/package.mk
24 include $(INCLUDE_DIR
)/cmake.mk
25 include $(INCLUDE_DIR
)/version.mk
27 define Package
/uhttpd
/default
30 SUBMENU
:=Web Servers
/Proxies
31 TITLE
:=uHTTPd
- tiny
, single threaded HTTP server
35 $(Package
/uhttpd
/default
)
36 DEPENDS
:=+libubox
+libblobmsg-json
+libjson-script
39 define Package
/uhttpd
/description
40 uHTTPd is a tiny single threaded HTTP server with TLS
, CGI and Lua
41 support. It is intended
as a drop-in replacement for the Busybox
45 define Package
/uhttpd
/config
46 config PACKAGE_uhttpd_debug
47 bool
"Build with debug messages"
52 define Package
/uhttpd-mod-tls
53 $(Package
/uhttpd
/default
)
56 +PACKAGE_uhttpd-mod-tls_polarssl
:libustream-polarssl \
57 +PACKAGE_uhttpd-mod-tls_mbedtls
:libustream-mbedtls \
58 +PACKAGE_uhttpd-mod-tls_cyassl
:libustream-cyassl \
59 +PACKAGE_uhttpd-mod-tls_openssl
:libustream-openssl
62 define Package
/uhttpd-mod-tls
/description
63 The TLS plugin adds HTTPS support to uHTTPd.
66 define Package
/uhttpd-mod-tls
/config
68 depends on PACKAGE_uhttpd-mod-tls
70 default PACKAGE_uhttpd-mod-tls_polarssl
72 config PACKAGE_uhttpd-mod-tls_mbedtls
75 config PACKAGE_uhttpd-mod-tls_polarssl
78 config PACKAGE_uhttpd-mod-tls_cyassl
81 config PACKAGE_uhttpd-mod-tls_openssl
86 define Package
/uhttpd-mod-lua
87 $(Package
/uhttpd
/default
)
89 DEPENDS
:=uhttpd
+liblua
92 define Package
/uhttpd-mod-lua
/description
93 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
97 define Package
/uhttpd-mod-ubus
98 $(Package
/uhttpd
/default
)
100 DEPENDS
:=uhttpd
+libubus
+libblobmsg-json
103 define Package
/uhttpd-mod-ubus
/description
104 The ubus plugin adds a HTTP
/JSON RPC proxy for ubus and publishes the
105 session.
* namespace and procedures.
108 define Package
/uhttpd
/conffiles
114 ifneq ($(CONFIG_USE_GLIBC
),)
115 TARGET_CFLAGS
+= -D_DEFAULT_SOURCE
118 TARGET_LDFLAGS
+= -lcrypt
120 CMAKE_OPTIONS
= -DTLS_SUPPORT
=on
122 define Package
/uhttpd
/install
123 $(INSTALL_DIR
) $(1)/etc
/init.d
124 $(INSTALL_BIN
) .
/files
/uhttpd.init
$(1)/etc
/init.d
/uhttpd
125 $(INSTALL_DIR
) $(1)/etc
/config
126 $(INSTALL_CONF
) .
/files
/uhttpd.config
$(1)/etc
/config
/uhttpd
127 $(VERSION_SED_SCRIPT
) $(1)/etc
/config
/uhttpd
128 $(INSTALL_DIR
) $(1)/usr
/sbin
129 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd
$(1)/usr
/sbin
/uhttpd
132 define Package
/uhttpd-mod-tls
/install
136 define Package
/uhttpd-mod-lua
/install
137 $(INSTALL_DIR
) $(1)/usr
/lib
138 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_lua.so
$(1)/usr
/lib
/
141 define Package
/uhttpd-mod-ubus
/install
142 $(INSTALL_DIR
) $(1)/usr
/lib
$(1)/etc
/uci-defaults
143 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_ubus.so
$(1)/usr
/lib
/
144 $(INSTALL_DATA
) .
/files
/ubus.default
$(1)/etc
/uci-defaults
/00_uhttpd_ubus
148 $(eval
$(call BuildPackage
,uhttpd
))
149 $(eval
$(call BuildPackage
,uhttpd-mod-tls
))
150 $(eval
$(call BuildPackage
,uhttpd-mod-lua
))
151 $(eval
$(call BuildPackage
,uhttpd-mod-ubus
))