util.filters: Fix inserting items so that higher priority filters run first
[prosody.git] / Makefile
index 356563f22c6c8afcd75cc7da0605ce65a6879bb8..b96b6732cda003320a38162cbf164ed5b3f8ee28 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,9 @@ install: prosody.install prosodyctl.install prosody.cfg.lua.install util/encodin
        install -m755 ./prosody.install $(BIN)/prosody
        install -m755 ./prosodyctl.install $(BIN)/prosodyctl
        install -m644 core/* $(SOURCE)/core
-       install -m644 net/* $(SOURCE)/net
+       install -m644 net/*.lua $(SOURCE)/net
+       install -d $(SOURCE)/net/http
+       install -m644 net/http/*.lua $(SOURCE)/net/http
        install -m644 util/*.lua $(SOURCE)/util
        install -m644 util/*.so $(SOURCE)/util
        install -d $(SOURCE)/util/sasl
@@ -36,7 +38,7 @@ install: prosody.install prosodyctl.install prosody.cfg.lua.install util/encodin
        install -m644 certs/* $(CONFIG)/certs
        install -m644 man/prosodyctl.man $(MAN)/man1/prosodyctl.1
        test -e $(CONFIG)/prosody.cfg.lua || install -m644 prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua
-       test -e prosody.version && install prosody.version $(SOURCE)/prosody.version || true
+       test -e prosody.version && install -m644 prosody.version $(SOURCE)/prosody.version || true
        $(MAKE) install -C util-src
 
 clean:
@@ -50,7 +52,8 @@ util/%.so:
        $(MAKE) install -C util-src
 
 %.install: %
-       sed "s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \
+       sed "1s/\blua\b/$(RUNWITH)/; \
+               s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \
                s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|; \
                s|^CFG_DATADIR=.*;$$|CFG_DATADIR='$(INSTALLEDDATA)';|; \
                s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" < $^ > $@