blob: ce18bfcc8473a4c6c3fcdec951bbcadfed5307e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
# $NetBSD: Makefile,v 1.73 2020/11/05 09:07:06 ryoon Exp $
PKGREVISION= 1
.include "Makefile.common"
COMMENT= Anti-virus toolkit
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
USE_TOOLS+= gsed
GNU_CONFIGURE= yes
SET_LIBDIR= yes
FAKE_NCURSES= yes
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --with-dbdir=${CLAMAV_DBDIR}
CONFIGURE_ARGS+= --with-group=${CLAMAV_GROUP}
CONFIGURE_ARGS+= --with-user=${CLAMAV_USER}
CONFIGURE_ARGS+= --with-libcurl=${BUILDLINK_PREFIX.curl}
CONFIGURE_ARGS+= --with-libjson=${BUILDLINK_PREFIX.json-c}
CONFIGURE_ARGS+= --with-ltdl-include=${BUILDLINK_PREFIX.libltdl}/include
CONFIGURE_ARGS+= --with-ltdl-lib=${BUILDLINK_PREFIX.libltdl}/lib
CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl}
CONFIGURE_ARGS+= --with-pcre=${BUILDLINK_PREFIX.pcre2}
CONFIGURE_ARGS+= --with-system-libmspack=${BUILDLINK_PREFIX.libmspack}
CONFIGURE_ARGS+= --with-xml=${BUILDLINK_PREFIX.libxml2}
CONFIGURE_ARGS+= --with-zlib=${BUILDLINK_PREFIX.zlib}
# Linux only:
CONFIGURE_ARGS+= --disable-clamonacc
# Work around build failure PR pkg/54420
CONFIGURE_ARGS+= --disable-unrar
CONFIGURE_ENV.SunOS+= ac_cv_ld_version_script=no
CHECK_PORTABILITY_SKIP= contrib/* unit_tests/* win32/*
.include "../../mk/compiler.mk"
NOT_PAX_MPROTECT_SAFE+= sbin/clamd
NOT_PAX_MPROTECT_SAFE+= bin/clamscan
NOT_PAX_MPROTECT_SAFE+= bin/freshclam
CFLAGS.SunOS+= -D__EXTENSIONS__
.if !empty(PKGSRC_COMPILER:Mclang) || !empty(CC_VERSION:Mgcc-[6-9]*)
CFLAGS.SunOS+= -D_XOPEN_SOURCE=600
.endif
BUILD_DEFS+= CLAMAV_USER CLAMAV_GROUP CLAMAV_DBDIR
FILES_SUBST+= CLAMAV_USER=${CLAMAV_USER}
FILES_SUBST+= CLAMAV_GROUP=${CLAMAV_GROUP}
FILES_SUBST+= CLAMAV_DBDIR=${CLAMAV_DBDIR}
MESSAGE_SUBST+= CLAMAV_USER=${CLAMAV_USER}
SUBST_CLASSES+= vars
SUBST_STAGE.vars= pre-configure
SUBST_FILES.vars= etc/clamav-milter.conf.sample etc/clamd.conf.sample
SUBST_VARS.vars= CLAMAV_DBDIR
RCD_SCRIPTS= clamd freshclamd
SMF_METHODS= clamd freshclamd
SMF_INSTANCES= ${SMF_METHODS}
PKG_GROUPS+= ${CLAMAV_GROUP}
PKG_USERS+= ${CLAMAV_USER}:${CLAMAV_GROUP}
PKG_GROUPS_VARS+= CLAMAV_GROUP
PKG_USERS_VARS= CLAMAV_USER
EGDIR= ${PREFIX}/share/examples/clamav
CONF_SAMPLES= clamd.conf freshclam.conf
.include "options.mk"
OWN_DIRS_PERMS= ${CLAMAV_DBDIR} ${CLAMAV_USER} ${CLAMAV_GROUP} 0775
CONF_FILES= # empty
CONF_FILES_PERMS= # empty
.for i in ${CONF_SAMPLES}
CONF_FILES+= ${EGDIR}/${i} ${PKG_SYSCONFDIR}/${i}
.endfor
INSTALLATION_DIRS+= ${EGDIR}
post-install:
.for i in ${CONF_SAMPLES}
${MV} ${DESTDIR}${PKG_SYSCONFDIR}/${i}.sample ${DESTDIR}${EGDIR}/${i}
.endfor
.include "../../archivers/bzip2/buildlink3.mk"
.include "../../archivers/libmspack/buildlink3.mk"
.include "../../devel/libltdl/buildlink3.mk"
.include "../../devel/pcre2/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../devel/gmp/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/json-c/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
.include "../../mk/curses.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
|