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
|
2023-12-27 15:20:45 +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
|
2023-06-25 18:03:42 +00:00
|
|
|
PKG_SOURCE_DATE:=2023-06-25
|
|
|
|
PKG_SOURCE_VERSION:=34a8a74dbdec3c0de38abc1b08f6a73c51263792
|
|
|
|
PKG_MIRROR_HASH:=8206885eebed5d1827763bcc5bcf9ca3510ae22b0ad1f6432114f1136c32dde2
|
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
|
|
|
|
|
2023-12-27 15:20:45 +00:00
|
|
|
define Package/uhttpd-mod-ubus/postinst
|
|
|
|
#!/bin/sh
|
|
|
|
if [ -z "$${IPKG_INSTROOT}" ]; then
|
|
|
|
/etc/init.d/uhttpd reload
|
|
|
|
fi
|
|
|
|
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))
|