2 # Copyright (C) 2010-2012 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:=2013-01-21
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:=7bd66ddacb6b87a927b7846a44c02c0df7988c71
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
19 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
21 PKG_CONFIG_DEPENDS = CONFIG_PACKAGE_uhttpd-mod-tls
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/cmake.mk
26 define Package/uhttpd/default
29 SUBMENU:=Web Servers/Proxies
30 TITLE:=uHTTPd - tiny, single threaded HTTP server
34 $(Package/uhttpd/default)
38 define Package/uhttpd/description
39 uHTTPd is a tiny single threaded HTTP server with TLS, CGI and Lua
40 support. It is intended as a drop-in replacement for the Busybox
44 define Package/uhttpd/config
45 config PACKAGE_uhttpd_debug
46 bool "Build with debug messages"
51 define Package/uhttpd-mod-tls
52 $(Package/uhttpd/default)
54 DEPENDS:=uhttpd +PACKAGE_uhttpd-mod-tls_cyassl:libustream-cyassl +PACKAGE_uhttpd-mod-tls_openssl:libustream-openssl
57 define Package/uhttpd-mod-tls/description
58 The TLS plugin adds HTTPS support to uHTTPd.
61 define Package/uhttpd-mod-tls/config
63 depends on PACKAGE_uhttpd-mod-tls
65 default PACKAGE_uhttpd-mod-tls_cyassl
67 config PACKAGE_uhttpd-mod-tls_cyassl
70 config PACKAGE_uhttpd-mod-tls_openssl
75 define Package/uhttpd-mod-lua
76 $(Package/uhttpd/default)
78 DEPENDS:=uhttpd +liblua
81 define Package/uhttpd-mod-lua/description
82 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
86 define Package/uhttpd-mod-ubus
87 $(Package/uhttpd/default)
89 DEPENDS:=uhttpd +libubus +libblobmsg-json
92 define Package/uhttpd-mod-ubus/description
93 The ubus plugin adds a HTTP/JSON RPC proxy for ubus and publishes the
94 session.* namespace and procedures.
97 define Package/uhttpd/conffiles
103 TARGET_LDFLAGS += -lcrypt
105 CMAKE_OPTIONS = -DTLS_SUPPORT=$(if $(CONFIG_PACKAGE_uhttpd-mod-tls),on,off)
107 define Package/uhttpd/install
108 $(INSTALL_DIR) $(1)/etc/init.d
109 $(INSTALL_BIN) ./files/uhttpd.init $(1)/etc/init.d/uhttpd
110 $(INSTALL_DIR) $(1)/etc/config
111 $(INSTALL_CONF) ./files/uhttpd.config $(1)/etc/config/uhttpd
112 $(INSTALL_DIR) $(1)/usr/sbin
113 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd
116 define Package/uhttpd-mod-tls/install
120 define Package/uhttpd-mod-lua/install
121 $(INSTALL_DIR) $(1)/usr/lib
122 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_lua.so $(1)/usr/lib/
125 define Package/uhttpd-mod-ubus/install
126 $(INSTALL_DIR) $(1)/usr/lib
127 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_ubus.so $(1)/usr/lib/
131 $(eval $(call BuildPackage,uhttpd))
132 $(eval $(call BuildPackage,uhttpd-mod-tls))
133 $(eval $(call BuildPackage,uhttpd-mod-lua))
134 $(eval $(call BuildPackage,uhttpd-mod-ubus))