summaryrefslogtreecommitdiff
path: root/www/php-fpm
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2014-03-11 14:34:36 +0000
committerjperkin <jperkin@pkgsrc.org>2014-03-11 14:34:36 +0000
commit76740313a3ac624b6ff51288f485f40d39d80cb1 (patch)
tree7ee5b13abb9f96749121a307db970b8b85e953da /www/php-fpm
parent6bcea5495c4b03080e1f7cff4f0d1898590b2317 (diff)
downloadpkgsrc-76740313a3ac624b6ff51288f485f40d39d80cb1.tar.gz
Import initial SMF support for individual packages.
Diffstat (limited to 'www/php-fpm')
-rw-r--r--www/php-fpm/Makefile3
-rw-r--r--www/php-fpm/files/smf/manifest.xml30
2 files changed, 32 insertions, 1 deletions
diff --git a/www/php-fpm/Makefile b/www/php-fpm/Makefile
index 300055f1cd9..c0519aa6b99 100644
--- a/www/php-fpm/Makefile
+++ b/www/php-fpm/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2013/09/13 09:24:19 fhajny Exp $
+# $NetBSD: Makefile,v 1.10 2014/03/11 14:34:41 jperkin Exp $
PKGNAME= ${PHP_PKG_PREFIX}-fpm-${PHP_BASE_VERS}
CATEGORIES= www
@@ -34,6 +34,7 @@ CONFIGURE_ARGS+= --enable-fpm
CONFIGURE_ARGS+= --with-fpm-user=${FPM_USER}
CONFIGURE_ARGS+= --with-fpm-group=${FPM_GROUP}
+SMF_NAME= php-fpm
RCD_SCRIPTS= php_fpm
MESSAGE_SUBST+= CGIDIR=${CGIDIR:Q}
MESSAGE_SUBST+= VARBASE=${VARBASE:Q}
diff --git a/www/php-fpm/files/smf/manifest.xml b/www/php-fpm/files/smf/manifest.xml
new file mode 100644
index 00000000000..395e8f0121c
--- /dev/null
+++ b/www/php-fpm/files/smf/manifest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="@SMF_NAME@">
+ <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+ <create_default_instance enabled="false" />
+ <single_instance />
+ <dependency name="network" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/milestone/network:default" />
+ </dependency>
+ <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/system/filesystem/local" />
+ </dependency>
+ <method_context project="php"></method_context>
+ <exec_method type="method" name="start" exec="@PREFIX@/sbin/php-fpm -y %{config_file}" timeout_seconds="60" />
+ <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+ <property_group name="startd" type="framework">
+ <propval name="duration" type="astring" value="contract" />
+ <propval name="ignore_error" type="astring" value="core,signal" />
+ </property_group>
+ <property_group name="application" type="application">
+ <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/php-fpm.conf" />
+ </property_group>
+ <stability value="Evolving" />
+ <template>
+ <common_name>
+ <loctext xml:lang="C">PHP FPM Service</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>