# HG changeset patch # User Kim Alvefur # Date 1424511296 -3600 # Node ID b7796a46aec24a58b0f154a5c9cc9388d03a4fec # Parent 70e65ac6521948eaee45ef289a4dda4d8997b507# Parent bdaadf70a48f865ef6a2f7c9d07290846cd99068 Merge 0.9->0.10 diff -r 70e65ac65219 -r b7796a46aec2 Makefile --- a/Makefile Thu Feb 05 17:23:53 2015 +0100 +++ b/Makefile Sat Feb 21 10:34:56 2015 +0100 @@ -3,14 +3,14 @@ BIN = $(DESTDIR)$(PREFIX)/bin CONFIG = $(DESTDIR)$(SYSCONFDIR) -MODULES = $(DESTDIR)$(PREFIX)/lib/prosody/modules -SOURCE = $(DESTDIR)$(PREFIX)/lib/prosody +MODULES = $(DESTDIR)$(LIBDIR)/prosody/modules +SOURCE = $(DESTDIR)$(LIBDIR)/prosody DATA = $(DESTDIR)$(DATADIR) MAN = $(DESTDIR)$(PREFIX)/share/man -INSTALLEDSOURCE = $(PREFIX)/lib/prosody +INSTALLEDSOURCE = $(LIBDIR)/prosody INSTALLEDCONFIG = $(SYSCONFDIR) -INSTALLEDMODULES = $(PREFIX)/lib/prosody/modules +INSTALLEDMODULES = $(LIBDIR)/prosody/modules INSTALLEDDATA = $(DATADIR) .PHONY: all clean install diff -r 70e65ac65219 -r b7796a46aec2 configure --- a/configure Thu Feb 05 17:23:53 2015 +0100 +++ b/configure Sat Feb 21 10:34:56 2015 +0100 @@ -4,6 +4,7 @@ PREFIX=/usr/local SYSCONFDIR="$PREFIX/etc/prosody" +LIBDIR="$PREFIX/lib" DATADIR="$PREFIX/var/lib/prosody" LUA_SUFFIX="" LUA_DIR="/usr" @@ -36,6 +37,8 @@ Default is $PREFIX --sysconfdir=DIR Location where the config file should be installed. Default is \$PREFIX/etc/prosody +--libdir=DIR Location where the server files should be stored. + Default is \$PREFIX/lib --datadir=DIR Location where the server data should be stored. Default is \$PREFIX/var/lib/prosody --lua-suffix=SUFFIX Versioning suffix to use in Lua filenames. @@ -133,6 +136,9 @@ LUA_INCDIR="/usr/local/include"; fi ;; + --libdir=*) + LIBDIR="$value" + ;; --datadir=*) DATADIR="$value" DATADIR_SET=yes @@ -337,6 +343,7 @@ PREFIX=$PREFIX SYSCONFDIR=$SYSCONFDIR +LIBDIR=$LIBDIR DATADIR=$DATADIR LUA_SUFFIX=$LUA_SUFFIX LUA_DIR=$LUA_DIR diff -r 70e65ac65219 -r b7796a46aec2 tools/migration/Makefile --- a/tools/migration/Makefile Thu Feb 05 17:23:53 2015 +0100 +++ b/tools/migration/Makefile Sat Feb 21 10:34:56 2015 +0100 @@ -3,13 +3,13 @@ BIN = $(DESTDIR)$(PREFIX)/bin CONFIG = $(DESTDIR)$(SYSCONFDIR) -SOURCE = $(DESTDIR)$(PREFIX)/lib/prosody +SOURCE = $(DESTDIR)$(LIBDIR)/prosody DATA = $(DESTDIR)$(DATADIR) MAN = $(DESTDIR)$(PREFIX)/share/man -INSTALLEDSOURCE = $(PREFIX)/lib/prosody +INSTALLEDSOURCE = $(LIBDIR)/prosody INSTALLEDCONFIG = $(SYSCONFDIR) -INSTALLEDMODULES = $(PREFIX)/lib/prosody/modules +INSTALLEDMODULES = $(LIBDIR)/prosody/modules INSTALLEDDATA = $(DATADIR) SOURCE_FILES = migrator/*.lua diff -r 70e65ac65219 -r b7796a46aec2 util/datamanager.lua --- a/util/datamanager.lua Thu Feb 05 17:23:53 2015 +0100 +++ b/util/datamanager.lua Sat Feb 21 10:34:56 2015 +0100 @@ -163,7 +163,7 @@ return nil, msg; end -if prosody.platform ~= "posix" then +if prosody and prosody.platform ~= "posix" then -- os.rename does not overwrite existing files on Windows -- TODO We could use Transactional NTFS on Vista and above function atomic_store(filename, data)