package/pkg-generic.mk: add <pkg>_INSTALL_INIT_OPENRC

* package/pkg-generic.mk
  Add <pkg>_INSTALL_INIT_OPENRC so packages can define their own steps
  to install openrc service scripts.

* docs/manual/adding-packages-generic.txt
  update documentation about new hook.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Michał Łyszczek 2019-05-12 21:55:42 +02:00 committed by Thomas Petazzoni
parent eb77734d11
commit 6d89420774
2 changed files with 9 additions and 6 deletions

View File

@ -536,12 +536,13 @@ different steps of the build process.
should utilize this step if it has binaries which would be similar should utilize this step if it has binaries which would be similar
to the kernel image, bootloader or root filesystem images. to the kernel image, bootloader or root filesystem images.
* +LIBFOO_INSTALL_INIT_SYSV+ and +LIBFOO_INSTALL_INIT_SYSTEMD+ list the * +LIBFOO_INSTALL_INIT_SYSV+, +LIBFOO_INSTALL_INIT_OPENRC+ and
actions to install init scripts either for the systemV-like init systems +LIBFOO_INSTALL_INIT_SYSTEMD+ list the actions to install init
(busybox, sysvinit, etc.) or for the systemd units. These commands scripts either for the systemV-like init systems (busybox,
will be run only when the relevant init system is installed (i.e. if sysvinit, etc.), openrc or for the systemd units. These commands
systemd is selected as the init system in the configuration, only will be run only when the relevant init system is installed (i.e.
+LIBFOO_INSTALL_INIT_SYSTEMD+ will be run). if systemd is selected as the init system in the configuration,
only +LIBFOO_INSTALL_INIT_SYSTEMD+ will be run).
* +LIBFOO_HELP_CMDS+ lists the actions to print the package help, which * +LIBFOO_HELP_CMDS+ lists the actions to print the package help, which
is included to the main +make help+ output. These commands can print is included to the main +make help+ output. These commands can print

View File

@ -337,6 +337,8 @@ $(BUILD_DIR)/%/.stamp_target_installed:
$($(PKG)_INSTALL_INIT_SYSTEMD)) $($(PKG)_INSTALL_INIT_SYSTEMD))
$(if $(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX),\ $(if $(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX),\
$($(PKG)_INSTALL_INIT_SYSV)) $($(PKG)_INSTALL_INIT_SYSV))
$(if $(BR2_INIT_OPENRC), \
$($(PKG)_INSTALL_INIT_OPENRC))
$(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep)) $(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep))
$(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \
$(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \ $(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \