2 # Copyright (C) 2010-2014 Jo-Philipp Wich <jow@openwrt.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
11 PKG_VERSION:=2014-10-27
12 PKG_RELEASE=$(PKG_SOURCE_VERSION)
15 PKG_SOURCE_URL:=git://nbd.name/uhttpd2.git
16 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17 PKG_SOURCE_VERSION:=fd8e5e379c23c5fbcec3e76894b839233df09067
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
19 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
25 PKG_BUILD_DEPENDS = ustream-ssl
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/cmake.mk
30 define Package/uhttpd/default
33 SUBMENU:=Web Servers/Proxies
34 TITLE:=uHTTPd - tiny, single threaded HTTP server
38 $(Package/uhttpd/default)
42 define Package/uhttpd/description
43 uHTTPd is a tiny single threaded HTTP server with TLS, CGI and Lua
44 support. It is intended as a drop-in replacement for the Busybox
48 define Package/uhttpd/config
49 config PACKAGE_uhttpd_debug
50 bool "Build with debug messages"
55 define Package/uhttpd-mod-tls
56 $(Package/uhttpd/default)
59 +PACKAGE_uhttpd-mod-tls_polarssl:libustream-polarssl \
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_polarssl
77 config PACKAGE_uhttpd-mod-tls_cyassl
80 config PACKAGE_uhttpd-mod-tls_openssl
85 define Package/uhttpd-mod-lua
86 $(Package/uhttpd/default)
88 DEPENDS:=uhttpd +liblua
91 define Package/uhttpd-mod-lua/description
92 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
96 define Package/uhttpd-mod-ubus
97 $(Package/uhttpd/default)
99 DEPENDS:=uhttpd +libubus +libblobmsg-json
102 define Package/uhttpd-mod-ubus/description
103 The ubus plugin adds a HTTP/JSON RPC proxy for ubus and publishes the
104 session.* namespace and procedures.
107 define Package/uhttpd/conffiles
113 TARGET_LDFLAGS += -lcrypt
115 CMAKE_OPTIONS = -DTLS_SUPPORT=on
117 define Package/uhttpd/install
118 $(INSTALL_DIR) $(1)/etc/init.d
119 $(INSTALL_BIN) ./files/uhttpd.init $(1)/etc/init.d/uhttpd
120 $(INSTALL_DIR) $(1)/etc/config
121 $(INSTALL_CONF) ./files/uhttpd.config $(1)/etc/config/uhttpd
122 $(INSTALL_DIR) $(1)/usr/sbin
123 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd
126 define Package/uhttpd-mod-tls/install
130 define Package/uhttpd-mod-lua/install
131 $(INSTALL_DIR) $(1)/usr/lib
132 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_lua.so $(1)/usr/lib/
135 define Package/uhttpd-mod-ubus/install
136 $(INSTALL_DIR) $(1)/usr/lib $(1)/etc/uci-defaults
137 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_ubus.so $(1)/usr/lib/
138 $(INSTALL_DATA) ./files/ubus.default $(1)/etc/uci-defaults/00_uhttpd_ubus
142 $(eval $(call BuildPackage,uhttpd))
143 $(eval $(call BuildPackage,uhttpd-mod-tls))
144 $(eval $(call BuildPackage,uhttpd-mod-lua))
145 $(eval $(call BuildPackage,uhttpd-mod-ubus))