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
11 PKG_VERSION
:=2016-10-04
12 PKG_RELEASE
=$(PKG_SOURCE_VERSION
)
15 PKG_SOURCE_URL
=$(LEDE_GIT
)/project
/uhttpd.git
16 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_SOURCE_VERSION
:=9d9f07142bbef1c63a79620967a847a9493105e5
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_SOURCE_VERSION
).
tar.xz
19 PKG_MIRROR_MD5SUM
:=57d8d2a0c4b22f19297abaa75be25de90f0e771d6ee928e1fb1e54cf6f6dab70
20 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
23 PKG_BUILD_DEPENDS
= ustream-ssl
25 include $(INCLUDE_DIR
)/package.mk
26 include $(INCLUDE_DIR
)/cmake.mk
27 include $(INCLUDE_DIR
)/version.mk
29 define Package
/uhttpd
/default
32 SUBMENU
:=Web Servers
/Proxies
33 TITLE
:=uHTTPd
- tiny
, single threaded HTTP server
37 $(Package
/uhttpd
/default
)
38 DEPENDS
:=+libubox
+libblobmsg-json
+libjson-script
41 define Package
/uhttpd
/description
42 uHTTPd is a tiny single threaded HTTP server with TLS
, CGI and Lua
43 support. It is intended
as a drop-in replacement for the Busybox
47 define Package
/uhttpd
/config
48 config PACKAGE_uhttpd_debug
49 bool
"Build with debug messages"
54 define Package
/uhttpd-mod-tls
55 $(Package
/uhttpd
/default
)
58 +PACKAGE_uhttpd-mod-tls_polarssl
:libustream-polarssl \
59 +PACKAGE_uhttpd-mod-tls_mbedtls
:libustream-mbedtls \
60 +PACKAGE_uhttpd-mod-tls_cyassl
:libustream-cyassl \
61 +PACKAGE_uhttpd-mod-tls_openssl
:libustream-openssl
64 define Package
/uhttpd-mod-tls
/description
65 The TLS plugin adds HTTPS support to uHTTPd.
68 define Package
/uhttpd-mod-tls
/config
70 depends on PACKAGE_uhttpd-mod-tls
72 default PACKAGE_uhttpd-mod-tls_polarssl
74 config PACKAGE_uhttpd-mod-tls_mbedtls
77 config PACKAGE_uhttpd-mod-tls_polarssl
80 config PACKAGE_uhttpd-mod-tls_cyassl
83 config PACKAGE_uhttpd-mod-tls_openssl
88 define Package
/uhttpd-mod-lua
89 $(Package
/uhttpd
/default
)
91 DEPENDS
:=uhttpd
+liblua
94 define Package
/uhttpd-mod-lua
/description
95 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
99 define Package
/uhttpd-mod-ubus
100 $(Package
/uhttpd
/default
)
101 TITLE
+= (ubus plugin
)
102 DEPENDS
:=uhttpd
+libubus
+libblobmsg-json
105 define Package
/uhttpd-mod-ubus
/description
106 The ubus plugin adds a HTTP
/JSON RPC proxy for ubus and publishes the
107 session.
* namespace and procedures.
110 define Package
/uhttpd
/conffiles
116 ifneq ($(CONFIG_USE_GLIBC
),)
117 TARGET_CFLAGS
+= -D_DEFAULT_SOURCE
120 TARGET_LDFLAGS
+= -lcrypt
122 CMAKE_OPTIONS
= -DTLS_SUPPORT
=on
124 define Package
/uhttpd
/install
125 $(INSTALL_DIR
) $(1)/etc
/init.d
126 $(INSTALL_BIN
) .
/files
/uhttpd.init
$(1)/etc
/init.d
/uhttpd
127 $(INSTALL_DIR
) $(1)/etc
/config
128 $(INSTALL_CONF
) .
/files
/uhttpd.config
$(1)/etc
/config
/uhttpd
129 $(VERSION_SED_SCRIPT
) $(1)/etc
/config
/uhttpd
130 $(INSTALL_DIR
) $(1)/usr
/sbin
131 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd
$(1)/usr
/sbin
/uhttpd
134 define Package
/uhttpd-mod-tls
/install
138 define Package
/uhttpd-mod-lua
/install
139 $(INSTALL_DIR
) $(1)/usr
/lib
140 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_lua.so
$(1)/usr
/lib
/
143 define Package
/uhttpd-mod-ubus
/install
144 $(INSTALL_DIR
) $(1)/usr
/lib
$(1)/etc
/uci-defaults
145 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_ubus.so
$(1)/usr
/lib
/
146 $(INSTALL_DATA
) .
/files
/ubus.default
$(1)/etc
/uci-defaults
/00_uhttpd_ubus
150 $(eval
$(call BuildPackage
,uhttpd
))
151 $(eval
$(call BuildPackage
,uhttpd-mod-tls
))
152 $(eval
$(call BuildPackage
,uhttpd-mod-lua
))
153 $(eval
$(call BuildPackage
,uhttpd-mod-ubus
))