123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- (define-module (gnu packages antivirus)
- #:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix build-system gnu)
- #:use-module (guix packages)
- #:use-module (guix download)
- #:use-module (guix utils)
- #:use-module (gnu packages)
- #:use-module (gnu packages autotools)
- #:use-module (gnu packages bison)
- #:use-module (gnu packages check)
- #:use-module (gnu packages compression)
- #:use-module (gnu packages curl)
- #:use-module (gnu packages cyrus-sasl)
- #:use-module (gnu packages flex)
- #:use-module (gnu packages llvm)
- #:use-module (gnu packages multiprecision)
- #:use-module (gnu packages ncurses)
- #:use-module (gnu packages pcre)
- #:use-module (gnu packages pkg-config)
- #:use-module (gnu packages tls)
- #:use-module (gnu packages web)
- #:use-module (gnu packages xml))
- (define-public clamav
- (package
- (name "clamav")
- (version "0.103.3")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://www.clamav.net/downloads/production/"
- "clamav-" version ".tar.gz"))
- (sha256
- (base32
- "1sba4zccgwjqk29b5qkgfc9gm794hmk6j7bpj8wilgcz8hc3svlz"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- (for-each delete-file-recursively
- '("win32"
- "libclamav/c++/llvm"
- "libclamav/tomsfastmath"
- "libclamunrar"))
- #t))
- (patches
- (search-patches "clamav-system-tomsfastmath.patch"
- "clamav-config-llvm-libs.patch"))))
- (build-system gnu-build-system)
- (native-inputs
- (list autoconf
- automake
- check
- libtool
- pkg-config))
- (inputs
- `(("bzip2" ,bzip2)
- ("libcurl" ,curl)
- ("libjson" ,json-c)
- ("libltdl" ,libltdl)
- ("libmspack" ,libmspack)
- ("llvm" ,llvm-3.6)
- ("ncurses" ,ncurses)
- ("openssl" ,libressl)
- ("pcre2" ,pcre2)
- ("sasl" ,cyrus-sasl)
- ("tomsfastmath" ,tomsfastmath)
- ("xml" ,libxml2)
- ("zlib" ,zlib)))
- (arguments
- `(#:configure-flags
- (let-syntax ((with (syntax-rules ()
- ((_ name)
- (string-append "--with-" name "="
- (assoc-ref %build-inputs name))))))
- (list "--disable-unrar"
- "--enable-llvm"
- "--with-system-llvm"
- "--with-system-libmspack"
- "--without-included-ltdl"
- (with "xml")
- (with "openssl")
- (with "libjson")
- (with "pcre2")
- (with "zlib")
- (with "libcurl")
-
-
- "--enable-bzip2"
- "--enable-check"
- "--sysconfdir=/etc/clamav"
-
- "--with-dbdir=/var/db/clamav"))
-
- #:make-flags (list (string-append "sysconfdir=" %output "/etc"))
- #:phases (modify-phases %standard-phases
-
-
- (add-after 'unpack 'reconf
- (lambda _ (invoke "autoreconf" "-vfi")))
- (add-before 'configure 'patch-llvm-config
- (lambda _
- (substitute* '("libclamav/c++/detect.cpp"
- "libclamav/c++/ClamBCRTChecks.cpp"
- "libclamav/c++/bytecode2llvm.cpp")
- (("llvm/Config/config.h") "llvm/Config/llvm-config.h"))
-
-
-
-
- (substitute* "libclamav/c++/Makefile.in"
- (("@LLVMCONFIG_LIBFILES@") ""))
- #t))
- (add-before 'check 'skip-clamd-tests
-
-
- (lambda _
- (substitute* "unit_tests/Makefile"
- (("check2_clamd.sh.*check4_clamd.sh") ""))
- #t)))))
- (home-page "https://www.clamav.net")
- (synopsis "Antivirus engine")
- (description
- "Clam AntiVirus is an anti-virus toolkit, designed especially for e-mail
- scanning on mail gateways. It provides a number of utilities including a
- flexible and scalable multi-threaded daemon, a command line scanner, and
- advanced tool for automatic database updates. The core of the package is an
- anti-virus engine available in the form of a shared library.")
- (license (list license:gpl2+
- license:lgpl2.1
- license:public-domain
- (package-license bzip2)
- license:bsd-2
- license:bsd-3
- license:ncsa
- license:zlib
- license:x11
- (license:non-copyleft "libclamav/strlcat.c")
- license:asl2.0
- license:expat))))
|