Ravenports generated: 22 Oct 2023 19:35
[ravenports.git] / bucket_11 / clamav
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               clamav
4 VERSION=                1.2.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-1.2.0.tar.gz:main
14 DF_INDEX=               1
15 SPKGS[standard]=        complete
16                         primary
17                         dev
18                         man
19                         docs
20
21 OPTIONS_AVAILABLE=      none
22 OPTIONS_STANDARD=       none
23
24 BUILD_DEPENDS=          json-c:dev:standard
25                         doxygen:single:standard
26                         rust:single:standard
27                         libmspack:dev:standard
28 BUILDRUN_DEPENDS=       libltdl:single:standard
29                         libmspack:primary:standard
30 RUN_DEPENDS=            arc:single:standard
31                         arj:single:standard
32                         unzoo:single:standard
33
34 USERS=                  clamav
35 GROUPS=                 clamav mail
36 USERGROUP_SPKG=         primary
37
38 USES=                   cpe cmake ncurses pkgconfig ssl iconv zlib pcre2
39                         curl bz2 execinfo c++:primary
40 GNOME_COMPONENTS=       libxml2
41
42 LICENSE=                GPLv2:primary
43 LICENSE_TERMS=          primary:{{WRKDIR}}/TERMS
44 LICENSE_FILE=           GPLv2:{{WRKSRC}}/COPYING.txt
45 LICENSE_AWK=            TERMS:"HAVE_CONFIG_H"
46 LICENSE_SOURCE=         TERMS:{{WRKSRC}}/clamscan/clamscan.c
47 LICENSE_SCHEME=         solo
48
49 FPC_EQUIVALENT=         security/clamav
50
51 SOVERSION=              12.0.1
52 PLIST_SUB=              CLAMAVGROUP=clamav
53                         CLAMAVUSER=clamav
54                         DBDIR=/var/db/clamav
55                         LOGDIR=/var/log/clamav
56                         RUNDIR=/var/run/clamav
57                         FRESH_SOMAJOR=3
58                         FRESH_SOVERSION=3.0.1
59 RC_SUBR=                clamav-clamd:primary
60                         clamav-freshclam:primary
61 SUB_FILES=              pkg-deinstall-primary
62 SUB_LIST=               CHMOD={{CHMOD}}
63                         CHOWN={{CHOWN}}
64                         CLAMAV_CLAMD_PIDFILE=/var/run/clamav/clamd.pid
65                         CLAMAV_CLAMD_SOCKET=/var/run/clamav/clamd.sock
66                         CLAMAV_MILTER_SOCKET=/var/run/clamav/clmilter.sock
67                         CLAMAVGROUP=clamav
68                         CLAMAVUSER=clamav
69                         DBDIR=/var/db/clamav
70                         LOGDIR=/var/log/clamav
71                         RUNDIR=/var/run/clamav
72
73 CMAKE_ARGS=             -DCLAMAV_USER:STRING="clamav"
74                         -DCLAMAV_GROUP:STRING="clamav"
75                         -DENABLE_EXTERNAL_MSPACK:BOOL=TRUE
76                         -DENABLE_TESTS:BOOL=FALSE
77                         -DENABLE_WERROR:BOOL=FALSE
78                         -DENABLE_ALL_THE_WARNINGS:BOOL=FALSE
79                         -DENABLE_DEBUG:BOOL=FALSE
80                         -DENABLE_EXPERIMENTAL:BOOL=FALSE
81                         -DENABLE_FRESHCLAM_DNS_FIX:BOOL=TRUE
82                         -DENABLE_FRESHCLAM_NO_CACHE:BOOL=TRUE
83                         -DENABLE_MILTER:BOOL=FALSE
84                         -DENABLE_MAN_PAGES:BOOL=TRUE
85                         -DENABLE_DOXYGEN:BOOL=TRUE
86                         -DENABLE_EXAMPLES:BOOL=TRUE
87                         -DENABLE_JSON_SHARED:BOOL=FALSE
88                         -DENABLE_UNRAR:BOOL=TRUE
89                         -DENABLE_SYSTEMD:BOOL=TRUE
90
91 post-patch:
92         ${REINPLACE_CMD} -E -e \
93                 's|^\#?(Example)$$|\#\1|' -e \
94                 's|^\#?((Update)?LogFile) .*/([a-z]+\.log)$$|\1 /var/log/clamav/\3|' \
95                 -e 's|^\#?(PidFile) .*/([a-z\-]+\.pid)$$|\1 /var/run/clamav/\2|' -e \
96                 's|^\#?(LocalSocket) .*$$|\1 ${CLAMAV_CLAMD_SOCKET}|' -e \
97                 's|^\#?(User) .*$$|\1 ${CLAMAVUSER}|' -e \
98                 's|^\#?(AllowSupplementaryGroups).*$$|\1 yes|' -e \
99                 's|^\#?(ScanMail).*$$|\1 yes|' -e \
100                 's|^\#?(DatabaseDirectory) .*$$|\1 /var/db/clamav|' -e \
101                 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' -e \
102                 's|^\#?(FixStaleSocket).*$$|\1 yes|' -e \
103                 's|^\#?(NotifyClamd) .*$$|\1 ${PREFIX}/etc/clamd.conf|' -e \
104                 's|^\#?(MilterSocket) */tmp.*$$|\1 ${CLAMAV_MILTER_SOCKET}|' -e \
105                 's|^\#?(ClamdSocket).*$$|\1 unix:${CLAMAV_CLAMD_SOCKET}|' \
106         ${WRKSRC}/etc/clamd.conf.sample \
107         ${WRKSRC}/etc/freshclam.conf.sample \
108         ${WRKSRC}/etc/clamav-milter.conf.sample
109
110 post-install:
111         ${INSTALL_DATA} ${BUILD_WRKSRC}/clamav-config.h ${STAGEDIR}${PREFIX}/include
112         ${MKDIR} ${STAGEDIR}${STD_DOCDIR}/html \
113                   ${STAGEDIR}/var/db/clamav \
114                   ${STAGEDIR}/var/log/clamav \
115                   ${STAGEDIR}/var/run/clamav
116         cd ${STAGEDIR}${PREFIX}/bin && ${STRIP_CMD} clambc clamconf clamdscan \
117                 clamdtop clamscan clamsubmit freshclam sigtool ex_*
118         cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} sbin/clamd lib/lib*.so
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:98:distinfo]
131 97a192dffe141480b56cabf1063d79a9fc55cd59203241fa41bfc7a98a548020     41360851 clamav-1.2.0.tar.gz
132
133
134 [FILE:666: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  ex_basic_scandesc
146  ex_file_inspection_callback
147  ex_prescan_callback
148  freshclam
149  sigtool
150 lib/
151  libclamav.so.%%SOMAJOR%%
152  libclamav.so.%%SOVERSION%%
153  libclamunrar.so.%%SOMAJOR%%
154  libclamunrar.so.%%SOVERSION%%
155  libclamunrar_iface.so.%%SOMAJOR%%
156  libclamunrar_iface.so.%%SOVERSION%%
157  libfreshclam.so.%%FRESH_SOMAJOR%%
158  libfreshclam.so.%%FRESH_SOVERSION%%
159 sbin/clamd
160 @dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%DBDIR%%
161 @dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%LOGDIR%%
162 @dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%RUNDIR%%
163
164
165 [FILE:189:manifests/plist.dev]
166 include/
167  clamav-config.h
168  clamav-types.h
169  clamav-version.h
170  clamav.h
171  libfreshclam.h
172 lib/
173  libclamav.so
174  libclamunrar.so
175  libclamunrar_iface.so
176  libfreshclam.so
177 lib/pkgconfig/libclamav.pc
178
179
180 [FILE:264:manifests/plist.man]
181 share/man/man1/
182  clambc.1.gz
183  clamconf.1.gz
184  clamdscan.1.gz
185  clamdtop.1.gz
186  clamscan.1.gz
187  clamsubmit.1.gz
188  freshclam.1.gz
189  sigtool.1.gz
190 share/man/man5/
191  clamav-milter.conf.5.gz
192  clamd.conf.5.gz
193  freshclam.conf.5.gz
194 share/man/man8/
195  clamav-milter.8.gz
196  clamd.8.gz
197
198
199 [FILE:3111:manifests/plist.docs]
200 share/doc/clamav/html/
201  404.html
202  Introduction.html
203  ace.js
204  ayu-highlight.css
205  book.js
206  clipboard.min.js
207  editor.js
208  elasticlunr.min.js
209  favicon.png
210  highlight.css
211  highlight.js
212  index.html
213  mark.min.js
214  mode-rust.js
215  print.html
216  searcher.js
217  searchindex.js
218  searchindex.json
219  theme-dawn.js
220  theme-tomorrow_night.js
221  tomorrow-night.css
222 share/doc/clamav/html/FontAwesome/css/font-awesome.css
223 share/doc/clamav/html/FontAwesome/fonts/
224  FontAwesome.ttf
225  fontawesome-webfont.eot
226  fontawesome-webfont.svg
227  fontawesome-webfont.ttf
228  fontawesome-webfont.woff
229  fontawesome-webfont.woff2
230 share/doc/clamav/html/appendix/
231  Appendix.html
232  Authenticode.html
233  CvdPrivateMirror.html
234  FileTypes.html
235  FunctionalityLevels.html
236  Terminology.html
237 share/doc/clamav/html/community_resources/
238  CommunityResources.html
239  CompileClamAV_AmazonLinux2.txt
240 share/doc/clamav/html/css/
241  chrome.css
242  general.css
243  print.css
244  variables.css
245 share/doc/clamav/html/faq/
246  faq-cvd.html
247  faq-eol.html
248  faq-freshclam.html
249  faq-ignore.html
250  faq-misc.html
251  faq-ml.html
252  faq-pua.html
253  faq-rust.html
254  faq-safebrowsing.html
255  faq-scan-alerts.html
256  faq-troubleshoot.html
257  faq-uninstall.html
258  faq-upgrade.html
259  faq-whichversion.html
260  faq-win32.html
261  faq.html
262 share/doc/clamav/html/fonts/
263  OPEN-SANS-LICENSE.txt
264  SOURCE-CODE-PRO-LICENSE.txt
265  fonts.css
266  open-sans-v17-all-charsets-300.woff2
267  open-sans-v17-all-charsets-300italic.woff2
268  open-sans-v17-all-charsets-600.woff2
269  open-sans-v17-all-charsets-600italic.woff2
270  open-sans-v17-all-charsets-700.woff2
271  open-sans-v17-all-charsets-700italic.woff2
272  open-sans-v17-all-charsets-800.woff2
273  open-sans-v17-all-charsets-800italic.woff2
274  open-sans-v17-all-charsets-italic.woff2
275  open-sans-v17-all-charsets-regular.woff2
276  source-code-pro-v11-all-charsets-500.woff2
277 share/doc/clamav/html/images/
278  change-fork-name.png
279  cisco.png
280  clone-your-fork.png
281  create-a-fork.png
282  demon.png
283  flamegraph.svg
284  fork-is-behind.png
285  logo.png
286  new-git-workflow.png
287  old-git-workflow.png
288 share/doc/clamav/html/manual/
289  Development.html
290  Installing.html
291  OnAccess.html
292  Signatures.html
293  Usage.html
294 share/doc/clamav/html/manual/Development/
295  Contribute.html
296  build-installer-packages.html
297  clamav-git-work-flow.html
298  code-coverage.html
299  development-builds.html
300  fuzzing-sanitizers.html
301  github-pr-basics.html
302  libclamav.html
303  performance-profiling.html
304  personal-forks.html
305  testing-pull-requests.html
306  tips-and-tricks.html
307 share/doc/clamav/html/manual/Installing/
308  Add-clamav-user.html
309  Community-projects.html
310  Docker.html
311  Installing-from-source-Unix-old.html
312  Installing-from-source-Unix.html
313  Installing-from-source-Windows.html
314  Packages.html
315 share/doc/clamav/html/manual/Signatures/
316  AllowLists.html
317  AuthenticodeRules.html
318  BodySignatureFormat.html
319  BytecodeSignatures.html
320  ContainerMetadata.html
321  DatabaseInfo.html
322  DynamicConfig.html
323  EncryptedArchives.html
324  ExtendedSignatures.html
325  FileTypeMagic.html
326  HashSignatures.html
327  LogicalSignatures.html
328  PhishSigs.html
329  SignatureNames.html
330  YaraRules.html
331 share/doc/clamav/html/manual/Usage/
332  Configuration.html
333  ReportABug.html
334  Scanning.html
335  Services.html
336  SignatureManagement.html
337
338
339 [FILE:328:patches/patch-CMakeLists.txt]
340 --- CMakeLists.txt.orig 2023-08-26 22:00:24 UTC
341 +++ CMakeLists.txt
342 @@ -59,7 +59,7 @@ set(GENERATE_WARNING "WARNING: This file
343  #
344  if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
345      set(C_LINUX 1)
346 -elseif(APPLE OR CMAKE_SYSTEM_NAME MATCHES "BSD")
347 +elseif(APPLE OR CMAKE_SYSTEM_NAME MATCHES "BSD|DragonFly")
348      set(C_BSD 1)
349  endif()
350  
351
352
353 [FILE:308:patches/patch-clamdtop_CMakeLists.txt]
354 --- clamdtop/CMakeLists.txt.orig        2023-08-26 22:00:24 UTC
355 +++ clamdtop/CMakeLists.txt
356 @@ -34,6 +34,7 @@ target_link_libraries( clamdtop
357      PRIVATE
358          ClamAV::libclamav
359          ClamAV::common
360 +       tinfo
361          Curses::curses )
362  if(WIN32)
363      install(TARGETS clamdtop DESTINATION . COMPONENT programs)
364
365
366 [FILE:1152:files/clamav-clamd.in]
367 #!/bin/sh
368
369 # PROVIDE: clamav_clamd
370 # REQUIRE: LOGIN
371 # BEFORE: mail
372 # KEYWORD: shutdown
373
374 #
375 # Add the following lines to /etc/rc.conf to enable clamd:
376 #
377 # clamav_clamd_enable="YES"
378 # clamav_clamd_flags="<set as needed>"
379 #
380 # See clamd(8) for flags
381 #
382
383 . /etc/rc.subr
384
385 name=clamav_clamd
386 rcvar=clamav_clamd_enable
387
388 # read settings, set default values
389 load_rc_config "$name"
390
391 : ${clamav_clamd_enable:=NO}
392 : ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
393 : ${clamav_clamd_pidfile="%%CLAMAV_CLAMD_PIDFILE%%"}
394 : ${clamav_clamd_user="%%CLAMAVUSER%%"}
395
396 command=%%PREFIX%%/sbin/clamd
397 required_dirs=%%DBDIR%%
398 required_files=%%PREFIX%%/etc/clamd.conf
399
400 start_precmd=clamav_clamd_precmd
401 extra_commands=reload
402 reload_cmd="%%PREFIX%%/bin/clamdscan --reload"
403
404 #clamav .93 won't start without a valid main.c[vl]d file
405 clamav_clamd_precmd()
406 {
407         local rundir=${clamav_clamd_pidfile%/*}
408         if [ ! -d $rundir ] ; then
409                 install -d -m 0755 -o ${clamav_clamd_user} -g ${clamav_clamd_user} $rundir
410         fi
411         if [ ! -f %%DBDIR%%/main.cvd -a ! -f %%DBDIR%%/main.cld ];then
412                 echo "Missing %%DBDIR%%/*.cvd or *.cld files.  You must run freshclam first"
413                 exit 1
414         fi
415 }
416
417 run_rc_command "$1"
418
419
420 [FILE:980:files/clamav-freshclam.in]
421 #!/bin/sh
422
423 # PROVIDE: clamav_freshclam
424 # REQUIRE: LOGIN clamav_clamd
425 # BEFORE: mail
426 # KEYWORD: shutdown
427
428 #
429 # Add the following lines to /etc/rc.conf to enable the freshclam daemon:
430 #
431 # clamav_freshclam_enable="YES"
432 # clamav_freshclam_flags="<set as needed>"
433 #
434 # See freshclam(1) for flags
435 #
436
437 . /etc/rc.subr
438
439 name=clamav_freshclam
440 rcvar=clamav_freshclam_enable
441
442 # read settings, set default values
443 load_rc_config ${name}
444
445 : ${clamav_freshclam_enable:=NO}
446 : ${clamav_freshclam_pidfile=%%RUNDIR%%/freshclam.pid}
447 : ${clamav_freshclam_user=%%CLAMAVUSER%%}
448
449 command=%%PREFIX%%/bin/freshclam
450 pidfile=${clamav_freshclam_pidfile}
451 command_args="--daemon -p ${pidfile}"
452 required_dirs=%%DBDIR%%
453 required_files=%%PREFIX%%/etc/freshclam.conf
454
455 start_precmd=clamav_freshclam_precmd
456
457 clamav_freshclam_precmd()
458 {
459         local rundir=${clamav_freshclam_pidfile%/*}
460         if [ ! -d $rundir ] ; then
461                 install -d -m 0755 -o ${clamav_freshclam_user} -g ${clamav_freshclam_user} $rundir
462         fi
463 }
464
465 run_rc_command "$1"
466
467
468 [FILE:513:files/pkg-deinstall-primary.in]
469 #!/bin/sh
470
471 if [ "$2" != "POST-DEINSTALL" ]; then
472         exit 0
473 fi
474
475 CLAMAVUSER=%%CLAMAVUSER%%
476
477 echo
478 echo "===================================================="
479 echo
480 echo "If you want remove clamav permanently from you system"
481 echo "execute following commands:"
482 echo
483 echo " # rm -rf %%LOGDIR%%"
484 echo " # rm -rf %%RUNDIR%%"
485 echo " # rm -rf %%DBDIR%%"
486 if pw usershow "${CLAMAVUSER}" 2>/dev/null 1>&2; then
487         echo " # pw userdel ${CLAMAVUSER}"
488 fi
489 echo
490 echo "===================================================="
491 echo
492
493 exit 0
494