Commit 7b977c69 authored by Nicolas Wavrant's avatar Nicolas Wavrant

component/clamav: New clamav component

ClamAV is an open-source antivirus engine for detecting trojans, viruses, malware & other malicious threats.
parent e9ef74fd
Disable clamdtop as it requires ncurses5, but ncurses5 doesn't build without an extra old gcc.
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f890da..5e51ca1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,6 +106,7 @@ endif()
set(ENABLE_DOXYGEN_DEFAULT OFF)
set(ENABLE_UNRAR_DEFAULT ON)
set(ENABLE_SYSTEMD_DEFAULT ON)
+set(ENABLE_CLAMDTOP_DEFAULT ON)
# See CMakeOptions.cmake for additional options.
include(CMakeOptions.cmake)
@@ -564,7 +565,9 @@ if(NOT ENABLE_LIBCLAMAV_ONLY)
endif()
if(ENABLE_APP)
- find_package(CURSES REQUIRED)
+ if(ENABLE_CLAMDTOP)
+ find_package(CURSES REQUIRED)
+ endif()
if(NOT WIN32 AND ENABLE_MILTER)
find_package(Milter REQUIRED)
@@ -1086,7 +1089,9 @@ if(NOT ENABLE_LIBCLAMAV_ONLY)
add_subdirectory( freshclam )
- add_subdirectory( clamdtop )
+ if(ENABLE_CLAMDTOP)
+ add_subdirectory( clamdtop )
+ endif()
if(WIN32)
add_subdirectory( win32/conf_examples )
diff --git a/CMakeOptions.cmake b/CMakeOptions.cmake
index e6e9b11..00b9db6 100644
--- a/CMakeOptions.cmake
+++ b/CMakeOptions.cmake
@@ -116,6 +116,10 @@ option(ENABLE_SYSTEMD
"Install systemd service files if systemd is found."
${ENABLE_SYSTEMD_DEFAULT})
+option(ENABLE_CLAMDTOP
+ "Compile clamdtop."
+ ${ENABLE_CLAMDTOP_DEFAULT})
+
# For reference determining target platform:
# Rust Targets: https://doc.rust-lang.org/nightly/rustc/platform-support.html
option(RUST_COMPILER_TARGET
[buildout]
extends =
../bzip2/buildout.cfg
../curl/buildout.cfg
../cmake/buildout.cfg
../json-c/buildout.cfg
../libxml2/buildout.cfg
../openssl/buildout.cfg
../patch/buildout.cfg
../pcre2/buildout.cfg
../rust/buildout.cfg
../zlib/buildout.cfg
parts =
clamav
[clamav]
recipe = slapos.recipe.cmmi
shared = true
url = https://www.clamav.net/downloads/production/clamav-1.3.1.tar.gz
md5sum = a2617a04a69433f9f7c86ede5dcc82c6
location = @@LOCATION@@
patch-options = -p1
patches =
${:_profile_base_location_}/add_cmake_enable_clamdtop_option.patch#79dad34211b89a37860bdf8388790b6e
configure-command = ${cmake:location}/bin/cmake
configure-options =
-DCMAKE_INSTALL_PREFIX=${:location}
-DCMAKE_C_FLAGS="${:CMAKE_CFLAGS}"
-DCMAKE_CXX_FLAGS="${:CMAKE_CFLAGS}"
-DCMAKE_INSTALL_RPATH=${:CMAKE_LIBRARY_PATH}
-DENABLE_MILTER=OFF
-DENABLE_CLAMONACC=OFF
-DENABLE_CLAMDTOP=OFF
-DENABLE_TESTS=OFF
environment=
CMAKE_PROGRAM_PATH=${cmake:location}/bin
CMAKE_INCLUDE_PATH=${openssl:location}/include:${bzip2:location}/include:${zlib:location}/include:${libxml2:location}/include:${pcre2:location}/include:${json-c:location}/include:${curl:location}/include
CMAKE_LIBRARY_PATH=${:CMAKE_LIBRARY_PATH}
PATH=${rustc:location}/bin:${patch:location}/bin:%(PATH)s
CMAKE_CFLAGS = -I${openssl:location}/include -I${bzip2:location}/include -I${zlib:location}/include -I${libxml2:location}/include -I${pcre2:location}/include -I${json-c:location}/include -I${curl:location}/include
CMAKE_LIBRARY_PATH = ${:location}/lib:${openssl:location}/lib:${bzip2:location}/lib:${zlib:location}/lib:${libxml2:location}/lib:${pcre2:location}/lib:${json-c:location}/lib:${curl:location}/lib
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment