lighttpd: Add missing 'server.modules' in some config files
authorDavid Yang <redacted>
Fri, 1 Feb 2019 07:13:54 +0000 (15:13 +0800)
committerDavid Yang <redacted>
Fri, 1 Feb 2019 08:00:06 +0000 (16:00 +0800)
e.g. 20-auth.conf

Signed-off-by: David Yang <redacted>
net/lighttpd/Makefile

index 1a96b2a4bd4b515fbdc14b3ec090952a7a4dcb02..1dcecef2aeab0b29b6f1fee8f6bb32788fce67ac 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lighttpd
 PKG_VERSION:=1.4.49
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://download.lighttpd.net/lighttpd/releases-1.4.x
@@ -180,6 +180,10 @@ define BuildPlugin
        $(INSTALL_DIR) $$(1)/etc/lighttpd/conf.d
        if [ -f $(PKG_BUILD_DIR)/doc/config/conf.d/$(1).conf ]; then \
                $(CP) $(PKG_BUILD_DIR)/doc/config/conf.d/$(1).conf $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf ; \
+               if ! grep -qF 'mod_$(1)' $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf; then \
+                       sed -i "`sed '/^##/ !q' $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf | wc -l` i\
+server.modules += ( \"mod_$(1)\" )" $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf ; \
+               fi \
        else \
                echo 'server.modules += ( "mod_$(1)" )' > $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf ; \
        fi
git clone https://git.99rst.org/PROJECT