$NetBSD: patch-makefile,v 1.1 2020/03/09 19:37:20 khorben Exp $ Fix installation directories and scripts --- makefile.orig 2020-01-02 09:49:37.000000000 +0000 +++ makefile @@ -3,10 +3,11 @@ include config.unix BIN = $(DESTDIR)$(PREFIX)/bin CONFIG = $(DESTDIR)$(SYSCONFDIR) +EGDIR = $(DESTDIR)@EGDIR@ MODULES = $(DESTDIR)$(LIBDIR)/prosody/modules SOURCE = $(DESTDIR)$(LIBDIR)/prosody DATA = $(DESTDIR)$(DATADIR) -MAN = $(DESTDIR)$(PREFIX)/share/man +MAN = $(DESTDIR)$(PREFIX)/$(PKGMANDIR) INSTALLEDSOURCE = $(LIBDIR)/prosody INSTALLEDCONFIG = $(SYSCONFDIR) @@ -28,37 +29,52 @@ all: prosody.install prosodyctl.install .endif install: prosody.install prosodyctl.install prosody.cfg.lua.install util/encodings.so util/encodings.so util/pposix.so util/signal.so - $(MKDIR) $(BIN) $(CONFIG) $(MODULES) $(SOURCE) - $(MKDIR_PRIVATE) $(DATA) - $(MKDIR) $(MAN)/man1 - $(MKDIR) $(CONFIG)/certs - $(MKDIR) $(SOURCE)/core $(SOURCE)/net $(SOURCE)/util - $(INSTALL_EXEC) ./prosody.install $(BIN)/prosody - $(INSTALL_EXEC) ./prosodyctl.install $(BIN)/prosodyctl - $(INSTALL_DATA) core/*.lua $(SOURCE)/core - $(INSTALL_DATA) net/*.lua $(SOURCE)/net - $(MKDIR) $(SOURCE)/net/http $(SOURCE)/net/resolvers $(SOURCE)/net/websocket - $(INSTALL_DATA) net/http/*.lua $(SOURCE)/net/http - $(INSTALL_DATA) net/resolvers/*.lua $(SOURCE)/net/resolvers - $(INSTALL_DATA) net/websocket/*.lua $(SOURCE)/net/websocket - $(INSTALL_DATA) util/*.lua $(SOURCE)/util - $(INSTALL_DATA) util/*.so $(SOURCE)/util - $(MKDIR) $(SOURCE)/util/sasl - $(INSTALL_DATA) util/sasl/*.lua $(SOURCE)/util/sasl - $(MKDIR) $(MODULES)/mod_s2s $(MODULES)/mod_pubsub $(MODULES)/adhoc $(MODULES)/muc $(MODULES)/mod_mam - $(INSTALL_DATA) plugins/*.lua $(MODULES) - $(INSTALL_DATA) plugins/mod_s2s/*.lua $(MODULES)/mod_s2s - $(INSTALL_DATA) plugins/mod_pubsub/*.lua $(MODULES)/mod_pubsub - $(INSTALL_DATA) plugins/adhoc/*.lua $(MODULES)/adhoc - $(INSTALL_DATA) plugins/muc/*.lua $(MODULES)/muc - $(INSTALL_DATA) plugins/mod_mam/*.lua $(MODULES)/mod_mam + $(BSD_INSTALL_SCRIPT_DIR) $(BIN) + $(BSD_INSTALL_DATA_DIR) $(EGDIR) + $(BSD_INSTALL_DATA_DIR) $(MODULES) + $(BSD_INSTALL_DATA_DIR) $(SOURCE) + $(BSD_INSTALL_DATA_DIR) -m 750 $(DATA) + $(BSD_INSTALL_MAN_DIR) $(MAN)/man1 + $(BSD_INSTALL_SCRIPT) ./prosody.install $(BIN)/prosody + $(BSD_INSTALL_SCRIPT) ./prosodyctl.install $(BIN)/prosodyctl + $(BSD_INSTALL_LIB_DIR) $(SOURCE)/core + $(BSD_INSTALL_DATA) core/*.lua $(SOURCE)/core + $(BSD_INSTALL_LIB_DIR) $(SOURCE)/net + $(BSD_INSTALL_DATA) net/*.lua $(SOURCE)/net + $(BSD_INSTALL_LIB_DIR) $(SOURCE)/net/http + $(BSD_INSTALL_DATA) net/http/*.lua $(SOURCE)/net/http + $(BSD_INSTALL_LIB_DIR) $(SOURCE)/net/resolvers + $(BSD_INSTALL_DATA) net/resolvers/*.lua $(SOURCE)/net/resolvers + $(BSD_INSTALL_LIB_DIR) $(SOURCE)/net/websocket + $(BSD_INSTALL_DATA) net/websocket/*.lua $(SOURCE)/net/websocket + $(BSD_INSTALL_LIB_DIR) $(SOURCE)/util + $(BSD_INSTALL_DATA) util/*.lua $(SOURCE)/util + $(BSD_INSTALL_LIB) util/*.so $(SOURCE)/util + $(BSD_INSTALL_LIB_DIR) $(SOURCE)/util/sasl + $(BSD_INSTALL_DATA) util/sasl/*.lua $(SOURCE)/util/sasl + $(BSD_INSTALL_LIB_DIR) $(MODULES) + $(BSD_INSTALL_DATA) plugins/*.lua $(MODULES) + $(BSD_INSTALL_LIB_DIR) $(MODULES)/mod_s2s + $(BSD_INSTALL_DATA) plugins/mod_s2s/*.lua $(MODULES)/mod_s2s + $(BSD_INSTALL_LIB_DIR) $(MODULES)/mod_pubsub + $(BSD_INSTALL_DATA) plugins/mod_pubsub/*.lua $(MODULES)/mod_pubsub + $(BSD_INSTALL_DATA_DIR) $(EGDIR)/certs + $(BSD_INSTALL_DATA) certs/*.cnf $(EGDIR)/certs + $(BSD_INSTALL_DATA) certs/*makefile $(EGDIR)/certs + $(BSD_INSTALL_LIB_DIR) $(MODULES)/adhoc + $(BSD_INSTALL_DATA) plugins/adhoc/*.lua $(MODULES)/adhoc + $(BSD_INSTALL_LIB_DIR) $(MODULES)/muc + $(BSD_INSTALL_DATA) plugins/muc/*.lua $(MODULES)/muc + $(BSD_INSTALL_LIB_DIR) $(MODULES)/mod_mam + $(BSD_INSTALL_DATA) plugins/mod_mam/*.lua $(MODULES)/mod_mam .if $(EXCERTS) == "yes" - $(INSTALL_DATA) certs/localhost.crt certs/localhost.key $(CONFIG)/certs - $(INSTALL_DATA) certs/example.com.crt certs/example.com.key $(CONFIG)/certs + $(BSD_INSTALL_DATA_DIR) $(EGDIR)/certs + $(BSD_INSTALL_DATA) certs/localhost.crt certs/localhost.key $(EGDIR)/certs + $(BSD_INSTALL_DATA) certs/example.com.crt certs/example.com.key $(EGDIR)/certs .endif - $(INSTALL_DATA) man/prosodyctl.man $(MAN)/man1/prosodyctl.1 - test -f $(CONFIG)/prosody.cfg.lua || $(INSTALL_DATA) prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua - -test -f prosody.version && $(INSTALL_DATA) prosody.version $(SOURCE)/prosody.version + $(BSD_INSTALL_MAN) man/prosodyctl.man $(MAN)/man1/prosodyctl.1 + test -f $(CONFIG)/prosody.cfg.lua || $(BSD_INSTALL_DATA) prosody.cfg.lua.install $(EGDIR)/prosody.cfg.lua + -test -f prosody.version && $(BSD_INSTALL_DATA) prosody.version $(SOURCE)/prosody.version $(MAKE) install -C util-src clean: