2 # Copyright (C) 2010-2015 Jo-Philipp Wich <jo@mein.io>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE_URL
=$(PROJECT_GIT
)/project
/uhttpd.git
15 PKG_SOURCE_DATE
:=2023-01-28
16 PKG_SOURCE_VERSION
:=47561aa13574068403d48f13ea310f8511057b2b
17 PKG_MIRROR_HASH
:=84500cf0c8224fe80b5717c9b6bad8ac13f44f286e3a88e8b12adfcf02e22c7c
18 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
21 PKG_ASLR_PIE_REGULAR
:=1
22 PKG_BUILD_DEPENDS
= ustream-ssl
23 PKG_CONFIG_DEPENDS
:= CONFIG_uhttpd_lua CONFIG_uhttpd_ucode
25 include $(INCLUDE_DIR
)/package.mk
26 include $(INCLUDE_DIR
)/cmake.mk
27 include $(INCLUDE_DIR
)/version.mk
29 define Package
/uhttpd
/default
32 SUBMENU
:=Web Servers
/Proxies
33 TITLE
:=uHTTPd
- tiny
, single threaded HTTP server
37 $(Package
/uhttpd
/default
)
38 DEPENDS
:=+libubox
+libblobmsg-json
+libjson-script
+libjson-c
41 define Package
/uhttpd
/description
42 uHTTPd is a tiny single threaded HTTP server with TLS
, CGI and Lua
43 support. It is intended
as a drop-in replacement for the Busybox
47 define Package
/uhttpd
/config
49 depends on PACKAGE_uhttpd-mod-lua
50 bool
"Enable Integrated Lua interpreter"
54 depends on PACKAGE_uhttpd-mod-ucode
55 bool
"Enable Integrated ucode interpreter"
59 define Package
/uhttpd
/conffiles
66 define Package
/uhttpd-mod-lua
67 $(Package
/uhttpd
/default
)
69 DEPENDS
:=uhttpd
+liblua
72 define Package
/uhttpd-mod-lua
/description
73 The Lua plugin adds a CGI-like Lua runtime interface to uHTTPd.
77 define Package
/uhttpd-mod-ubus
78 $(Package
/uhttpd
/default
)
80 DEPENDS
:=uhttpd
+libubus
+libblobmsg-json
83 define Package
/uhttpd-mod-ubus
/description
84 The ubus plugin adds a HTTP
/JSON RPC proxy for ubus and publishes the
85 session.
* namespace and procedures.
89 define Package
/uhttpd-mod-ucode
90 $(Package
/uhttpd
/default
)
91 TITLE
+= (ucode plugin
)
92 DEPENDS
:=uhttpd
+libucode
95 define Package
/uhttpd-mod-ucode
/description
96 The ucode plugin adds a CGI-like ucode runtime interface to uHTTPd.
100 ifneq ($(CONFIG_USE_GLIBC
),)
101 TARGET_CFLAGS
+= -D_DEFAULT_SOURCE
104 TARGET_LDFLAGS
+= -lcrypt
106 CMAKE_OPTIONS
+= -DTLS_SUPPORT
=on
108 define Package
/uhttpd
/install
109 $(INSTALL_DIR
) $(1)/etc
/init.d
110 $(INSTALL_BIN
) .
/files
/uhttpd.init
$(1)/etc
/init.d
/uhttpd
111 $(INSTALL_DIR
) $(1)/etc
/config
112 $(INSTALL_CONF
) .
/files
/uhttpd.config
$(1)/etc
/config
/uhttpd
113 $(VERSION_SED_SCRIPT
) $(1)/etc
/config
/uhttpd
114 $(INSTALL_DIR
) $(1)/usr
/sbin
115 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd
$(1)/usr
/sbin
/uhttpd
118 define Package
/uhttpd-mod-lua
/install
119 $(INSTALL_DIR
) $(1)/usr
/lib
120 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_lua.so
$(1)/usr
/lib
/
123 define Package
/uhttpd-mod-ubus
/install
124 $(INSTALL_DIR
) $(1)/usr
/lib
$(1)/etc
/uci-defaults
125 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_ubus.so
$(1)/usr
/lib
/
126 $(INSTALL_DATA
) .
/files
/ubus.default
$(1)/etc
/uci-defaults
/00_uhttpd_ubus
129 define Package
/uhttpd-mod-ucode
/install
130 $(INSTALL_DIR
) $(1)/usr
/lib
131 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uhttpd_ucode.so
$(1)/usr
/lib
/
135 $(eval
$(call BuildPackage
,uhttpd
))
136 $(eval
$(call BuildPackage
,uhttpd-mod-lua
))
137 $(eval
$(call BuildPackage
,uhttpd-mod-ubus
))
138 $(eval
$(call BuildPackage
,uhttpd-mod-ucode
))