X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=Makefile;h=606d92b07cf88c5a3e9f0e8b97c82a95fcef3c68;hb=5e2ec7a45261c0b916a95cfc3a6718984710ff0d;hp=6676fc5bfcac0321b196f05b9130a904a4b27836;hpb=1de8efd6e14f733a1cf34b6250bf540d4fa39196;p=prosody.git diff --git a/Makefile b/Makefile index 6676fc5b..606d92b0 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,7 @@ BIN = $(DESTDIR)$(PREFIX)/bin CONFIG = $(DESTDIR)$(SYSCONFDIR) MODULES = $(DESTDIR)$(PREFIX)/lib/prosody/modules SOURCE = $(DESTDIR)$(PREFIX)/lib/prosody - -DATADIR?=data +DATA = $(DESTDIR)$(DATADIR) INSTALLEDSOURCE = $(PREFIX)/lib/prosody INSTALLEDCONFIG = $(SYSCONFDIR) @@ -14,10 +13,10 @@ INSTALLEDMODULES = $(PREFIX)/lib/prosody/modules INSTALLEDDATA = $(DATADIR) all: prosody.install prosody.cfg.lua.install - $(MAKE) all -C util-src + $(MAKE) -C util-src install -install: prosody.install prosody.cfg.lua.install util/encodings.so util/encodings.so - install -d $(BIN) $(CONFIG) $(MODULES) $(SOURCE) $(DATADIR) +install: prosody.install prosody.cfg.lua.install util/encodings.so util/encodings.so util/pposix.so + install -d $(BIN) $(CONFIG) $(MODULES) $(SOURCE) $(DATA) install -d $(CONFIG)/certs install -d $(SOURCE)/core $(SOURCE)/net $(SOURCE)/util install ./prosody.install $(BIN)/prosody @@ -41,13 +40,14 @@ util/encodings.so: util/hashes.so: $(MAKE) install -C util-src +util/pposix.so: + $(MAKE) install -C util-src + prosody.install: prosody - cp prosody prosody.install - sed -i "s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|;" prosody.install - sed -i "s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|;" prosody.install - sed -i "s|^CFG_DATADIR=.*;$$|CFG_DATADIR='$(INSTALLEDDATA)';|;" prosody.install - # The trailing slash is intentional in this one - sed -i "s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" prosody.install + sed "s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \ + s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|; \ + s|^CFG_DATADIR=.*;$$|CFG_DATADIR='$(INSTALLEDDATA)';|; \ + s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" < prosody > prosody.install prosody.cfg.lua.install: sed 's|certs/|$(INSTALLEDCONFIG)/certs/|' prosody.cfg.lua.dist > prosody.cfg.lua.install