summaryrefslogtreecommitdiff
path: root/chat/ejabberd
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 /chat/ejabberd
parent6bcea5495c4b03080e1f7cff4f0d1898590b2317 (diff)
downloadpkgsrc-76740313a3ac624b6ff51288f485f40d39d80cb1.tar.gz
Import initial SMF support for individual packages.
Diffstat (limited to 'chat/ejabberd')
-rw-r--r--chat/ejabberd/Makefile4
-rw-r--r--chat/ejabberd/files/smf/manifest.xml39
2 files changed, 42 insertions, 1 deletions
diff --git a/chat/ejabberd/Makefile b/chat/ejabberd/Makefile
index 96f7f68ee24..64928733804 100644
--- a/chat/ejabberd/Makefile
+++ b/chat/ejabberd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2014/03/10 11:35:07 fhajny Exp $
+# $NetBSD: Makefile,v 1.39 2014/03/11 14:34:36 jperkin Exp $
DISTNAME= ejabberd-13.12
CATEGORIES= chat
@@ -54,6 +54,8 @@ OWN_DIRS_PERMS+= ${EJABBERD_DB} ${EJABBERD_USER} ${EJABBERD_GROUP} 0770
FILES_SUBST+= DISTNAME=${DISTNAME}
FILES_SUBST+= EJABBERD_USER=${EJABBERD_USER}
+FILES_SUBST+= EJABBERD_GROUP=${EJABBERD_GROUP}
+FILES_SUBST+= EJABBERD_DB=${EJABBERD_DB}
PLIST_SUBST+= DISTNAME=${DISTNAME}
PLIST_SUBST+= EJABBERD_EXDIR=${EJABBERD_EXDIR}
diff --git a/chat/ejabberd/files/smf/manifest.xml b/chat/ejabberd/files/smf/manifest.xml
new file mode 100644
index 00000000000..e14a37c4c17
--- /dev/null
+++ b/chat/ejabberd/files/smf/manifest.xml
@@ -0,0 +1,39 @@
+<?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='fs-local' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/filesystem/local' />
+ </dependency>
+ <dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/network/service' />
+ </dependency>
+ <dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/system-log' />
+ </dependency>
+ <dependency name='config-files' grouping='require_any' restart_on='refresh' type='path'>
+ <service_fmri value='file://localhost@PKG_SYSCONFDIR@/ejabberd.cfg' />
+ <service_fmri value='file://localhost@PKG_SYSCONFDIR@/ejabberctl.cfg' />
+ <service_fmri value='file://localhost@PKG_SYSCONFDIR@/inetrc' />
+ </dependency>
+ <dependency name='@SMF_NAME@-epmd' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/@SMF_PREFIX@/epmd' />
+ </dependency>
+ <method_context working_directory='@EJABBERD_DB@'>
+ <method_credential user='@EJABBERD_USER@' group='@EJABBERD_GROUP@' />
+ </method_context>
+ <exec_method name='start' type='method' exec='@PREFIX@/sbin/ejabberdctl start' timeout_seconds='120' />
+ <exec_method name='stop' type='method' exec='@PREFIX@/sbin/ejabberdctl stop' timeout_seconds='60' />
+ <property_group name='startd' type='framework'>
+ <propval name='ignore_error' type='astring' value='core,signal' />
+ </property_group>
+ <stability value='Unstable' />
+ <template>
+ <common_name>
+ <loctext xml:lang='C'>ejabberd - the Erlang Jabber/XMPP daemon</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>