Ravenports generated: 18 Jan 2021 12:16
[ravenports.git] / bucket_11 / clamav
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               clamav
4 VERSION=                0.103.0
5 KEYWORDS=               security
6 VARIANTS=               standard
7 SDESC[standard]=        Clam Anti-Virus Scanner
8 HOMEPAGE=               https://www.clamav.net/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            https://www.clamav.net/downloads/production/
13 DISTFILE[1]=            clamav-0.103.0.tar.gz:main
14 DF_INDEX=               1
15 SPKGS[standard]=        complete
16                         primary
17                         docs
18
19 OPTIONS_AVAILABLE=      none
20 OPTIONS_STANDARD=       none
21
22 BUILD_DEPENDS=          json-c:primary:standard
23 BUILDRUN_DEPENDS=       curl:primary:standard
24                         libltdl:single:standard
25                         libmspack:single:standard
26                         pcre2:primary:standard
27 RUN_DEPENDS=            arc:single:standard
28                         arj:single:standard
29                         unzoo:single:standard
30
31 USERS=                  clamav
32 GROUPS=                 clamav mail
33 USERGROUP_SPKG=         primary
34
35 USES=                   cpe gmake libtool ncurses pkgconfig ssl iconv zlib
36                         bz2 c++:primary
37 GNOME_COMPONENTS=       libxml2
38
39 LICENSE=                GPLv2:primary
40 LICENSE_TERMS=          primary:{{WRKDIR}}/TERMS
41 LICENSE_FILE=           GPLv2:{{WRKSRC}}/COPYING
42 LICENSE_AWK=            TERMS:"HAVE_CONFIG_H"
43 LICENSE_SOURCE=         TERMS:{{WRKSRC}}/clamscan/clamscan.c
44 LICENSE_SCHEME=         solo
45
46 FPC_EQUIVALENT=         security/clamav
47
48 MUST_CONFIGURE=         gnu
49 CONFIGURE_ARGS=         --libdir={{PREFIX}}/lib
50                         --enable-ipv6
51                         --enable-unrar
52                         --enable-bigstack
53                         --enable-clamdtop
54                         --with-pcre
55                         --with-iconv
56                         --with-dbdir="/var/db/clamav"
57                         --with-xml="{{LOCALBASE}}"
58                         --with-libcurl="{{LOCALBASE}}"
59                         --with-openssl="{{OPENSSLBASE}}"
60                         --with-libjson="{{LOCALBASE}}"
61                         --with-libjson-static="{{LOCALBASE}}/lib/libjson-c_pic.a"
62                         --with-system-libmspack="{{LOCALBASE}}/lib/libmspack.so"
63                         --disable-check
64                         --disable-milter
65
66 INSTALL_TARGET=         install-strip
67 INSTALL_REQ_TOOLCHAIN=  yes
68 SOVERSION=              9.0.5
69 PLIST_SUB=              CLAMAVGROUP=clamav
70                         CLAMAVUSER=clamav
71                         DBDIR=/var/db/clamav
72                         LOGDIR=/var/log/clamav
73                         RUNDIR=/var/run/clamav
74                         FRESH_SOMAJOR=2
75                         FRESH_SOVERSION=2.0.1
76 RC_SUBR=                clamav-clamd:primary
77                         clamav-freshclam:primary
78 SUB_FILES=              pkg-deinstall-primary
79 SUB_LIST=               CHMOD={{CHMOD}}
80                         CHOWN={{CHOWN}}
81                         CLAMAV_CLAMD_PIDFILE=/var/run/clamav/clamd.pid
82                         CLAMAV_CLAMD_SOCKET=/var/run/clamav/clamd.sock
83                         CLAMAV_MILTER_SOCKET=/var/run/clamav/clmilter.sock
84                         CLAMAVGROUP=clamav
85                         CLAMAVUSER=clamav
86                         DBDIR=/var/db/clamav
87                         LOGDIR=/var/log/clamav
88                         RUNDIR=/var/run/clamav
89
90 VAR_OPSYS[freebsd]=     LDFLAGS=-lthr
91
92 post-patch:
93         ${REINPLACE_CMD} -E -e \
94                 's|^\#?(Example)$$|\#\1|' -e \
95                 's|^\#?((Update)?LogFile) .*/([a-z]+\.log)$$|\1 /var/log/clamav/\3|' \
96                 -e 's|^\#?(PidFile) .*/([a-z\-]+\.pid)$$|\1 /var/run/clamav/\2|' -e \
97                 's|^\#?(LocalSocket) .*$$|\1 ${CLAMAV_CLAMD_SOCKET}|' -e \
98                 's|^\#?(User) .*$$|\1 ${CLAMAVUSER}|' -e \
99                 's|^\#?(AllowSupplementaryGroups).*$$|\1 yes|' -e \
100                 's|^\#?(ScanMail).*$$|\1 yes|' -e \
101                 's|^\#?(DatabaseDirectory) .*$$|\1 /var/db/clamav|' -e \
102                 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' -e \
103                 's|^\#?(FixStaleSocket).*$$|\1 yes|' -e \
104                 's|^\#?(NotifyClamd) .*$$|\1 ${PREFIX}/etc/clamd.conf|' -e \
105                 's|^\#?(MilterSocket) */tmp.*$$|\1 ${CLAMAV_MILTER_SOCKET}|' -e \
106                 's|^\#?(ClamdSocket).*$$|\1 unix:${CLAMAV_CLAMD_SOCKET}|' \
107         ${WRKSRC}/etc/clamd.conf.sample \
108         ${WRKSRC}/etc/freshclam.conf.sample \
109         ${WRKSRC}/etc/clamav-milter.conf.sample
110
111 post-install:
112         ${INSTALL_DATA} ${WRKSRC}/clamav-config.h ${STAGEDIR}${PREFIX}/include
113         ${MKDIR} ${STAGEDIR}${STD_DOCDIR}/html \
114                   ${STAGEDIR}/var/db/clamav \
115                   ${STAGEDIR}/var/log/clamav \
116                   ${STAGEDIR}/var/run/clamav
117         (cd ${WRKSRC}/docs/html && \
118                 ${COPYTREE_SHARE} . ${STAGEDIR}${STD_DOCDIR}/html)
119
120 [FILE:317:descriptions/desc.primary]
121 This the stable version of Clam Antivirus.
122
123 Clam Antivirus is command line virus scanner written entirely in C
124 and its database is kept up to date. It also detects polymorphic
125 viruses, scans compressed files and supported by AMaViS.
126 Optionally you can use the clamav-milter interface to connect
127 clamav with sendmail.
128
129
130 [FILE:100:distinfo]
131 32a9745277bfdda80e77ac9ca2f5990897418e9416880f3c31553ca673e80546     13357078 clamav-0.103.0.tar.gz
132
133
134 [FILE:1045:manifests/plist.primary]
135 @sample etc/clamd.conf.sample
136 @sample etc/freshclam.conf.sample
137 bin/
138  clamav-config
139  clambc
140  clamconf
141  clamdscan
142  clamdtop
143  clamscan
144  clamsubmit
145  freshclam
146  sigtool
147 include/
148  clamav-config.h
149  clamav-types.h
150  clamav-version.h
151  clamav.h
152  libfreshclam.h
153 lib/
154  libclamav.so
155  libclamav.so.%%SOMAJOR%%
156  libclamav.so.%%SOVERSION%%
157  libclamunrar.so
158  libclamunrar.so.%%SOMAJOR%%
159  libclamunrar.so.%%SOVERSION%%
160  libclamunrar_iface.so
161  libclamunrar_iface.so.%%SOMAJOR%%
162  libclamunrar_iface.so.%%SOVERSION%%
163  libfreshclam.so
164  libfreshclam.so.%%FRESH_SOMAJOR%%
165  libfreshclam.so.%%FRESH_SOVERSION%%
166 lib/pkgconfig/libclamav.pc
167 sbin/clamd
168 share/man/man1/
169  clambc.1.gz
170  clamconf.1.gz
171  clamdscan.1.gz
172  clamdtop.1.gz
173  clamscan.1.gz
174  clamsubmit.1.gz
175  freshclam.1.gz
176  sigtool.1.gz
177 share/man/man5/
178  clamav-milter.conf.5.gz
179  clamd.conf.5.gz
180  freshclam.conf.5.gz
181 share/man/man8/
182  clamav-milter.8.gz
183  clamd.8.gz
184 @dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%DBDIR%%
185 @dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%LOGDIR%%
186 @dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%RUNDIR%%
187
188
189 [FILE:881:manifests/plist.docs]
190 share/doc/clamav/html/UserManual.html
191 share/doc/clamav/html/UserManual/
192  Installation-Unix.html
193  Installation-Windows.html
194  Introduction.html
195  OnAccess.html
196  Signatures.html
197  Usage.html
198  development.html
199  libclamav.html
200 share/doc/clamav/html/UserManual/Installation-Unix/
201  Steps-Debian-Ubuntu.html
202  Steps-Redhat-CentOS.html
203  Steps-macOS.html
204 share/doc/clamav/html/UserManual/Signatures/
205  AllowLists.html
206  AuthenticodeRules.html
207  BodySignatureFormat.html
208  BytecodeSignatures.html
209  ContainerMetadata.html
210  DatabaseInfo.html
211  DynamicConfig.html
212  EncryptedArchives.html
213  ExtendedSignatures.html
214  FileTypeMagic.html
215  FileTypes.html
216  FunctionalityLevels.html
217  HashSignatures.html
218  LogicalSignatures.html
219  PhishSigs.html
220  YaraRules.html
221 share/doc/clamav/html/UserManual/Usage/
222  Configuration.html
223  Scanning.html
224  SignatureManagement.html
225 share/doc/clamav/html/UserManual/images/demon.png
226
227
228 [FILE:680:patches/patch-configure]
229 The USES=libtool is adding dragonfly to "freebsd*)" in unwanted places.
230 This is an unintended side effect, avoid it by limiting to freebsd 10+.
231
232 --- configure.orig      2020-09-13 00:27:48 UTC
233 +++ configure
234 @@ -26405,7 +26405,7 @@ freebsd[45]*)
235  $as_echo "#define C_BSD 1" >>confdefs.h
236  
237      ;;
238 -freebsd*)
239 +freebsd1*)
240      if test "$have_pthreads" = "yes"; then
241         THREAD_LIBS="-lthr"
242         TH_SAFE="-thread-safe"
243 @@ -30081,7 +30081,7 @@ fi
244  
245  
246  case "$host_os" in
247 -freebsd*)
248 +freebsd1*)
249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kinfo_getvmmap in -lutil" >&5
250  $as_echo_n "checking for kinfo_getvmmap in -lutil... " >&6; }
251  if ${ac_cv_lib_util_kinfo_getvmmap+:} false; then :
252
253
254 [FILE:398:patches/patch-libclamav_c++_configure]
255 The USES=libtool is adding dragonfly to "freebsd*)" in unwanted places.
256 This is an unintended side effect, avoid it by limiting to freebsd 10+.
257
258 --- libclamav/c++/configure.orig        2020-09-13 00:27:38 UTC
259 +++ libclamav/c++/configure
260 @@ -17007,7 +17007,7 @@ case "$target_os" in
261  freebsd[45]*)
262      THREAD_LIBS="-pthread -lc_r"
263      ;;
264 -freebsd*)
265 +freebsd1*)
266      THREAD_LIBS="-lthr"
267      ;;
268  darwin*)
269
270
271 [FILE:1152:files/clamav-clamd.in]
272 #!/bin/sh
273
274 # PROVIDE: clamav_clamd
275 # REQUIRE: LOGIN
276 # BEFORE: mail
277 # KEYWORD: shutdown
278
279 #
280 # Add the following lines to /etc/rc.conf to enable clamd:
281 #
282 # clamav_clamd_enable="YES"
283 # clamav_clamd_flags="<set as needed>"
284 #
285 # See clamd(8) for flags
286 #
287
288 . /etc/rc.subr
289
290 name=clamav_clamd
291 rcvar=clamav_clamd_enable
292
293 # read settings, set default values
294 load_rc_config "$name"
295
296 : ${clamav_clamd_enable:=NO}
297 : ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
298 : ${clamav_clamd_pidfile="%%CLAMAV_CLAMD_PIDFILE%%"}
299 : ${clamav_clamd_user="%%CLAMAVUSER%%"}
300
301 command=%%PREFIX%%/sbin/clamd
302 required_dirs=%%DBDIR%%
303 required_files=%%PREFIX%%/etc/clamd.conf
304
305 start_precmd=clamav_clamd_precmd
306 extra_commands=reload
307 reload_cmd="%%PREFIX%%/bin/clamdscan --reload"
308
309 #clamav .93 won't start without a valid main.c[vl]d file
310 clamav_clamd_precmd()
311 {
312         local rundir=${clamav_clamd_pidfile%/*}
313         if [ ! -d $rundir ] ; then
314                 install -d -m 0755 -o ${clamav_clamd_user} -g ${clamav_clamd_user} $rundir
315         fi
316         if [ ! -f %%DBDIR%%/main.cvd -a ! -f %%DBDIR%%/main.cld ];then
317                 echo "Missing %%DBDIR%%/*.cvd or *.cld files.  You must run freshclam first"
318                 exit 1
319         fi
320 }
321
322 run_rc_command "$1"
323
324
325 [FILE:980:files/clamav-freshclam.in]
326 #!/bin/sh
327
328 # PROVIDE: clamav_freshclam
329 # REQUIRE: LOGIN clamav_clamd
330 # BEFORE: mail
331 # KEYWORD: shutdown
332
333 #
334 # Add the following lines to /etc/rc.conf to enable the freshclam daemon:
335 #
336 # clamav_freshclam_enable="YES"
337 # clamav_freshclam_flags="<set as needed>"
338 #
339 # See freshclam(1) for flags
340 #
341
342 . /etc/rc.subr
343
344 name=clamav_freshclam
345 rcvar=clamav_freshclam_enable
346
347 # read settings, set default values
348 load_rc_config ${name}
349
350 : ${clamav_freshclam_enable:=NO}
351 : ${clamav_freshclam_pidfile=%%RUNDIR%%/freshclam.pid}
352 : ${clamav_freshclam_user=%%CLAMAVUSER%%}
353
354 command=%%PREFIX%%/bin/freshclam
355 pidfile=${clamav_freshclam_pidfile}
356 command_args="--daemon -p ${pidfile}"
357 required_dirs=%%DBDIR%%
358 required_files=%%PREFIX%%/etc/freshclam.conf
359
360 start_precmd=clamav_freshclam_precmd
361
362 clamav_freshclam_precmd()
363 {
364         local rundir=${clamav_freshclam_pidfile%/*}
365         if [ ! -d $rundir ] ; then
366                 install -d -m 0755 -o ${clamav_freshclam_user} -g ${clamav_freshclam_user} $rundir
367         fi
368 }
369
370 run_rc_command "$1"
371
372
373 [FILE:513:files/pkg-deinstall-primary.in]
374 #!/bin/sh
375
376 if [ "$2" != "POST-DEINSTALL" ]; then
377         exit 0
378 fi
379
380 CLAMAVUSER=%%CLAMAVUSER%%
381
382 echo
383 echo "===================================================="
384 echo
385 echo "If you want remove clamav permanently from you system"
386 echo "execute following commands:"
387 echo
388 echo " # rm -rf %%LOGDIR%%"
389 echo " # rm -rf %%RUNDIR%%"
390 echo " # rm -rf %%DBDIR%%"
391 if pw usershow "${CLAMAVUSER}" 2>/dev/null 1>&2; then
392         echo " # pw userdel ${CLAMAVUSER}"
393 fi
394 echo
395 echo "===================================================="
396 echo
397
398 exit 0
399