summaryrefslogtreecommitdiff
path: root/package/uhttpd/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'package/uhttpd/Makefile')
-rw-r--r--package/uhttpd/Makefile55
1 files changed, 41 insertions, 14 deletions
diff --git a/package/uhttpd/Makefile b/package/uhttpd/Makefile
index 0331470..f30d6ca 100644
--- a/package/uhttpd/Makefile
+++ b/package/uhttpd/Makefile
@@ -8,14 +8,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uhttpd
-PKG_RELEASE:=32
+PKG_RELEASE:=33
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_CONFIG_DEPENDS := \
+ CONFIG_PACKAGE_uhttpd_debug \
CONFIG_PACKAGE_uhttpd-mod-lua \
CONFIG_PACKAGE_uhttpd-mod-tls \
CONFIG_PACKAGE_uhttpd-mod-tls_cyassl \
- CONFIG_PACKAGE_uhttpd-mod-tls_openssl
+ CONFIG_PACKAGE_uhttpd-mod-tls_openssl \
+ CONFIG_PACKAGE_uhttpd-mod-ubus
include $(INCLUDE_DIR)/package.mk
@@ -29,7 +31,7 @@ endef
define Package/uhttpd
$(Package/uhttpd/default)
- MENU:=1
+ DEPENDS:=+libubox
endef
define Package/uhttpd/description
@@ -38,6 +40,12 @@ define Package/uhttpd/description
HTTP daemon.
endef
+define Package/uhttpd/config
+ config PACKAGE_uhttpd_debug
+ bool "Build with debug messages"
+ default n
+endef
+
define Package/uhttpd-mod-tls
$(Package/uhttpd/default)
@@ -50,17 +58,17 @@ define Package/uhttpd-mod-tls/description
endef
define Package/uhttpd-mod-tls/config
- choice
- depends on PACKAGE_uhttpd-mod-tls
- prompt "TLS Provider"
- default PACKAGE_uhttpd-mod-tls_cyassl
+ choice
+ depends on PACKAGE_uhttpd-mod-tls
+ prompt "TLS Provider"
+ default PACKAGE_uhttpd-mod-tls_cyassl
- config PACKAGE_uhttpd-mod-tls_cyassl
- bool "CyaSSL"
+ config PACKAGE_uhttpd-mod-tls_cyassl
+ bool "CyaSSL"
- config PACKAGE_uhttpd-mod-tls_openssl
- bool "OpenSSL"
- endchoice
+ config PACKAGE_uhttpd-mod-tls_openssl
+ bool "OpenSSL"
+ endchoice
endef
UHTTPD_TLS:=
@@ -91,12 +99,25 @@ define Package/uhttpd-mod-lua/description
endef
-TARGET_CFLAGS += $(TLS_CFLAGS)
-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
+define Package/uhttpd-mod-ubus
+ $(Package/uhttpd/default)
+ TITLE+= (ubus plugin)
+ DEPENDS:=uhttpd +libubus +libblobmsg-json
+endef
+
+define Package/uhttpd-mod-ubus/description
+ The ubus plugin adds a HTTP/JSON RPC proxy for ubus and publishes the
+ session.* namespace and procedures.
+endef
+
+
+TARGET_CFLAGS += $(TLS_CFLAGS) $(if $(CONFIG_PACKAGE_uhttpd_debug),-DDEBUG) -ggdb3
+TARGET_LDFLAGS += -lubox -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
MAKE_VARS += \
FPIC="$(FPIC)" \
LUA_SUPPORT="$(if $(CONFIG_PACKAGE_uhttpd-mod-lua),1)" \
TLS_SUPPORT="$(if $(CONFIG_PACKAGE_uhttpd-mod-tls),1)" \
+ UBUS_SUPPORT="$(if $(CONFIG_PACKAGE_uhttpd-mod-ubus),1)" \
UHTTPD_TLS="$(UHTTPD_TLS)" \
TLS_CFLAGS="$(TLS_CFLAGS)" \
TLS_LDFLAGS="$(TLS_LDFLAGS)"
@@ -131,7 +152,13 @@ define Package/uhttpd-mod-lua/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_lua.so $(1)/usr/lib/
endef
+define Package/uhttpd-mod-ubus/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_ubus.so $(1)/usr/lib/
+endef
+
$(eval $(call BuildPackage,uhttpd))
$(eval $(call BuildPackage,uhttpd-mod-tls))
$(eval $(call BuildPackage,uhttpd-mod-lua))
+$(eval $(call BuildPackage,uhttpd-mod-ubus))