2010-03-25 15:46:16 +00:00
|
|
|
#
|
2016-06-07 09:42:32 +00:00
|
|
|
# Copyright (C) 2010-2015 Jo-Philipp Wich <jo@mein.io>
|
2010-03-25 15:46:16 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=uhttpd
|
2022-10-16 04:55:07 +00:00
|
|
|
PKG_RELEASE:=2
|
2012-10-15 12:31:33 +00:00
|
|
|
|
|
|
|
PKG_SOURCE_PROTO:=git
|
2018-01-05 09:46:06 +00:00
|
|
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git
|
2022-08-12 19:24:26 +00:00
|
|
|
PKG_SOURCE_DATE:=2022-08-12
|
|
|
|
PKG_SOURCE_VERSION:=e3395cd90bed9b7b9fc319e79528fedcc0d947fe
|
|
|
|
PKG_MIRROR_HASH:=14e9df9f85c406b8abbb14427e5f678383782500c549d842c0481cd954fc4ea3
|
2016-06-07 06:58:31 +00:00
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
2014-11-02 12:20:54 +00:00
|
|
|
PKG_LICENSE:=ISC
|
2010-03-25 15:46:16 +00:00
|
|
|
|
2019-10-27 14:13:30 +00:00
|
|
|
PKG_ASLR_PIE_REGULAR:=1
|
2013-01-22 15:05:04 +00:00
|
|
|
PKG_BUILD_DEPENDS = ustream-ssl
|
2021-11-23 18:30:30 +00:00
|
|
|
PKG_CONFIG_DEPENDS:= CONFIG_uhttpd_lua CONFIG_uhttpd_ucode
|
2013-01-22 15:05:04 +00:00
|
|
|
|
2010-03-25 15:46:16 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2012-10-15 12:31:33 +00:00
|
|
|
include $(INCLUDE_DIR)/cmake.mk
|
2016-05-21 10:42:44 +00:00
|
|
|
include $(INCLUDE_DIR)/version.mk
|
2012-10-15 12:31:33 +00:00
|
|
|
|
2010-03-25 15:46:16 +00:00
|
|
|
define Package/uhttpd/default
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
2011-03-12 04:47:02 +00:00
|
|
|
SUBMENU:=Web Servers/Proxies
|
2010-03-25 15:46:16 +00:00
|
|
|
TITLE:=uHTTPd - tiny, single threaded HTTP server
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uhttpd
|
|
|
|
$(Package/uhttpd/default)
|
2019-06-20 16:07:49 +00:00
|
|
|
DEPENDS:=+libubox +libblobmsg-json +libjson-script +libjson-c
|
2010-03-25 15:46:16 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uhttpd/description
|
|
|
|
uHTTPd is a tiny single threaded HTTP server with TLS, CGI and Lua
|
|
|
|
support. It is intended as a drop-in replacement for the Busybox
|
|
|
|
HTTP daemon.
|
|
|
|
endef
|
|
|
|
|
2012-05-28 00:52:24 +00:00
|
|
|
define Package/uhttpd/config
|
2017-03-26 13:17:06 +00:00
|
|
|
config uhttpd_lua
|
|
|
|
depends on PACKAGE_uhttpd-mod-lua
|
|
|
|
bool "Enable Integrated Lua interpreter"
|
|
|
|
default y
|
2021-11-23 18:30:30 +00:00
|
|
|
|
|
|
|
config uhttpd_ucode
|
|
|
|
depends on PACKAGE_uhttpd-mod-ucode
|
|
|
|
bool "Enable Integrated ucode interpreter"
|
|
|
|
default y
|
2012-05-28 00:52:24 +00:00
|
|
|
endef
|
|
|
|
|
2021-11-23 18:30:30 +00:00
|
|
|
define Package/uhttpd/conffiles
|
|
|
|
/etc/config/uhttpd
|
|
|
|
/etc/uhttpd.crt
|
|
|
|
/etc/uhttpd.key
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
2010-03-25 15:46:16 +00:00
|
|
|
define Package/uhttpd-mod-lua
|
|
|
|
$(Package/uhttpd/default)
|
|
|
|
TITLE+= (Lua plugin)
|
|
|
|
DEPENDS:=uhttpd +liblua
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uhttpd-mod-lua/description
|
|
|
|
The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
2012-05-28 00:52:24 +00:00
|
|
|
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
|
|
|
|
|
2021-11-23 18:30:30 +00:00
|
|
|
|
|
|
|
define Package/uhttpd-mod-ucode
|
|
|
|
$(Package/uhttpd/default)
|
|
|
|
TITLE+= (ucode plugin)
|
|
|
|
DEPENDS:=uhttpd +libucode
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uhttpd-mod-ucode/description
|
|
|
|
The ucode plugin adds a CGI-like ucode runtime interface to uHTTPd.
|
2010-03-25 15:46:16 +00:00
|
|
|
endef
|
|
|
|
|
2021-11-23 18:30:30 +00:00
|
|
|
|
2015-03-16 12:32:22 +00:00
|
|
|
ifneq ($(CONFIG_USE_GLIBC),)
|
|
|
|
TARGET_CFLAGS += -D_DEFAULT_SOURCE
|
|
|
|
endif
|
|
|
|
|
2013-01-19 18:47:09 +00:00
|
|
|
TARGET_LDFLAGS += -lcrypt
|
|
|
|
|
2021-06-06 21:24:43 +00:00
|
|
|
CMAKE_OPTIONS += -DTLS_SUPPORT=on
|
2013-01-19 18:47:09 +00:00
|
|
|
|
2010-03-25 15:46:16 +00:00
|
|
|
define Package/uhttpd/install
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/uhttpd.init $(1)/etc/init.d/uhttpd
|
|
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
|
|
$(INSTALL_CONF) ./files/uhttpd.config $(1)/etc/config/uhttpd
|
2016-05-21 10:42:44 +00:00
|
|
|
$(VERSION_SED_SCRIPT) $(1)/etc/config/uhttpd
|
2010-03-25 15:46:16 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd
|
2022-10-16 04:55:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/acme
|
|
|
|
$(INSTALL_DATA) ./files/acme.hotplug $(1)/etc/hotplug.d/acme/00-uhttpd
|
2010-03-25 15:46:16 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uhttpd-mod-lua/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_lua.so $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
2012-05-28 00:52:24 +00:00
|
|
|
define Package/uhttpd-mod-ubus/install
|
2013-11-11 12:18:58 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib $(1)/etc/uci-defaults
|
2012-05-28 00:52:24 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_ubus.so $(1)/usr/lib/
|
2013-11-11 12:18:58 +00:00
|
|
|
$(INSTALL_DATA) ./files/ubus.default $(1)/etc/uci-defaults/00_uhttpd_ubus
|
2012-05-28 00:52:24 +00:00
|
|
|
endef
|
|
|
|
|
2021-11-23 18:30:30 +00:00
|
|
|
define Package/uhttpd-mod-ucode/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd_ucode.so $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
2010-03-25 15:46:16 +00:00
|
|
|
|
|
|
|
$(eval $(call BuildPackage,uhttpd))
|
|
|
|
$(eval $(call BuildPackage,uhttpd-mod-lua))
|
2012-05-28 00:52:24 +00:00
|
|
|
$(eval $(call BuildPackage,uhttpd-mod-ubus))
|
2021-11-23 18:30:30 +00:00
|
|
|
$(eval $(call BuildPackage,uhttpd-mod-ucode))
|