diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2017-03-26 15:17:06 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2017-05-16 16:57:01 +0200 |
commit | 324ec18615c496049653a03fdd25e8c0507e65cc (patch) | |
tree | 59d66a6837b340bd75e9f01637a994e254c259b7 /package/network/services/uhttpd/Makefile | |
parent | a131b892ea4abc08b7ec75d047f22f1716f74209 (diff) | |
download | mtk-20170518-324ec18615c496049653a03fdd25e8c0507e65cc.zip mtk-20170518-324ec18615c496049653a03fdd25e8c0507e65cc.tar.gz mtk-20170518-324ec18615c496049653a03fdd25e8c0507e65cc.tar.bz2 |
uhttpd: Enable integrated Lua by default
We enabled lua interpreter by default as it doesn't make any problem in the uhttpd config file and we modify the index page to use it.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Diffstat (limited to 'package/network/services/uhttpd/Makefile')
-rw-r--r-- | package/network/services/uhttpd/Makefile | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index 39e8894..3d483b6 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uhttpd -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/uhttpd.git @@ -46,9 +46,12 @@ define Package/uhttpd/config config PACKAGE_uhttpd_debug bool "Build with debug messages" default n + config uhttpd_lua + depends on PACKAGE_uhttpd-mod-lua + bool "Enable Integrated Lua interpreter" + default y endef - define Package/uhttpd-mod-lua $(Package/uhttpd/default) TITLE+= (Lua plugin) @@ -106,6 +109,16 @@ define Package/uhttpd-mod-ubus/install $(INSTALL_DATA) ./files/ubus.default $(1)/etc/uci-defaults/00_uhttpd_ubus endef +define Package/uhttpd-mod-lua/postinst + $(if $(CONFIG_uhttpd_lua), + #!/bin/sh + if [ -f $${IPKG_INSTROOT}/www/index.html ] + then + sed -e 's:/cgi-bin::g' -i $${IPKG_INSTROOT}/www/index.html + fi + ,) +endef + $(eval $(call BuildPackage,uhttpd)) $(eval $(call BuildPackage,uhttpd-mod-lua)) |