Ravenports generated: 10 Feb 2024 22:55
[ravenports.git] / bucket_11 / clamav
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               clamav
4 VERSION=                1.2.1
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.1.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 VAR_OPSYS[linux]=       CMAKE_ARGS=-DENABLE_SYSTEMD:BOOL=FALSE
90                         CMAKE_ARGS=-DSYSTEMD_UNIT_DIR:PATH="/etc/systemd/system"
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} ${BUILD_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 ${STAGEDIR}${PREFIX}/bin && ${STRIP_CMD} clambc clamconf clamdscan \
118                 clamdtop clamscan clamsubmit freshclam sigtool ex_*
119         cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} sbin/clamd lib/lib*.so
120
121 [FILE:317:descriptions/desc.primary]
122 This the stable version of Clam Antivirus.
123
124 Clam Antivirus is command line virus scanner written entirely in C
125 and its database is kept up to date. It also detects polymorphic
126 viruses, scans compressed files and supported by AMaViS.
127 Optionally you can use the clamav-milter interface to connect
128 clamav with sendmail.
129
130
131 [FILE:98:distinfo]
132 9a14fe870cbb8f5f79f668b789dca0f25cc6be22abe32f4f7d3677e4ee3935b0     42089565 clamav-1.2.1.tar.gz
133
134
135 [FILE:695:manifests/plist.primary]
136 @sample etc/clamd.conf.sample
137 @sample etc/freshclam.conf.sample
138 %%ONLY-LINUX%%sbin/clamonacc
139 bin/
140  clamav-config
141  clambc
142  clamconf
143  clamdscan
144  clamdtop
145  clamscan
146  clamsubmit
147  ex_basic_scandesc
148  ex_file_inspection_callback
149  ex_prescan_callback
150  freshclam
151  sigtool
152 lib/
153  libclamav.so.%%SOMAJOR%%
154  libclamav.so.%%SOVERSION%%
155  libclamunrar.so.%%SOMAJOR%%
156  libclamunrar.so.%%SOVERSION%%
157  libclamunrar_iface.so.%%SOMAJOR%%
158  libclamunrar_iface.so.%%SOVERSION%%
159  libfreshclam.so.%%FRESH_SOMAJOR%%
160  libfreshclam.so.%%FRESH_SOVERSION%%
161 sbin/clamd
162 @dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%DBDIR%%
163 @dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%LOGDIR%%
164 @dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%RUNDIR%%
165
166
167 [FILE:189:manifests/plist.dev]
168 include/
169  clamav-config.h
170  clamav-types.h
171  clamav-version.h
172  clamav.h
173  libfreshclam.h
174 lib/
175  libclamav.so
176  libclamunrar.so
177  libclamunrar_iface.so
178  libfreshclam.so
179 lib/pkgconfig/libclamav.pc
180
181
182 [FILE:308:manifests/plist.man]
183 %%ONLY-LINUX%%share/man/man8/clamonacc.8.gz
184 share/man/man1/
185  clambc.1.gz
186  clamconf.1.gz
187  clamdscan.1.gz
188  clamdtop.1.gz
189  clamscan.1.gz
190  clamsubmit.1.gz
191  freshclam.1.gz
192  sigtool.1.gz
193 share/man/man5/
194  clamav-milter.conf.5.gz
195  clamd.conf.5.gz
196  freshclam.conf.5.gz
197 share/man/man8/
198  clamav-milter.8.gz
199  clamd.8.gz
200
201
202 [FILE:3140:manifests/plist.docs]
203 share/doc/clamav/html/
204  404.html
205  Introduction.html
206  ace.js
207  ayu-highlight.css
208  book.js
209  clipboard.min.js
210  editor.js
211  elasticlunr.min.js
212  favicon.png
213  highlight.css
214  highlight.js
215  index.html
216  mark.min.js
217  mode-rust.js
218  print.html
219  searcher.js
220  searchindex.js
221  searchindex.json
222  theme-dawn.js
223  theme-tomorrow_night.js
224  tomorrow-night.css
225 share/doc/clamav/html/FontAwesome/css/font-awesome.css
226 share/doc/clamav/html/FontAwesome/fonts/
227  FontAwesome.ttf
228  fontawesome-webfont.eot
229  fontawesome-webfont.svg
230  fontawesome-webfont.ttf
231  fontawesome-webfont.woff
232  fontawesome-webfont.woff2
233 share/doc/clamav/html/appendix/
234  Appendix.html
235  Authenticode.html
236  CvdPrivateMirror.html
237  FileTypes.html
238  FunctionalityLevels.html
239  Terminology.html
240 share/doc/clamav/html/community_resources/
241  CommunityResources.html
242  CompileClamAV_AmazonLinux2.txt
243 share/doc/clamav/html/css/
244  chrome.css
245  general.css
246  print.css
247  variables.css
248 share/doc/clamav/html/faq/
249  faq-cvd.html
250  faq-eol.html
251  faq-freshclam.html
252  faq-ignore.html
253  faq-malware-fp-reports.html
254  faq-misc.html
255  faq-ml.html
256  faq-pua.html
257  faq-rust.html
258  faq-safebrowsing.html
259  faq-scan-alerts.html
260  faq-troubleshoot.html
261  faq-uninstall.html
262  faq-upgrade.html
263  faq-whichversion.html
264  faq-win32.html
265  faq.html
266 share/doc/clamav/html/fonts/
267  OPEN-SANS-LICENSE.txt
268  SOURCE-CODE-PRO-LICENSE.txt
269  fonts.css
270  open-sans-v17-all-charsets-300.woff2
271  open-sans-v17-all-charsets-300italic.woff2
272  open-sans-v17-all-charsets-600.woff2
273  open-sans-v17-all-charsets-600italic.woff2
274  open-sans-v17-all-charsets-700.woff2
275  open-sans-v17-all-charsets-700italic.woff2
276  open-sans-v17-all-charsets-800.woff2
277  open-sans-v17-all-charsets-800italic.woff2
278  open-sans-v17-all-charsets-italic.woff2
279  open-sans-v17-all-charsets-regular.woff2
280  source-code-pro-v11-all-charsets-500.woff2
281 share/doc/clamav/html/images/
282  change-fork-name.png
283  cisco.png
284  clone-your-fork.png
285  create-a-fork.png
286  demon.png
287  flamegraph.svg
288  fork-is-behind.png
289  logo.png
290  new-git-workflow.png
291  old-git-workflow.png
292 share/doc/clamav/html/manual/
293  Development.html
294  Installing.html
295  OnAccess.html
296  Signatures.html
297  Usage.html
298 share/doc/clamav/html/manual/Development/
299  Contribute.html
300  build-installer-packages.html
301  clamav-git-work-flow.html
302  code-coverage.html
303  development-builds.html
304  fuzzing-sanitizers.html
305  github-pr-basics.html
306  libclamav.html
307  performance-profiling.html
308  personal-forks.html
309  testing-pull-requests.html
310  tips-and-tricks.html
311 share/doc/clamav/html/manual/Installing/
312  Add-clamav-user.html
313  Community-projects.html
314  Docker.html
315  Installing-from-source-Unix-old.html
316  Installing-from-source-Unix.html
317  Installing-from-source-Windows.html
318  Packages.html
319 share/doc/clamav/html/manual/Signatures/
320  AllowLists.html
321  AuthenticodeRules.html
322  BodySignatureFormat.html
323  BytecodeSignatures.html
324  ContainerMetadata.html
325  DatabaseInfo.html
326  DynamicConfig.html
327  EncryptedArchives.html
328  ExtendedSignatures.html
329  FileTypeMagic.html
330  HashSignatures.html
331  LogicalSignatures.html
332  PhishSigs.html
333  SignatureNames.html
334  YaraRules.html
335 share/doc/clamav/html/manual/Usage/
336  Configuration.html
337  ReportABug.html
338  Scanning.html
339  Services.html
340  SignatureManagement.html
341
342
343 [FILE:328:patches/patch-CMakeLists.txt]
344 --- CMakeLists.txt.orig 2023-10-24 17:10:14 UTC
345 +++ CMakeLists.txt
346 @@ -59,7 +59,7 @@ set(GENERATE_WARNING "WARNING: This file
347  #
348  if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
349      set(C_LINUX 1)
350 -elseif(APPLE OR CMAKE_SYSTEM_NAME MATCHES "BSD")
351 +elseif(APPLE OR CMAKE_SYSTEM_NAME MATCHES "BSD|DragonFly")
352      set(C_BSD 1)
353  endif()
354  
355
356
357 [FILE:308:patches/patch-clamdtop_CMakeLists.txt]
358 --- clamdtop/CMakeLists.txt.orig        2023-10-24 17:10:14 UTC
359 +++ clamdtop/CMakeLists.txt
360 @@ -34,6 +34,7 @@ target_link_libraries( clamdtop
361      PRIVATE
362          ClamAV::libclamav
363          ClamAV::common
364 +       tinfo
365          Curses::curses )
366  if(WIN32)
367      install(TARGETS clamdtop DESTINATION . COMPONENT programs)
368
369
370 [FILE:1152:files/clamav-clamd.in]
371 #!/bin/sh
372
373 # PROVIDE: clamav_clamd
374 # REQUIRE: LOGIN
375 # BEFORE: mail
376 # KEYWORD: shutdown
377
378 #
379 # Add the following lines to /etc/rc.conf to enable clamd:
380 #
381 # clamav_clamd_enable="YES"
382 # clamav_clamd_flags="<set as needed>"
383 #
384 # See clamd(8) for flags
385 #
386
387 . /etc/rc.subr
388
389 name=clamav_clamd
390 rcvar=clamav_clamd_enable
391
392 # read settings, set default values
393 load_rc_config "$name"
394
395 : ${clamav_clamd_enable:=NO}
396 : ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
397 : ${clamav_clamd_pidfile="%%CLAMAV_CLAMD_PIDFILE%%"}
398 : ${clamav_clamd_user="%%CLAMAVUSER%%"}
399
400 command=%%PREFIX%%/sbin/clamd
401 required_dirs=%%DBDIR%%
402 required_files=%%PREFIX%%/etc/clamd.conf
403
404 start_precmd=clamav_clamd_precmd
405 extra_commands=reload
406 reload_cmd="%%PREFIX%%/bin/clamdscan --reload"
407
408 #clamav .93 won't start without a valid main.c[vl]d file
409 clamav_clamd_precmd()
410 {
411         local rundir=${clamav_clamd_pidfile%/*}
412         if [ ! -d $rundir ] ; then
413                 install -d -m 0755 -o ${clamav_clamd_user} -g ${clamav_clamd_user} $rundir
414         fi
415         if [ ! -f %%DBDIR%%/main.cvd -a ! -f %%DBDIR%%/main.cld ];then
416                 echo "Missing %%DBDIR%%/*.cvd or *.cld files.  You must run freshclam first"
417                 exit 1
418         fi
419 }
420
421 run_rc_command "$1"
422
423
424 [FILE:980:files/clamav-freshclam.in]
425 #!/bin/sh
426
427 # PROVIDE: clamav_freshclam
428 # REQUIRE: LOGIN clamav_clamd
429 # BEFORE: mail
430 # KEYWORD: shutdown
431
432 #
433 # Add the following lines to /etc/rc.conf to enable the freshclam daemon:
434 #
435 # clamav_freshclam_enable="YES"
436 # clamav_freshclam_flags="<set as needed>"
437 #
438 # See freshclam(1) for flags
439 #
440
441 . /etc/rc.subr
442
443 name=clamav_freshclam
444 rcvar=clamav_freshclam_enable
445
446 # read settings, set default values
447 load_rc_config ${name}
448
449 : ${clamav_freshclam_enable:=NO}
450 : ${clamav_freshclam_pidfile=%%RUNDIR%%/freshclam.pid}
451 : ${clamav_freshclam_user=%%CLAMAVUSER%%}
452
453 command=%%PREFIX%%/bin/freshclam
454 pidfile=${clamav_freshclam_pidfile}
455 command_args="--daemon -p ${pidfile}"
456 required_dirs=%%DBDIR%%
457 required_files=%%PREFIX%%/etc/freshclam.conf
458
459 start_precmd=clamav_freshclam_precmd
460
461 clamav_freshclam_precmd()
462 {
463         local rundir=${clamav_freshclam_pidfile%/*}
464         if [ ! -d $rundir ] ; then
465                 install -d -m 0755 -o ${clamav_freshclam_user} -g ${clamav_freshclam_user} $rundir
466         fi
467 }
468
469 run_rc_command "$1"
470
471
472 [FILE:513:files/pkg-deinstall-primary.in]
473 #!/bin/sh
474
475 if [ "$2" != "POST-DEINSTALL" ]; then
476         exit 0
477 fi
478
479 CLAMAVUSER=%%CLAMAVUSER%%
480
481 echo
482 echo "===================================================="
483 echo
484 echo "If you want remove clamav permanently from you system"
485 echo "execute following commands:"
486 echo
487 echo " # rm -rf %%LOGDIR%%"
488 echo " # rm -rf %%RUNDIR%%"
489 echo " # rm -rf %%DBDIR%%"
490 if pw usershow "${CLAMAVUSER}" 2>/dev/null 1>&2; then
491         echo " # pw userdel ${CLAMAVUSER}"
492 fi
493 echo
494 echo "===================================================="
495 echo
496
497 exit 0
498