2 # Copyright (C) 2010-2015 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:=2015-01-25.2
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:=db79faae848e9ca5ed1c5b62cdd9d01650687fff
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
19 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
22 PKG_BUILD_DEPENDS = ustream-ssl
24 include $(INCLUDE_DIR)/package.mk
25 include $(INCLUDE_DIR)/cmake.mk
27 define Package/uhttpd/default
30 SUBMENU:=Web Servers/Proxies
31 TITLE:=uHTTPd - tiny, single threaded HTTP server
35 $(Package/uhttpd/default)
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_cyassl:libustream-cyassl \
58 +PACKAGE_uhttpd-mod-tls_openssl:libustream-openssl
61 define Package/uhttpd-mod-tls/description
62 The TLS plugin adds HTTPS support to uHTTPd.
65 define Package/uhttpd-mod-tls/config
67 depends on PACKAGE_uhttpd-mod-tls
69 default PACKAGE_uhttpd-mod-tls_polarssl
71 config PACKAGE_uhttpd-mod-tls_polarssl
74 config PACKAGE_uhttpd-mod-tls_cyassl
77 config PACKAGE_uhttpd-mod-tls_openssl
82 define Package/uhttpd-mod-lua
83 $(Package/uhttpd/default)
85 DEPENDS:=uhttpd +liblua
88 define Package/uhttpd-mod-lua/description
89 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
93 define Package/uhttpd-mod-ubus
94 $(Package/uhttpd/default)
96 DEPENDS:=uhttpd +libubus +libblobmsg-json
99 define Package/uhttpd-mod-ubus/description
100 The ubus plugin adds a HTTP/JSON RPC proxy for ubus and publishes the
101 session.* namespace and procedures.
104 define Package/uhttpd/conffiles
110 TARGET_LDFLAGS += -lcrypt
112 CMAKE_OPTIONS = -DTLS_SUPPORT=on
114 define Package/uhttpd/install
115 $(INSTALL_DIR) $(1)/etc/init.d
116 $(INSTALL_BIN) ./files/uhttpd.init $(1)/etc/init.d/uhttpd
117 $(INSTALL_DIR) $(1)/etc/config
118 $(INSTALL_CONF) ./files/uhttpd.config $(1)/etc/config/uhttpd
119 $(INSTALL_DIR) $(1)/usr/sbin
120 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd
123 define Package/uhttpd-mod-tls/install
127 define Package/uhttpd-mod-lua/install
128 $(INSTALL_DIR) $(1)/usr/lib
129 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_lua.so $(1)/usr/lib/
132 define Package/uhttpd-mod-ubus/install
133 $(INSTALL_DIR) $(1)/usr/lib $(1)/etc/uci-defaults
134 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_ubus.so $(1)/usr/lib/
135 $(INSTALL_DATA) ./files/ubus.default $(1)/etc/uci-defaults/00_uhttpd_ubus
139 $(eval $(call BuildPackage,uhttpd))
140 $(eval $(call BuildPackage,uhttpd-mod-tls))
141 $(eval $(call BuildPackage,uhttpd-mod-lua))
142 $(eval $(call BuildPackage,uhttpd-mod-ubus))