--- tools/migration/Makefile.orig 2020-01-02 09:49:37 UTC +++ tools/migration/Makefile @@ -5,7 +5,7 @@ BIN = $(DESTDIR)$(PREFIX)/bin CONFIG = $(DESTDIR)$(SYSCONFDIR) SOURCE = $(DESTDIR)$(LIBDIR)/prosody DATA = $(DESTDIR)$(DATADIR) -MAN = $(DESTDIR)$(PREFIX)/share/man +MAN = $(DESTDIR)$(PREFIX)/man INSTALLEDSOURCE = $(LIBDIR)/prosody INSTALLEDCONFIG = $(SYSCONFDIR) @@ -22,14 +22,14 @@ install: prosody-migrator.install migrator.cfg.lua.ins install -d $(SOURCE)/migrator install -m755 ./prosody-migrator.install $(BIN)/prosody-migrator install -m644 $(SOURCE_FILES) $(SOURCE)/migrator - test -e $(CONFIG)/migrator.cfg.lua || install -m644 migrator.cfg.lua.install $(CONFIG)/migrator.cfg.lua + install -m644 migrator.cfg.lua.install $(CONFIG)/migrator.cfg.lua.sample clean: rm -f prosody-migrator.install rm -f migrator.cfg.lua.install prosody-migrator.install: prosody-migrator.lua - sed "1s/\blua\b/$(RUNWITH)/; \ + sed "1s/ lua$$/ $(RUNWITH)/; \ s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \ s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|;" \ < prosody-migrator.lua > prosody-migrator.install