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-12-26 12:58:47 +00:00
|
|
|
PKG_RELEASE:=1
|
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
|
2023-01-28 18:27:51 +00:00
|
|
|
PKG_SOURCE_DATE:=2023-01-28
|
|
|
|
PKG_SOURCE_VERSION:=47561aa13574068403d48f13ea310f8511057b2b
|
|
|
|
PKG_MIRROR_HASH:=84500cf0c8224fe80b5717c9b6bad8ac13f44f286e3a88e8b12adfcf02e22c7c
|
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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
2010-03-25 15:46:16 +00:00
|
|
|
define Package/uhttpd/install
|
2022-11-28 09:06:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/config $(1)/usr/sbin
|
2010-03-25 15:46:16 +00:00
|
|
|
$(INSTALL_BIN) ./files/uhttpd.init $(1)/etc/init.d/uhttpd
|
|
|
|
$(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_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd
|
|
|
|
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))
|