Add an SMF manifest entry for clamav-milter.diff -r1.4 -r1.5 pkgsrc/security/clamav/options.mk
(jperkin)
@@ -1,30 +1,31 @@ | @@ -1,30 +1,31 @@ | |||
1 | # $NetBSD: options.mk,v 1.4 2015/12/11 16:31:06 adam Exp $ | 1 | # $NetBSD: options.mk,v 1.5 2016/02/01 12:45:38 jperkin Exp $ | |
2 | 2 | |||
3 | PKG_OPTIONS_VAR= PKG_OPTIONS.clamav | 3 | PKG_OPTIONS_VAR= PKG_OPTIONS.clamav | |
4 | PKG_SUPPORTED_OPTIONS= milter clamav-experimental unit-test | 4 | PKG_SUPPORTED_OPTIONS= milter clamav-experimental unit-test | |
5 | 5 | |||
6 | .include "../../mk/bsd.options.mk" | 6 | .include "../../mk/bsd.options.mk" | |
7 | 7 | |||
8 | PLIST_VARS+= milter | 8 | PLIST_VARS+= milter | |
9 | 9 | |||
10 | .if !empty(PKG_OPTIONS:Mmilter) | 10 | .if !empty(PKG_OPTIONS:Mmilter) | |
11 | # force use of pkgsrc version of libmilter -- clamav uses the sendmail binary | 11 | # force use of pkgsrc version of libmilter -- clamav uses the sendmail binary | |
12 | # to check API compatibility(!), so it must build with as new a version of | 12 | # to check API compatibility(!), so it must build with as new a version of | |
13 | # libmilter as pkgsrc is capable of providing | 13 | # libmilter as pkgsrc is capable of providing | |
14 | USE_BUILTIN.libmilter= no | 14 | USE_BUILTIN.libmilter= no | |
15 | . include "../../mail/libmilter/buildlink3.mk" | 15 | . include "../../mail/libmilter/buildlink3.mk" | |
16 | CONFIGURE_ARGS+= --enable-milter | 16 | CONFIGURE_ARGS+= --enable-milter | |
17 | PLIST.milter= yes | 17 | PLIST.milter= yes | |
18 | SMF_INSTANCES+= clamav-milter | |||
18 | .else | 19 | .else | |
19 | CONFIGURE_ARGS+= --disable-milter | 20 | CONFIGURE_ARGS+= --disable-milter | |
20 | # XXX --disable-milter doesn't work as expected, so we need this | 21 | # XXX --disable-milter doesn't work as expected, so we need this | |
21 | CONFIGURE_ENV+= ac_cv_header_libmilter_mfapi_h=no | 22 | CONFIGURE_ENV+= ac_cv_header_libmilter_mfapi_h=no | |
22 | .endif | 23 | .endif | |
23 | 24 | |||
24 | .if !empty(PKG_OPTIONS:Mclamav-experimental) | 25 | .if !empty(PKG_OPTIONS:Mclamav-experimental) | |
25 | CONFIGURE_ARGS+= --enable-experimental | 26 | CONFIGURE_ARGS+= --enable-experimental | |
26 | .endif | 27 | .endif | |
27 | 28 | |||
28 | # Enable unit test | 29 | # Enable unit test | |
29 | .if !empty(PKG_OPTIONS:Munit-test) | 30 | .if !empty(PKG_OPTIONS:Munit-test) | |
30 | CONFIGURE_ARGS+= --enable-check | 31 | CONFIGURE_ARGS+= --enable-check |
@@ -42,16 +42,31 @@ | @@ -42,16 +42,31 @@ | |||
42 | </dependency> | 42 | </dependency> | |
43 | <exec_method name='start' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.freshclamd@ start' timeout_seconds='0'/> | 43 | <exec_method name='start' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.freshclamd@ start' timeout_seconds='0'/> | |
44 | <exec_method name='stop' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.freshclamd@ stop' timeout_seconds='0'/> | 44 | <exec_method name='stop' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.freshclamd@ stop' timeout_seconds='0'/> | |
45 | <exec_method name='refresh' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.freshclamd@ refresh' timeout_seconds='0'/> | 45 | <exec_method name='refresh' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.freshclamd@ refresh' timeout_seconds='0'/> | |
46 | <template> | 46 | <template> | |
47 | <common_name> | 47 | <common_name> | |
48 | <loctext xml:lang='C'>ClamAV anti-virus database update daemon</loctext> | 48 | <loctext xml:lang='C'>ClamAV anti-virus database update daemon</loctext> | |
49 | </common_name> | 49 | </common_name> | |
50 | <documentation> | 50 | <documentation> | |
51 | <manpage title='freshclam' section='1' manpath='man'/> | 51 | <manpage title='freshclam' section='1' manpath='man'/> | |
52 | </documentation> | 52 | </documentation> | |
53 | </template> | 53 | </template> | |
54 | </instance> | 54 | </instance> | |
55 | <instance name='clamav-milter' enabled='false'> | |||
56 | <dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'> | |||
57 | <service_fmri value='file://localhost@PKG_SYSCONFDIR@/clamav-milter.conf'/> | |||
58 | </dependency> | |||
59 | <exec_method name='start' type='method' exec='@PREFIX@/sbin/clamav-milter' timeout_seconds='60'/> | |||
60 | <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/> | |||
61 | <template> | |||
62 | <common_name> | |||
63 | <loctext xml:lang='C'>ClamAV anti-virus sendmail filter</loctext> | |||
64 | </common_name> | |||
65 | <documentation> | |||
66 | <manpage title='clamav-milter' section='8' manpath='man'/> | |||
67 | </documentation> | |||
68 | </template> | |||
69 | </instance> | |||
55 | <stability value='Unstable'/> | 70 | <stability value='Unstable'/> | |
56 | </service> | 71 | </service> | |
57 | </service_bundle> | 72 | </service_bundle> |