From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8s4Y-0008A0-GA for guix-patches@gnu.org; Sat, 06 Oct 2018 15:17:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8s4V-0004aC-B8 for guix-patches@gnu.org; Sat, 06 Oct 2018 15:17:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34585) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g8s4V-0004Zy-5F for guix-patches@gnu.org; Sat, 06 Oct 2018 15:17:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g8s4V-00038d-0C for guix-patches@gnu.org; Sat, 06 Oct 2018 15:17:03 -0400 Subject: [bug#32958] [PATCH] gnu: Add clamav. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8s3b-0007fx-PN for guix-patches@gnu.org; Sat, 06 Oct 2018 15:16:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8rwf-00052I-TK for guix-patches@gnu.org; Sat, 06 Oct 2018 15:09:01 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:39988 helo=mira.cbaines.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8rwf-00051v-K1 for guix-patches@gnu.org; Sat, 06 Oct 2018 15:08:57 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 4C790166B7 for ; Sat, 6 Oct 2018 20:08:56 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id c5481026 for ; Sat, 6 Oct 2018 19:08:55 +0000 (UTC) From: Christopher Baines Date: Sat, 6 Oct 2018 20:08:55 +0100 Message-Id: <20181006190855.3537-1-mail@cbaines.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 32958@debbugs.gnu.org * gnu/packages/antivirus.scm: New file. * gnu-system.am: Add it. --- gnu/local.mk | 1 + gnu/packages/antivirus.scm | 119 +++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 gnu/packages/antivirus.scm diff --git a/gnu/local.mk b/gnu/local.mk index 8f854e98b5..c480be9f30 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -60,6 +60,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/packages/android.scm \ %D%/packages/animation.scm \ %D%/packages/anthy.scm \ + %D%/packages/antivirus.scm \ %D%/packages/apl.scm \ %D%/packages/apr.scm \ %D%/packages/aspell.scm \ diff --git a/gnu/packages/antivirus.scm b/gnu/packages/antivirus.scm new file mode 100644 index 0000000000..513a5affc0 --- /dev/null +++ b/gnu/packages/antivirus.scm @@ -0,0 +1,119 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2018 Christopher Baines +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (a= t +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages antivirus) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages autotools) + #:use-module (gnu packages check) + #:use-module (gnu packages compression) + #:use-module (gnu packages curl) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) + #:use-module (gnu packages tls) + #:use-module (gnu packages web) + #:use-module (gnu packages xml)) + +(define-public clamav + (package + (name "clamav") + (version "0.100.2") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/Cisco-Talos/clamav-devel/archive= /clamav-" + version ".tar.gz")) + (sha256 + (base32 + "0wpamsp3lhlj9dhj5s9nzbyvhrbbnyifm8cjvnssh80sdmkd0dqf")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "win32") + (delete-file-recursively "libclamav/c++/llvm") + #t)))) + (build-system gnu-build-system) + (arguments + '(;; TODO Tests seem to fail, not sure why yet. + #:tests? #f + #:make-flags '("VERBOSE=3D1") + #:configure-flags (list "--enable-check" + "--with-dbdir=3D/var/lib/clamav" + "--sysconfdir=3D/etc/clamav" + "--with-system-libmspack" + "--without-included-ltdl" + (string-append "--with-zlib=3D" + (assoc-ref %build-inputs + "zlib")) + (string-append "--with-libjson=3D" + (assoc-ref %build-inputs + "json-c")) + (string-append "--with-xml=3D" + (assoc-ref %build-inputs + "libxml2")) + (string-append "--with-libcurl=3D" + (assoc-ref %build-inputs + "curl")) + (string-append "--with-openssl=3D" + (assoc-ref %build-inputs + "openssl"))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-source + (lambda _ + (substitute* "Makefile.in" + ;; Prevent writing to /etc upon install, instead the samp= le + ;; files are copied in to the output in the 'install-etc = phase + ((" etc ") " ")))) + (add-after 'install 'install-etc + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (etc (string-append out "/etc"))) + (for-each (lambda (file) + (install-file file etc)) + (find-files "etc" ".*\\.sample")))))))) + (native-inputs + `(("check" ,check))) + (inputs + `(("openssl" ,openssl) + ("libmspack" ,libmspack) + ("libltdl", libltdl) + ("json-c" ,json-c) + ("ncurses" ,ncurses) + ("perl" ,perl) + ("pcre2" ,pcre2) + ("libxml2" ,libxml2) + ("curl" ,curl) + ("zlib" ,zlib))) + (synopsis "Antivirus engine for viruses and other malicious software= ") + (description + "Clam AntiVirus is an anti-virus toolkit, for detecting trojans, vi= ruses, +malware and other malicious software. This package provides a flexible = and +scalable multi-threaded daemon, a command-line scanner and a tool to fet= ch +up-to-date virus definitions.") + (home-page "https://www.clamav.net/") + (license + (list license:gpl2 ;; clamav-milter, clambc, clamconf, clamd, clamd= scan, + ;; libclamav, libfreshclam + license:gpl2+ ;; many files + ;; some files in libclamav + bsd-2 zlib asl2.0)))) --=20 2.19.0