summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorAlexander Dahl <ada@thorsis.com>2017-08-28 20:08:18 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2017-09-04 15:04:24 +0200
commite7f80eb3b6c47750699fdb59350fe2b6f5577d8d (patch)
treed026c73fe5d0a2775c8ee4edddcaa6db108cce33 /rules
parente7d1bece2b369f3975003cd437bb8fa34808e76b (diff)
downloadptxdist-e7f80eb3b6c47750699fdb59350fe2b6f5577d8d.tar.gz
ptxdist-e7f80eb3b6c47750699fdb59350fe2b6f5577d8d.tar.xz
lighttpd: Install mime.conf and remove hardcoded values
As suggested on the mailing list back in late 2016 this removes the hardcoded mimetype values from lighttpd.conf and installs mime.conf provided by upstream instead. You can still have your own mime.conf by putting it in projectroot/etc/lighttpd/conf.d of course. Suggested-by: Clemens Gruber <clemens.gruber@pqgruber.com> Suggested-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Alexander Dahl <ada@thorsis.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules')
-rw-r--r--rules/lighttpd.make12
1 files changed, 12 insertions, 0 deletions
diff --git a/rules/lighttpd.make b/rules/lighttpd.make
index 8b522670a..5d1123ee9 100644
--- a/rules/lighttpd.make
+++ b/rules/lighttpd.make
@@ -64,6 +64,16 @@ LIGHTTPD_CONF_OPT := \
--$(call ptx/wwo, PTXCONF_LIGHTTPD_LUA)-lua
# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+$(STATEDIR)/lighttpd.install:
+ @$(call targetinfo)
+ @$(call world/install, LIGHTTPD)
+ @install -vD -m 0644 "$(LIGHTTPD_DIR)/doc/config/conf.d/mime.conf" \
+ "$(LIGHTTPD_PKGDIR)/etc/lighttpd/conf.d/mime.conf"
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------
@@ -118,6 +128,8 @@ endif
@$(call install_copy, lighttpd, 0, 0, 0755, /etc/lighttpd/conf.d)
@$(call install_replace, lighttpd, /etc/lighttpd/lighttpd.conf, \
@MODULES@, $(LIGHTTPD_MODULE_STRING))
+ @$(call install_alternative, lighttpd, 0, 0, 0644, \
+ /etc/lighttpd/conf.d/mime.conf)
ifdef PTXCONF_LIGHTTPD_MOD_FASTCGI_PHP
@$(call install_alternative, lighttpd, 0, 0, 0644, \