Generate start scripts in "make all", not in "make install" (#3821)

This commit is contained in:
Badlop 2022-05-20 11:24:39 +02:00
parent 75a771bfec
commit 93f994d50a
1 changed files with 16 additions and 14 deletions

View File

@ -152,7 +152,7 @@ else
endif
endif
all: deps src
all: scripts deps src
deps: $(DEPSDIR)/.got
@ -297,6 +297,18 @@ ejabberdctl.relive:
-e "s*{{epmd}}*@EPMD@*g" ejabberdctl.template \
> ejabberdctl.relive
ejabberd.init:
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
-e "s*@installuser@*$(INIT_USER)*g" ejabberd.init.template \
> ejabberd.init
chmod 755 ejabberd.init
ejabberd.service:
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
-e "s*@installuser@*$(INIT_USER)*g" ejabberd.service.template \
> ejabberd.service
chmod 644 ejabberd.service
ejabberdctl.example: vars.config
$(SED) -e "s*{{installuser}}*@INSTALLUSER@*g" \
-e "s*{{config_dir}}*${ETCDIR}*g" \
@ -308,7 +320,9 @@ ejabberdctl.example: vars.config
-e "s*{{epmd}}*@EPMD@*g" ejabberdctl.template \
> ejabberdctl.example
install: copy-files ejabberdctl.example
scripts: ejabberd.init ejabberd.service ejabberdctl.example
install: copy-files
#
# Configuration files
$(INSTALL) -d -m 750 $(G_USER) $(DESTDIR)$(ETCDIR)
@ -329,18 +343,6 @@ install: copy-files ejabberdctl.example
[ -f $(DEPSDIR)/elixir/bin/elixir ] && $(INSTALL) -m 550 $(G_USER) $(DEPSDIR)/elixir/bin/elixir $(DESTDIR)$(BINDIR)/elixir || true
[ -f $(DEPSDIR)/elixir/bin/mix ] && $(INSTALL) -m 550 $(G_USER) $(DEPSDIR)/elixir/bin/mix $(DESTDIR)$(BINDIR)/mix || true
#
# Init script
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
-e "s*@installuser@*$(INIT_USER)*g" ejabberd.init.template \
> ejabberd.init
chmod 755 ejabberd.init
#
# Service script
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
-e "s*@installuser@*$(INIT_USER)*g" ejabberd.service.template \
> ejabberd.service
chmod 644 ejabberd.service
#
# Spool directory
$(INSTALL) -d -m 750 $(O_USER) $(DESTDIR)$(SPOOLDIR)
$(CHOWN_COMMAND) -R @INSTALLUSER@ $(DESTDIR)$(SPOOLDIR) >$(CHOWN_OUTPUT)