diff options
author | fhajny <fhajny@pkgsrc.org> | 2018-01-22 15:50:37 +0000 |
---|---|---|
committer | fhajny <fhajny@pkgsrc.org> | 2018-01-22 15:50:37 +0000 |
commit | efc81292ee568103ef80c3d90536d23adbce4ae0 (patch) | |
tree | 60290a451d68cfd012fec303b7b29a7a0b3408ec /mail/clamsmtp | |
parent | 83522cc796a41a681cc42f50e630b7ef0b04f9c3 (diff) | |
download | pkgsrc-efc81292ee568103ef80c3d90536d23adbce4ae0.tar.gz |
mail/clamsmtp: Add SMF support. Make sure $CLAMAV_USER exists,
since it's referenced in init scripts. Bump PKGREVISION.
Diffstat (limited to 'mail/clamsmtp')
-rw-r--r-- | mail/clamsmtp/Makefile | 8 | ||||
-rw-r--r-- | mail/clamsmtp/files/smf/manifest.xml | 42 |
2 files changed, 48 insertions, 2 deletions
diff --git a/mail/clamsmtp/Makefile b/mail/clamsmtp/Makefile index f7aabc261d9..f355f120955 100644 --- a/mail/clamsmtp/Makefile +++ b/mail/clamsmtp/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.46 2016/12/01 18:34:57 nros Exp $ +# $NetBSD: Makefile,v 1.47 2018/01/22 15:50:37 fhajny Exp $ DISTNAME= clamsmtp-1.10 -#PKGREVISION= 1 +PKGREVISION= 1 CATEGORIES= mail MASTER_SITES= http://thewalter.net/stef/software/clamsmtp/ @@ -15,6 +15,7 @@ RCD_SCRIPTS= clamsmtpd MESSAGE_SUBST+= HOMEPAGE=${HOMEPAGE:Q} FILES_SUBST+= CLAMAV_USER=${CLAMAV_USER} +FILES_SUBST+= CLAMAV_GROUP=${CLAMAV_GROUP} # Doesn't work with GNU pth (missing required mutex features) PTHREAD_OPTS+= require native @@ -26,6 +27,9 @@ CONF_FILES= ${EGDIR}/clamsmtpd.conf \ INSTALLATION_DIRS= share/examples/${PKGBASE} PKG_USERS_VARS= CLAMAV_USER +PKG_GROUPS_VARS= CLAMAV_GROUP +PKG_GROUPS+= ${CLAMAV_GROUP} +PKG_USERS+= ${CLAMAV_USER}:${CLAMAV_GROUP} CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} diff --git a/mail/clamsmtp/files/smf/manifest.xml b/mail/clamsmtp/files/smf/manifest.xml new file mode 100644 index 00000000000..9a7cab003dd --- /dev/null +++ b/mail/clamsmtp/files/smf/manifest.xml @@ -0,0 +1,42 @@ +<?xml version='1.0'?> +<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'> +<service_bundle type='manifest' name='export'> + <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='loopback' grouping='require_all' restart_on='error' type='service'> + <service_fmri value='svc:/network/loopback:default' /> + </dependency> + <dependency name='physical' grouping='require_all' restart_on='error' type='service'> + <service_fmri value='svc:/network/physical:default' /> + </dependency> + <dependency name='name-services' grouping='require_all' restart_on='refresh' type='service'> + <service_fmri value='svc:/milestone/name-services' /> + </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_all' restart_on='refresh' type='path'> + <service_fmri value='file://@PKG_SYSCONFDIR@/clamsmtpd.conf' /> + </dependency> + <method_context working_directory='/tmp'> + <method_credential user='@CLAMAV_USER@' group='@CLAMAV_GROUP@' /> + </method_context> + <exec_method name='start' type='method' exec='@PREFIX@/sbin/clamsmtpd' timeout_seconds='60' /> + <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60' /> + <property_group name='startd' type='framework'> + <propval name='ignore_error' type='astring' value='core,signal' /> + </property_group> + <template> + <common_name> + <loctext xml:lang='C'>ClamAV SMTP filter for postfix daemon</loctext> + </common_name> + <documentation> + <manpage title='clamsmtpd' section='8' manpath='@PREFIX@/@PKGMANDIR@'/> + </documentation> + </template> + </service> +</service_bundle> |