Tue Jun 2 15:04:27 2020 UTC ()
dspam: Add SMF manifest.

Provided by erwinlem in joyent/pkgsrc#267.


(jperkin)
diff -r1.105 -r1.106 pkgsrc/mail/dspam/Makefile
diff -r0 -r1.1 pkgsrc/mail/dspam/files/smf/manifest.xml

cvs diff -r1.105 -r1.106 pkgsrc/mail/dspam/Makefile (expand / switch to unified diff)

--- pkgsrc/mail/dspam/Makefile 2020/06/02 08:24:14 1.105
+++ pkgsrc/mail/dspam/Makefile 2020/06/02 15:04:27 1.106
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.105 2020/06/02 08:24:14 adam Exp $ 1# $NetBSD: Makefile,v 1.106 2020/06/02 15:04:27 jperkin Exp $
2 2
3DISTNAME= dspam-3.10.2 3DISTNAME= dspam-3.10.2
4PKGREVISION= 29 4PKGREVISION= 29
5CATEGORIES= mail 5CATEGORIES= mail
6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=dspam/} 6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=dspam/}
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://dspam.sourceforge.net/ 9HOMEPAGE= http://dspam.sourceforge.net/
10COMMENT= Extremely scalable, statistical-hybrid anti-spam filter 10COMMENT= Extremely scalable, statistical-hybrid anti-spam filter
11 11
12LICENSE= gnu-gpl-v2 12LICENSE= gnu-gpl-v2
13 13
14GNU_CONFIGURE= yes 14GNU_CONFIGURE= yes
@@ -101,26 +101,27 @@ CONF_FILES_PERMS+= ${EGDIR}/cgi-default. @@ -101,26 +101,27 @@ CONF_FILES_PERMS+= ${EGDIR}/cgi-default.
101CONF_FILES_PERMS+= ${EGDIR}/configure.pl ${PKG_SYSCONFDIR}/configure.pl \ 101CONF_FILES_PERMS+= ${EGDIR}/configure.pl ${PKG_SYSCONFDIR}/configure.pl \
102 ${DSPAM_WWWUSER} ${DSPAM_WWWGROUP} 0640 102 ${DSPAM_WWWUSER} ${DSPAM_WWWGROUP} 0640
103 103
104PKG_GROUPS= ${DSPAM_GROUP} 104PKG_GROUPS= ${DSPAM_GROUP}
105PKG_USERS= ${DSPAM_USER}:${DSPAM_GROUP} 105PKG_USERS= ${DSPAM_USER}:${DSPAM_GROUP}
106SPECIAL_PERMS= ${PREFIX}/bin/dspam ${DSPAM_USER} ${DSPAM_GROUP} \ 106SPECIAL_PERMS= ${PREFIX}/bin/dspam ${DSPAM_USER} ${DSPAM_GROUP} \
107 ${DSPAM_BINMODE} 107 ${DSPAM_BINMODE}
108OWN_DIRS_PERMS= ${DSPAM_HOME} ${DSPAM_USER} ${DSPAM_WWWGROUP} 0775 108OWN_DIRS_PERMS= ${DSPAM_HOME} ${DSPAM_USER} ${DSPAM_WWWGROUP} 0775
109OWN_DIRS_PERMS+= ${DSPAM_LOGDIR} ${DSPAM_USER} ${DSPAM_GROUP} 0775 109OWN_DIRS_PERMS+= ${DSPAM_LOGDIR} ${DSPAM_USER} ${DSPAM_GROUP} 0775
110OWN_DIRS_PERMS+= ${DSPAM_PIDDIR} ${DSPAM_USER} ${DSPAM_GROUP} 0770 110OWN_DIRS_PERMS+= ${DSPAM_PIDDIR} ${DSPAM_USER} ${DSPAM_GROUP} 0770
111 111
112FILES_SUBST+= DSPAM_USER=${DSPAM_USER} 112FILES_SUBST+= DSPAM_USER=${DSPAM_USER}
113FILES_SUBST+= DSPAM_GROUP=${DSPAM_GROUP} 113FILES_SUBST+= DSPAM_GROUP=${DSPAM_GROUP}
 114FILES_SUBST+= DSPAM_HOME=${DSPAM_HOME}
114FILES_SUBST+= DSPAM_PIDDIR=${DSPAM_PIDDIR} 115FILES_SUBST+= DSPAM_PIDDIR=${DSPAM_PIDDIR}
115 116
116SUBST_CLASSES+= conf 117SUBST_CLASSES+= conf
117SUBST_STAGE.conf= pre-install 118SUBST_STAGE.conf= pre-install
118SUBST_FILES.conf= src/dspam.conf.in 119SUBST_FILES.conf= src/dspam.conf.in
119SUBST_SED.conf= -e "s|@dspam_home@|${DSPAM_HOME}|g" 120SUBST_SED.conf= -e "s|@dspam_home@|${DSPAM_HOME}|g"
120SUBST_SED.conf+= -e "s|@delivery_agent@|${DSPAM_DELIVERY_AGENT_BIN}|g" 121SUBST_SED.conf+= -e "s|@delivery_agent@|${DSPAM_DELIVERY_AGENT_BIN}|g"
121SUBST_VARS.conf= PREFIX 122SUBST_VARS.conf= PREFIX
122SUBST_VARS.conf+= VARBASE 123SUBST_VARS.conf+= VARBASE
123SUBST_VARS.conf+= DSPAM_PIDDIR 124SUBST_VARS.conf+= DSPAM_PIDDIR
124SUBST_MESSAGE.conf= Fixing configuration file. 125SUBST_MESSAGE.conf= Fixing configuration file.
125 126
126post-extract: 127post-extract:

File Added: pkgsrc/mail/dspam/files/smf/manifest.xml
<?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='0'>
    <create_default_instance enabled='false'/>
    <single_instance/>
    <dependency name='fs' grouping='require_all' restart_on='none' type='service'>
      <service_fmri value='svc:/system/filesystem/local'/>
    </dependency>
    <dependency name='net' grouping='require_all' restart_on='none' type='service'>
      <service_fmri value='svc:/network/loopback'/>
    </dependency>
    <dependency name='config' grouping='require_all' restart_on='none' type='path'>
      <service_fmri value='file://@PKG_SYSCONFDIR@/dspam.conf'/>
    </dependency>
    <method_context working_directory="@DSPAM_HOME@">
      <method_credential group='@DSPAM_USER@' user='@DSPAM_GROUP@'/>
    </method_context>
    <exec_method type='method' name='start' exec='@PREFIX@/bin/dspam --daemon' timeout_seconds='120' />
    <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
    <template>
      <common_name>
        <loctext xml:lang='C'>dspam daemon</loctext>
      </common_name>
      <documentation> 
        <manpage title="dspam" section="1" manpath='@PREFIX@/@PKGMANDIR@'/> 
      </documentation> 
    </template>
  </service>
</service_bundle>