summaryrefslogtreecommitdiffstats
path: root/package/php/php.mk
diff options
context:
space:
mode:
authorFloris Bos <bos@je-eigen-domein.nl>2015-05-01 20:12:33 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-05-02 09:44:10 +0200
commit8eeb14578679f956e7902b0dd0d0c41336ca39f9 (patch)
tree6cd2716091b0205bb81c417ace3c422ac4e5d11c /package/php/php.mk
parente3526c15194eab9b3ef8d7ce3dc032a1290658fa (diff)
downloadbuildroot-8eeb14578679f956e7902b0dd0d0c41336ca39f9.tar.gz
buildroot-8eeb14578679f956e7902b0dd0d0c41336ca39f9.zip
php: fpm sapi: install startup script
Install the startup script if using the FastCGI Process Manager. Signed-off-by: Floris Bos <bos@je-eigen-domein.nl> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/php/php.mk')
-rw-r--r--package/php/php.mk15
1 files changed, 15 insertions, 0 deletions
diff --git a/package/php/php.mk b/package/php/php.mk
index e4331f2c16..4c65c35f71 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -251,6 +251,21 @@ PHP_CONF_OPTS += \
PHP_DEPENDENCIES += jpeg libpng freetype
endif
+ifeq ($(BR2_PACKAGE_PHP_FPM),y)
+define PHP_INSTALL_INIT_SYSV
+ $(INSTALL) -D -m 0755 $(@D)/sapi/fpm/init.d.php-fpm \
+ $(TARGET_DIR)/etc/init.d/S49php-fpm
+endef
+
+define PHP_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 0644 $(@D)/sapi/fpm/php-fpm.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/php-fpm.service
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+ ln -fs ../../../../usr/lib/systemd/system/php-fpm.service \
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/php-fpm.service
+endef
+endif
+
define PHP_EXTENSIONS_FIXUP
$(SED) "/prefix/ s:/usr:$(STAGING_DIR)/usr:" \
$(STAGING_DIR)/usr/bin/phpize
OpenPOWER on IntegriCloud