summaryrefslogtreecommitdiff
path: root/app-antivirus
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-antivirus
reinit the tree, so we can have metadata
Diffstat (limited to 'app-antivirus')
-rw-r--r--app-antivirus/clamav-unofficial-sigs/Manifest9
-rw-r--r--app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild89
-rw-r--r--app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-5.6.1.ebuild60
-rw-r--r--app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.875
-rw-r--r--app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.logrotate4
-rw-r--r--app-antivirus/clamav-unofficial-sigs/metadata.xml11
-rw-r--r--app-antivirus/clamav/Manifest27
-rw-r--r--app-antivirus/clamav/clamav-0.98.7-r1.ebuild139
-rw-r--r--app-antivirus/clamav/clamav-0.98.7.ebuild138
-rw-r--r--app-antivirus/clamav/clamav-0.99.1.ebuild145
-rw-r--r--app-antivirus/clamav/clamav-0.99.2-r1.ebuild154
-rw-r--r--app-antivirus/clamav/clamav-0.99.2.ebuild147
-rw-r--r--app-antivirus/clamav/clamav-0.99.ebuild146
-rw-r--r--app-antivirus/clamav/files/clamav-0.99-zlib.patch22
-rw-r--r--app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch84
-rw-r--r--app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch23
-rw-r--r--app-antivirus/clamav/files/clamav-milter.README.gentoo44
-rw-r--r--app-antivirus/clamav/files/clamav-milter.service12
-rw-r--r--app-antivirus/clamav/files/clamav-milter.service-r113
-rw-r--r--app-antivirus/clamav/files/clamav.logrotate17
-rw-r--r--app-antivirus/clamav/files/clamd.conf9
-rw-r--r--app-antivirus/clamav/files/clamd.conf-r17
-rw-r--r--app-antivirus/clamav/files/clamd.initd-r6128
-rw-r--r--app-antivirus/clamav/files/clamd.service7
-rw-r--r--app-antivirus/clamav/files/clamd_at.service9
-rw-r--r--app-antivirus/clamav/files/freshclamd.service10
-rw-r--r--app-antivirus/clamav/files/tmpfiles.d/clamav.conf1
-rw-r--r--app-antivirus/clamav/metadata.xml19
-rw-r--r--app-antivirus/metadata.xml35
-rw-r--r--app-antivirus/skyldav/Manifest11
-rw-r--r--app-antivirus/skyldav/files/skyldav-conf.patch21
-rw-r--r--app-antivirus/skyldav/files/skyldav-examples.patch11
-rw-r--r--app-antivirus/skyldav/files/skyldav.confd10
-rwxr-xr-xapp-antivirus/skyldav/files/skyldav.initd25
-rw-r--r--app-antivirus/skyldav/files/skyldav.service-r115
-rw-r--r--app-antivirus/skyldav/files/skyldav.service.conf3
-rw-r--r--app-antivirus/skyldav/files/skyldav.tmpfilesd2
-rw-r--r--app-antivirus/skyldav/metadata.xml11
-rw-r--r--app-antivirus/skyldav/skyldav-0.7.ebuild107
39 files changed, 1800 insertions, 0 deletions
diff --git a/app-antivirus/clamav-unofficial-sigs/Manifest b/app-antivirus/clamav-unofficial-sigs/Manifest
new file mode 100644
index 000000000000..834791082cea
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/Manifest
@@ -0,0 +1,9 @@
+AUX clamav-unofficial-sigs.8 4568 SHA256 6bd8774a3ae3d054f3a9cd8b525e13ddbe32d33fc46fa88733f5430e51fcb5de SHA512 8e688281c6918ea8c13f5d76c63fee65b6e3378ca1d2e92033a741b7f02d12607d838484075e0d3ae8d99680a5b235acee062fc80c63f7e5577cfee575b56573 WHIRLPOOL 471b5ae57e9918037da3b5e5cbba3edd835aab2be8d3241397a642f1fb53052f389ad69e46d745536024afda8209f85a691901ef6898e450cacc66bc812f6ea7
+AUX clamav-unofficial-sigs.logrotate 109 SHA256 48d181052c53f96b13b28b282d15af5794c69125e5c682dfa22a3632c5b34d58 SHA512 3d79caf1bbc29218aacda9c6c411b6b9e827644c3a89a3a1b9e0d89baeb7927cdbda3322c9b5a5186e53f0efa598e165d10cfa698936a687bd6279f6e3866830 WHIRLPOOL 6b19327c5b571f8862c4ddbe4f9dddf940b2359629e3b1d11e89865dc64e9025af69140b882e2615844d45b382e0c6f25d74a3a8371c26ce08aaaa15b8176dff
+DIST clamav-unofficial-sigs-3.7.2.tar.gz 38549 SHA256 96e98e6e4434c5950fa9831c6a43236fed7eabae44beded16171305cf3f9bdb9 SHA512 ee07bf521cca229bc85acb887c8e520149955732797a9d220e24f09cb9e89f9bd189ad77dc781c03c60bdaaec2bfa91a6c96cf7a0b689759cddf3ff231b8b0a4 WHIRLPOOL af4925c8a9bb8c09472131f98026b809da13e122a530c4a48614014b8156a259d37303cb1042da98d0bd8b0f4abef3cd7c05f2d549f87e1b7cd533d4a8d4d188
+DIST clamav-unofficial-sigs-5.6.1.tar.gz 51024 SHA256 5c26410470e1010d0bd167fc8ae75a7035c6c0977f2f0af1da4b004064e43c81 SHA512 a3660abe301e96104393d337ff2b7f73324241bb921d71626e4a6ea4cec39709ce76dbb9432fd048c66441f0acbb1b92fa561397669ffdca98f463d7da8e7402 WHIRLPOOL fac1394ace0ae81ba1b57dab54aef659b8d58716341d5962f07d97fe7487acec3d994d52073b989128adcf2e43991aef277db166048d7bbd328595b2cecdf3ad
+EBUILD clamav-unofficial-sigs-3.7.2.ebuild 2808 SHA256 d937c17410654cc27588710f34b53e4a6ab85e2c87b487b4da558ce4c869dfb1 SHA512 2174641a412029828d0746c89c5b98074a74da636cd1de3e8f9a589708917b684a1a73625a2e9ebb064297a62cbb8572c62f2ca55eb568b4e5c0b9ff7d995a34 WHIRLPOOL d64d25d4b6ebfab0ff53756012cb6ce3833d74711297149a95d67825c2a4c3b852afa6f58d0e43929306828d217a28eab2f1a6404f0f259b6d661917a4916f96
+EBUILD clamav-unofficial-sigs-5.6.1.ebuild 1607 SHA256 d11a4182c57a53908e0181b6a5c072ce0cd404a055a6bf0898a06e17a3cb9e44 SHA512 6a601824bc1aba3e6f9af85a6a381075cdecbdaee6ebe3feda4dc6c11b83e97e5b67409b190b114e8cbca1daf8e16ce121956beb4200ef44791dbe023f9960fb WHIRLPOOL a01a5a07fb74cb64f6a48b0bd020998c70f72b18c0a16b9f42d9c783cec144b3c157b8f71eaf2a7e2c52f70fe2e5640bfde01394e19113a5a7f1e240cd330877
+MISC ChangeLog 5027 SHA256 aac524ea5d70f589af14d8e60261d802542133af926765c9c9f1b8ee63801584 SHA512 c8330e7abc59677996a312b902e7d214f3b7d7001141579297c6c0041f7063b15f312da383cddee10e29267022f8c865f7ab5e498f572ca053902f799d2c89e7 WHIRLPOOL de65baa392293aff6b3f43e1851f6987ff4feae43a57c2e043e6a607976b8bc0842d256d1fbe01fa23ba5cd5230cfcbbfdafd05b1ffc5a41ca69febb5a7da4f2
+MISC ChangeLog-2015 1003 SHA256 5ad0d278eb740a31c71ac03d700cd1960ad53d49e682b58613770e5f0bd9242a SHA512 a6d171097d010cdb4a4b93bbd5396faed7fe6b8b6908ddddb418d52309532caa9c638411d9cf919017d7e9c912f1a9703f5eaa0a53bfb5e7278a24f3cb456432 WHIRLPOOL 5ad9249c8fcd762d2aa6e7303adf80d4b4d4ff194aedaaf54484ca8a7d430843b184c72982ef9d9cc16320b8e9fb549597e7c9a35ebeda89e5b284654a6eaede
+MISC metadata.xml 383 SHA256 f703f540e3e956de8b940027dcd182ae8c736ec83455dc411fb4055489463401 SHA512 05f6d2f4047ee61b977dc999baae20c7b607bd22182c23a1a9435c1e9a3e5c5a13189cc9976a01d4dc4f82024d907804e8263c4cbbfa1f8c994ea30a1e74addc WHIRLPOOL f816b8258c84812da356a11f6fca1a29551af0735876d35c52368c0e05bcaddef918bd810249bf39a3055245d715668528afbc688c7e6b0d3a853ee8db0dbfef
diff --git a/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild
new file mode 100644
index 000000000000..6eddf2b6683e
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Downloads and installs third-party clamav signatures"
+HOMEPAGE="https://sourceforge.net/projects/unofficial-sigs"
+SRC_URI="mirror://sourceforge/unofficial-sigs/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+# We need its user/group.
+DEPEND="app-antivirus/clamav"
+
+# The script relies on either net-misc/socat, or Perl's
+# IO::Socket::UNIX. We already depend on Perl, and Gentoo's Perl ships
+# with IO::Socket::UNIX, so we can leave out net-misc/socat here.
+RDEPEND="${DEPEND}
+ app-crypt/gnupg
+ dev-lang/perl
+ net-dns/bind-tools
+ net-misc/curl"
+
+src_prepare() {
+ # First, fix the paths contained in the configuration file. Eventually
+ # these should be moved under /run, but for now we keep them sync'ed
+ # with the default clamd.conf.
+ local pid_default="/var/run/clamd.pid"
+ local pid_gentoo="/var/run/clamav/clamd.pid"
+
+ # clamd listens on a local socket by default. The clamd_socket
+ # setting needs to be uncommented in the configuration file for it
+ # to take effect.
+ local socket_default="#clamd_socket=\"/var/run/clamd.socket\""
+ local socket_gentoo="clamd_socket=\"/var/run/clamav/clamd.sock\""
+
+ sed -i -e '$a\pkg_mgr="emerge"' \
+ -e "\$a\\pkg_rm=\"emerge -C ${PN}\"" \
+ -e "s~${socket_default}~${socket_gentoo}~" \
+ -e "s~${pid_default}~${pid_gentoo}~" \
+ "${PN}.conf" \
+ || die "failed to update paths in the ${PN}.conf file"
+
+ # Now, change the script's working directory to point to
+ # /var/lib/${PN}. We'll need to make this writable by the clamav
+ # user during src_install.
+ sed -i -e "s~/usr/unofficial-dbs~/var/lib/${PN}~" "${PN}.conf" \
+ || die "failed to update the work_dir variable in ${PN}.conf"
+
+ # Tell the script that it's been configured.
+ local cfged_default='user_configuration_complete="no"'
+ local cfged_gentoo='user_configuration_complete="yes"'
+ sed -i "s/${cfged_default}/${cfged_gentoo}/" "${PN}.conf" \
+ || die "failed to set user configuration completed in ${PN}.conf"
+}
+
+src_install() {
+ dosbin "${PN}.sh"
+
+ # We set the script's working directory to /var/lib/${PN} in
+ # src_compile, so make sure that the permissions are set correctly
+ # here. By default, it runs as clamav/clamav.
+ diropts -m 0755 -o clamav -g clamav
+ dodir "/var/lib/${PN}"
+
+ insinto /etc/logrotate.d
+ doins "${PN}-logrotate"
+
+ insinto /etc
+ doins "${PN}.conf"
+
+ doman "${PN}.8"
+ dodoc CHANGELOG INSTALL README
+}
+
+pkg_postinst() {
+ elog ''
+ elog "You will need to select databases in /etc/${PN}.conf."
+ elog "For details, please see the ${PN}(8) manual page."
+ elog ''
+ elog 'An up-to-date description of the available Sanesecurity'
+ elog 'databases is available at,'
+ elog ''
+ elog ' http://sanesecurity.com/usage/signatures/'
+ elog ''
+}
diff --git a/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-5.6.1.ebuild b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-5.6.1.ebuild
new file mode 100644
index 000000000000..eb77bf7756be
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-5.6.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Download and install third-party clamav signatures"
+HOMEPAGE="https://github.com/extremeshok/${PN}"
+SRC_URI="${HOMEPAGE}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# We need its user/group.
+DEPEND="app-antivirus/clamav"
+
+# The script relies on either net-misc/socat, or Perl's
+# IO::Socket::UNIX. We already depend on Perl, and Gentoo's Perl ships
+# with IO::Socket::UNIX, so we can leave out net-misc/socat here.
+RDEPEND="${DEPEND}
+ app-crypt/gnupg
+ dev-lang/perl
+ net-dns/bind-tools
+ || ( net-misc/wget net-misc/curl )"
+
+src_install() {
+ dosbin "${PN}.sh"
+
+ # The script's working directory (set in the conf file). By default,
+ # it runs as clamav/clamav.
+ diropts -m 0755 -o clamav -g clamav
+ dodir "/var/lib/${PN}"
+
+ insinto /etc/logrotate.d
+ doins "${FILESDIR}/${PN}.logrotate"
+
+ insinto "/etc/${PN}"
+ doins config/{master,user}.conf
+ newins config/os.gentoo.conf os.conf
+
+ doman "${FILESDIR}/${PN}.8"
+ dodoc README.md
+}
+
+pkg_postinst() {
+ elog ''
+ elog "You will need to select databases in /etc/${PN}/master.conf."
+ elog "For details, please see the ${PN}(8) manual page."
+ elog ''
+ elog 'An up-to-date description of the available Sanesecurity'
+ elog 'databases is available at,'
+ elog ''
+ elog ' http://sanesecurity.com/usage/signatures/'
+ elog ''
+ ewarn 'The configuration file has moved in the 5.x version!'
+ ewarn "You should migrate your config from /etc/${PN}.conf to"
+ ewarn "/etc/${PN}/master.conf"
+ ewarn ''
+}
diff --git a/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.8 b/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.8
new file mode 100644
index 000000000000..d7cd1926f2fa
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.8
@@ -0,0 +1,75 @@
+
+.\" Manual page for eXtremeSHOK.com ClamAV Unofficial Signature Updater
+.TH clamav-unofficial-sigs 8 "07 May 2016" "Version: 5.3.0" "SCRIPT COMMANDS"
+.SH NAME
+clamav-unofficial-sigs \- Download, test, and install third-party ClamAV signature databases.
+.SH SYNOPSIS
+.B clamav-unofficial-sigs
+.RI [ options ]
+.SH DESCRIPTION
+\fBclamav-unofficial-sigs\fP provides a simple way to download, test, and update third-party signature databases provided by Sanesecurity, FOXHOLE, OITC, Scamnailer, BOFHLAND, CRDF, Porcupine, Securiteinfo, MalwarePatrol, Yara-Rules Project, etc. It will also generate and install cron, logrotate, and man files.
+.SH UPDATES
+Script updates can be found at: \fBhttps://github.com/extremeshok/clamav-unofficial-sigs\fP
+.SH OPTIONS
+This script follows the standard GNU command line syntax.
+.LP
+\fB Usage: clamav\-unofficial\-sigs.sh \fR [OPTION] [PATH|FILE]
+.TP
+\fB \-c, \-\-config \fR Use a specific configuration file or directory eg: '\-c /your/dir' or ' \-c /your/file.name' Note: If a directory is specified the directory must contain atleast: master.conf, os.conf or user.conf Default Directory: configgentoo
+.TP
+\fB \-F, \-\-force \fR Force all databases to be downloaded, could cause ip to be blocked
+.TP
+\fB \-h, \-\-help \fR Display this script's help and usage information
+.TP
+\fB \-V, \-\-version \fR Output script version and date information
+.TP
+\fB \-v, \-\-verbose \fR Be verbose, enabled when not run under cron
+.TP
+\fB \-s, \-\-silence \fR Only output error messages, enabled when run under cron
+.TP
+\fB \-d, \-\-decode\-sig \fR Decode a third\-party signature either by signature name (eg: Sanesecurity.Junk.15248) or hexadecimal string. This flag will 'NOT' decode image signatures
+.TP
+\fB \-e, \-\-encode\-string \fR Hexadecimal encode an entire input string that can be used in any '*.ndb' signature database file
+.TP
+\fB \-f, \-\-encode\-formatted \fR Hexadecimal encode a formatted input string containing signature spacing fields '{}, (), *', without encoding the spacing fields, so that the encoded signature can be used in any '*.ndb' signature database file
+.TP
+\fB \-g, \-\-gpg\-verify \fR GPG verify a specific Sanesecurity database file eg: '\-g filename.ext' (do not include file path)
+.TP
+\fB \-i, \-\-information \fR Output system and configuration information for viewing or possible debugging purposes
+.TP
+\fB \-m, \-\-make\-database \fR Make a signature database from an ascii file containing data strings, with one data string per line. Additional information is provided when using this flag
+.TP
+\fB \-t, \-\-test\-database \fR Clamscan integrity test a specific database file eg: '\-s filename.ext' (do not include file path)
+.TP
+\fB \-o, \-\-output\-triggered \fR If HAM directory scanning is enabled in the script's configuration file, then output names of any third\-party signatures that triggered during the HAM directory scan
+.TP
+\fB \-w, \-\-whitelist \fR Adds a signature whitelist entry in the newer ClamAV IGN2 format to 'my\-whitelist.ign2' in order to temporarily resolve a false\-positive issue with a specific third\-party signature. Script added whitelist entries will automatically be removed if the original signature is either modified or removed from the third\-party signature database
+.TP
+\fB \-\-check\-clamav \fR If ClamD status check is enabled and the socket path is correctly specifiedthen test to see if clamd is running or not
+.TP
+\fB \-\-install\-all \fR Install and generate the cron, logroate and man files, autodetects the values based on your config files
+.TP
+\fB \-\-install\-cron \fR Install and generate the cron file, autodetects the values based on your config files
+.TP
+\fB \-\-install\-logrotate \fR Install and generate the logrotate file, autodetects the values based on your config files
+.TP
+\fB \-\-install\-man \fR Install and generate the man file, autodetects the values based on your config files
+.TP
+\fB \-\-remove\-script \fR Remove the clamav\-unofficial\-sigs script and all of its associated files and databases from the system
+.TP
+.SH SEE ALSO
+.BR clamd (8),
+.BR clamscan (1)
+.SH COPYRIGHT
+Copyright (c) Adrian Jon Kriel :: admin@extremeshok.com
+.TP
+You are free to use, modify and distribute, however you may not remove this notice.
+.SH LICENSE
+BSD (Berkeley Software Distribution)
+.SH BUGS
+Report bugs to \fBhttps://github.com/extremeshok/clamav-unofficial-sigs\fP
+.SH AUTHOR
+Adrian Jon Kriel :: admin@extremeshok.com
+Originially based on Script provide by Bill Landry
+
+
diff --git a/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.logrotate b/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.logrotate
new file mode 100644
index 000000000000..1d18581588de
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.logrotate
@@ -0,0 +1,4 @@
+/var/log/clamav-unofficial-sigs/clamav-unofficial-sigs.log {
+ create 0640 clamav clamav
+ missingok
+}
diff --git a/app-antivirus/clamav-unofficial-sigs/metadata.xml b/app-antivirus/clamav-unofficial-sigs/metadata.xml
new file mode 100644
index 000000000000..cb13edbbb596
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mjo@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">unofficial-sigs</remote-id>
+ <remote-id type="github">extremeshok/clamav-unofficial-sigs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest
new file mode 100644
index 000000000000..51849eff9e5f
--- /dev/null
+++ b/app-antivirus/clamav/Manifest
@@ -0,0 +1,27 @@
+AUX clamav-0.99-zlib.patch 805 SHA256 eff89272cfd0cb224f850b3ee2fbe50cb852b0120323f3874b4bfbcd1ea34c0f SHA512 42ca7fddcf0b8dbe4cbaf0076271df0806806e5e5d4c33e65b643d063ca7744f147abc379dd7475692d15e22cd991a286769013bfbf843158072140d3f3dc310 WHIRLPOOL 3065ee973ad1c5f435aa7e1aa4e2cd2271e1bd810a94fd64fbefa995c57be0e73b8108f457761b329bd5d05d6029de407ec815b8332920e3bf30589256012cf5
+AUX clamav-0.99.2-gcc-6.patch 4476 SHA256 b2960553243392a4298f37d5ef537296e989e95f7cc084800b8e3ab6a251be6d SHA512 b30ed8b888af3697294c1a2aa96a335b3b1035f4f76e3bcf6c243dca7bdc5921a9bb182fbfd5e0e7f1bb9dce93b2312927e28f78edae466d31200a2be50f3a85 WHIRLPOOL a3a03f600edc287984aedcdf23369071691022a78f192d0ee5d9eec14243fcac26f9b7189fbd3baa8d4ab2906e8db37a427d60c8dae4fc5b835f44a308f22cc3
+AUX clamav-0.99.2-tinfo.patch 656 SHA256 6e68af3dcc41a693ca5f8a191a59a732e014c42ea58e902d62799f3cbc20c7e3 SHA512 33e375e8f4e74f284e9d14adaa8ef095bdb67b2f62e4b7c5e9c38a3c5f955106173e402859fabf44ada40ae08cceb3fca79322f8854f47d850816064641f4451 WHIRLPOOL d0ea141ca3495316dd462c30ee6311e9dc5d752c60e50b1f825c5b7a367d8ab8a7cb9d16574c35b7de901096811098ddbf77189595c7dda7c75b267f6a7aaeae
+AUX clamav-milter.README.gentoo 1124 SHA256 5e7b142b68964bc3463b077e5698fa77cace45ea9612258b1e1849cee944dd11 SHA512 1c6160e48eddd28f83ec5f24757f788781cef55789d1934dfccc12c7c5e5635a226d26b0983cab7344c142f5a2f1db172640b1d0e6c840a6fa83abed9be1211a WHIRLPOOL f85b17448fd93205e2f38d024b96410cc8d143d077201e0a1b8f4cda95ae2447a70eded4cb90968a593ad2637229300fa04bfe5dba96d3d68c2d09c105ee3f16
+AUX clamav-milter.service 284 SHA256 b371725acfd102b6b7ee15ab0059e8795b7d3716d041d0dc11d0fe8f7454d5a9 SHA512 442148ac3c42ecbb893de5c6edde337b72a745d20f6c5ffa33131f9a0b2daadcffac39b686ada986a5ab500ea7b9153c448abc1b819e15fef488da1812bb0cee WHIRLPOOL 56b4ed79e06c764df37022f0638ceddb5fe8185c54b2e460b076a46ed4f5a68b67fb7966d424dabe836bfd7d6b9d770eb60cad4633ee17083baa50ad2c0a89cd
+AUX clamav-milter.service-r1 303 SHA256 c1e553156c14bfb007df467c13be0b3885ea79b4777711b6417fac5371461d90 SHA512 5dc30e3c57d9bff6595155e8299336c579c713aed429ab770f10d7678dd74691a135aa2070a825ddb726fdabcb001c19caeb993c1cd9a6fcf95d1d47f7160540 WHIRLPOOL d2cb6e8caa83845d2f9ca7ffd7f2d0382a633a34463599515d46dcfde87fadfffdeed62f4763b5f519268bd03b99c49c19c3196359eab06062866ca38f96d680
+AUX clamav.logrotate 391 SHA256 ed58224e76d6555e737780dc3985e2b29267328458302f116eae9ebfdc3cd11f SHA512 ef54facfa0ad830ea6eef499b92a1ffb37e719940385621dacd17062e556aa0d1f24104b3130a9a263f23621ab53f39283c10870a355ed6d505cc0e511b57224 WHIRLPOOL e6195dd3c51c27c437ff88a1283cb9eb12a9bad3266261e9d26cbc33d0b4e3afa2d9c624898ba2bf6557ac46de74c09a7b210de8bd1189babd4d0fcbd6ba84ed
+AUX clamd.conf 234 SHA256 17bf4fe3596dc5b145e4163d85181e2edcaa214df3cf9072d852ba0e7a569891 SHA512 ec069cf7aaf10b42a701938b57e1fde1ee15afd1d4af928edfa7e5d505ba8b3edaaceac449da0f4ac6beea09a3fb73453526ba0cd3a04e13259c1a2720f42f78 WHIRLPOOL 667ad1567bb398a20785096f2c2c7c72be4853ee3b0674c4fcc20eb2c9123815c273f40938961e348252e3376c4402a3f952b2a72d3bb3f0907aadb7ab77b8ed
+AUX clamd.conf-r1 129 SHA256 28ebd47810b0568fc7692218867d6804a1df70290681462f5555e230ca817732 SHA512 b85fd99c80242fb66380dfdef34387a2eff9326a1cb726940ab4bc450308e4942e57d1eb1cad979348f8aac685b53e2fa722cef0dab1f2ea2c958f2a5f818918 WHIRLPOOL 44f1e0b678855db44123261402c4e82e0493a60869bcf0a7ebcc5c4db23072efba3f550ee115b5c49a688895b67e1d012defb36c4aa0564732a2642d78f72695
+AUX clamd.initd-r6 3253 SHA256 7b502b8ca6672ee85d67e6c2e210118b05cee8170ebab4308df192f0f8064de3 SHA512 cf2bda1e12af495d1a3d05fb4b92da4e2ccf0369f1b33382cc6cc21f31c68fa74a1f95ff098bdc6ebfb994aad1e72173437a80bd0e0e7c3223add26a824d9b6b WHIRLPOOL e26ed038b16cae246b53754d01622463d579cf1a4802b0d8aedf4ee7beb6eed6ce42518538835c15603a0c9bc96872a0edf2a19d3303375ab4ec3f6287986a95
+AUX clamd.service 136 SHA256 d50b2d7b291e1d03f142e0b113a90c600cf5a0f73f1a4847d8cf0528902728dd SHA512 2080e96e84d15d1ef4c670579ddca5bc9608c8e8564cd43fcd9d464d97c253eb89ca3ebbf3a6a799b31a6c6321ea8beeb386cbefbccbe5f097dbc492900dc2aa WHIRLPOOL 612ff77805a2ede8c526c798f3b5658ea5be5006d526eb7735750a1b86186c2214c34ba4658e3567845c503a0575cc15519ff5c9294be939cd200bf2c691a2f6
+AUX clamd_at.service 190 SHA256 7fb3eb55fbb0bff9884aa943ffc6439e328bc0e4a607c1615c924be9c3711c30 SHA512 b5121bfe761d21152356c8b1e0f0974a9c0bb9002b3d5b1af1c7940d94314250a4890388876b150b0f071c24b7261b93bbc9a6b94b896294c549fe6b572ee70a WHIRLPOOL d58f1d19de54183224ecccc78f9968473c8b891c6ce1f5a9045c1a1db962c152a4b22f58dc55ae54a3b21df20a422e173143e6b893a8913e7f038904e991cce6
+AUX freshclamd.service 191 SHA256 dd5ff6c79ee360da5f2221c4d9110a2a8886d86293f6c93c16bf74fdb126593c SHA512 aaf78e763d2aa9c17fc95edb1550547b6681a91fd239a86535e5193d36ff0e152c51c3a3957542f80d5b170805f296159958ac347886981ddd324bec4237da92 WHIRLPOOL f3d5273151e6cc0b2a245db07ea526b9a7d051efcfa902924ca63529618318524c359fb638b10caed38313f93fc283175ae9d2ec9314556593d818518931512c
+AUX tmpfiles.d/clamav.conf 33 SHA256 893bda174539a1a2ffc7f713f563d172593d9707da5c49e6c151832c57da6846 SHA512 eabe5a94c2679b82ea3e29272eb448b47e60b271381d3e97f3970b1a9e086d61662aff2d29887950a911025294aa7cea8bfd9003d257963566b251bcaeb5f6b2 WHIRLPOOL 74d92a4a54f6d38bd752ff46ed494abc823781f41e7663468cd94125076538a4a315808fd0efd2e988d94dcfb05251aef194225cb4bbc1cf05c23fcb491d7e98
+DIST clamav-0.98.7.tar.gz 15118851 SHA256 282417b707740de13cd8f18d4cbca9ddd181cf96b444db2cad98913a5153e272 SHA512 acf01961472c13ccb219420cc3fa3c3e6f8a733edef371dbc04ce5867900aa1535e956ec8ad50d31c8f872a0a1d79fcccac944cd86e29ecdfa4af18f7fd5afb9 WHIRLPOOL c9f2e6f52f07f68bdcccf55ca1aab0bf3deaa6963279459d64ecca076a9ed0ef53c25996b2b673e9746833822df24689a9fab0654064c5ee6ed372a86966fbb6
+DIST clamav-0.99.1.tar.gz 15990867 SHA256 e144689122d3f91293808c82cbb06b7d3ac9eca7ae29564c5d148ffe7b25d58a SHA512 9beb5c0ebff2aef741bb27811c1f10a7cd5da354ff67272ee8994d87c95e272a5983105af0fe1a734e1fa99f112dc4dddd9d82074a0df6715814817f85a45f4f WHIRLPOOL e2afd7b7d377c1a1af802e780839bb21bcd318035ac858b6cb11545db3673d3f74ba3159b837238982248720379f98ab51e279a8636bbea89331136891e88e5d
+DIST clamav-0.99.2.tar.gz 16067497 SHA256 167bd6a13e05ece326b968fdb539b05c2ffcfef6018a274a10aeda85c2c0027a SHA512 7744ba8a344b163cf98e9737cddfd25d2120b34ee9c4518380e028c9ec3cd50127b198b0dfa9fde30f5ce9aab0c0e6384712fbc11287e77d16ce052fd7b6ac44 WHIRLPOOL 371dc56c3ffa0ff40381d451687a9331a0587943a048604c6667e1018fbfe5559b023654d29f47505bd69a1a44f88adfb5b93b7c55c8cbc6f0bbfcbf836bf631
+DIST clamav-0.99.tar.gz 15968038 SHA256 d2792c8cfadd685fffc40b2199679628815df031fd3149ccf961649fc8787ea9 SHA512 328e66fa412ba61f5e44c839b254c7a84d2ce7821fda6cf29e4ee9532c06e45bdec62f202ca561223e984fff170bfd8280e5cc8e306c09a3017b17e7db3bbf56 WHIRLPOOL 696b425c0d3a6639d627e6dba000a57c4e532232f9f42a564a992c0b459d8041a1947b09548d99b621a5685c78d91045adf4b61731242f55eda2b8d5150fc8b8
+EBUILD clamav-0.98.7-r1.ebuild 4690 SHA256 a674ef28eb1196cd47c614fc139a748d13e63d60a40c9523cfb2e18d788b3a0e SHA512 9fbf9f8d7915192590878794cf65903cb82a6e6485c5bcc683b65eba7d7f6df84d32a88b5d347d10b6101765d948b49e3d7de6f2464e660529aedbb36998c1ae WHIRLPOOL 6a1a1b94f10a578d02a36b24acd51a0a2cefe3c9d4683be2352ecd752d19ae98b8c57c539080d023ce684b42bd958ddc531f9b592faae611a6ac3ff3202ec2c2
+EBUILD clamav-0.98.7.ebuild 4619 SHA256 f75ea42d78cefaadb8f4062b82b45892a6bfdf9f8a9d9c419f617c5c0908c5e1 SHA512 d9284478227cca2739493a3d3b36fa32ce55065252646b9efde32579cc28e15a29f735403c749e1f2090a64563d0513bb492160a10e560b5d677528fe714e6b4 WHIRLPOOL aec491c617eb46a819014968523b7274f5a4ab16007b6598f1d85ed0f95af5e699e75b35d245b4171d059613e2714bfd794acd48df4f670ac6d9c803cc86f97f
+EBUILD clamav-0.99.1.ebuild 4903 SHA256 b3656af40aa566275642fca75b347212862459c0846b5539b37e7997fe05447c SHA512 709c6ecfb5bc7b16b2f91872b00c332e0ba5b1471fa087afd4b919270c414d853f58bcc63959bcc72b793443dc1d6435490f457e1e49d6de60595f61fee7ebc8 WHIRLPOOL f06bbce2cb189e071a0cd5f756ead20863acd1fd771a1b371f0c702ee583f875326c114f066df52d5bfd80b76771414196f5dbd7780b643ed9371bd149fc3d62
+EBUILD clamav-0.99.2-r1.ebuild 5069 SHA256 7e9a6fce86be7858fbf3f6c164e4b39f0b926b8193a380be1dc98fab43c09abf SHA512 972b23b50c893d14b3bfa1330c5aed53342965ce63352dbe18d0b61eea7ef19a9acdbd08dca185b58bf40936fbb00a96a0e627ca4360e309c16a28c3d8e76b50 WHIRLPOOL 86aa839680432efc2fb52c54f4570b6ca50bb29fe2f519f91b927c9edeefaa96cff33a0a6c6a22db951247252a23df6df19ded34c68af6df104cfc9f5c3849eb
+EBUILD clamav-0.99.2.ebuild 5009 SHA256 caa8fd1c6a3dde13ba1585de3b4ce7b4d0885b339dd7284eb0ae70faa37b92cd SHA512 4d129d4bdbc8af11f73784a3539a7e8f2332b77954268390f6e4c7fff493549344e6bd4144123e808a1e3760f5ee08dcb840a5218606464a8662198ecbac5cc0 WHIRLPOOL adaf6e5670333d1822381a7d43ce2da9282e9d5669024f757618a220139effbd81a51767f0736122dcc50c736964ea613c6a611c78408239136754c8fdee2fa2
+EBUILD clamav-0.99.ebuild 4915 SHA256 7a0a594d27dc09dfc4fab0540978d0e04e4a6fe6450328a65503e60e4017e684 SHA512 916034c7a2114ef083ae138b9f486dcf0b9d29e994ee6a5c7707dc17ee2b3633219fcff20c8af84c4bd1a8d4b4ca565d5285c4a880c435131da2062d198150b2 WHIRLPOOL 6952c43201080be28f45cad32a078e9b95dc76b8aed4db646ea5ec23fedef8e607fdb3e5f1d5f10785e7867f20e8cb800f6813847d68f043740f50cffbdb812b
+MISC ChangeLog 6294 SHA256 7d5b82d1330174ad36d3af18038a658ce5668f35dcd60bb5029ccb3a7d9951d1 SHA512 43307bb398211fda355de39ada9b5c4cd61f5758f239137ef367114efb25ed2dcec37cfd97a14150452e43bb1685b507f849d63d955dc430a3b6d19a6205add8 WHIRLPOOL 63ada682fc2f7625f35bd2a58263a35b6f305dfe766527140230f32f3891fca4bad907aa86ba1e85df00fcfc23747bcb80a1548aee303422056f1c89d1facc73
+MISC ChangeLog-2015 73512 SHA256 1cdcd759d5efa454841b840df55cd6cb1116aebf954d97c74f82974690cbf32d SHA512 2e2221c8182d1906d881efb0088fbf1a2ce96d9b2cabc23c96cb92f91faca435cc390f97b7e50f3e22a8c5e2a0c6d090fb851b3faa07dd0814ebc94ba3275f9e WHIRLPOOL 534339178a859bcfa8e2838d70035636136e45392db503fdcf002e2b588e676b8ae43828611c61006baf5b031ad4041f01ba556b4707c2886e28b055ce78e292
+MISC metadata.xml 740 SHA256 d58a717a913d65a333d1b2ba513fe44cad15e59cf5f4b3cbbe0ba9f59a7d4015 SHA512 baff0fa3285a5bfd17b408dc88ad573df07ec4de5e2827d352465347c5ebceb466172c4f369dac5680c927cad3a887a60721358e43b26e8cd7eaf3cebcaba832 WHIRLPOOL c96524c6395f370a56fbe572dbd28f28a3079ec82097757424ec35e73affa357852ded86f627a23433c1d8227c024399b23101f217544c94ae8964e17f27596f
diff --git a/app-antivirus/clamav/clamav-0.98.7-r1.ebuild b/app-antivirus/clamav/clamav-0.98.7-r1.ebuild
new file mode 100644
index 000000000000..88e66bb52c10
--- /dev/null
+++ b/app-antivirus/clamav/clamav-0.98.7-r1.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic user systemd
+
+DESCRIPTION="Clam Anti-Virus Scanner"
+HOMEPAGE="http://www.clamav.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs uclibc"
+
+CDEPEND="bzip2? ( app-arch/bzip2 )
+ clamdtop? ( sys-libs/ncurses:0 )
+ iconv? ( virtual/libiconv )
+ metadata-analysis-api? ( dev-libs/json-c )
+ milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
+ dev-libs/libtommath
+ >=sys-libs/zlib-1.2.2
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ sys-devel/libtool"
+# openssl is now *required* see this link as to why
+# http://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-clamav )"
+
+DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
+
+pkg_setup() {
+ enewgroup clamav
+ enewuser clamav -1 -1 /dev/null clamav
+}
+
+src_prepare() {
+ use ppc64 && append-flags -mminimal-toc
+ use uclibc && export ac_cv_type_error_t=yes
+}
+
+src_configure() {
+ econf \
+ --disable-experimental \
+ --disable-fanotify \
+ --enable-id-check \
+ --with-dbdir="${EPREFIX}"/var/lib/clamav \
+ --with-system-tommath \
+ --with-zlib="${EPREFIX}"/usr \
+ $(use_enable bzip2) \
+ $(use_enable clamdtop) \
+ $(use_enable ipv6) \
+ $(use_enable milter) \
+ $(use_enable static-libs static) \
+ $(use_with iconv) \
+ $(use_with metadata-analysis-api libjson /usr)
+}
+
+src_install() {
+ default
+
+ rm -rf "${ED}"/var/lib/clamav
+ newinitd "${FILESDIR}"/clamd.initd-r6 clamd
+ newconfd "${FILESDIR}"/clamd.conf-r1 clamd
+
+ systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
+ systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
+ systemd_dounit "${FILESDIR}/clamd.service"
+ systemd_dounit "${FILESDIR}/freshclamd.service"
+
+ keepdir /var/lib/clamav
+ fowners clamav:clamav /var/lib/clamav
+ keepdir /var/log/clamav
+ fowners clamav:clamav /var/log/clamav
+
+ dodir /etc/logrotate.d
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/clamav.logrotate clamav
+
+ # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
+ -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
+ -e "s:.*\(User\) .*:\1 clamav:" \
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
+ -e "s:^\#\(LogTime\).*:\1 yes:" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ "${ED}"/etc/clamd.conf.sample || die
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
+ -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
+ -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
+ -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
+ -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ "${ED}"/etc/freshclam.conf.sample || die
+
+ if use milter ; then
+ # MilterSocket one to include ' /' because there is a 2nd line for
+ # inet: which we want to leave
+ dodoc "${FILESDIR}"/clamav-milter.README.gentoo
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
+ -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
+ -e "s:.*\(User\) .*:\1 clamav:" \
+ -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
+ "${ED}"/etc/clamav-milter.conf.sample || die
+ cat >> "${ED}"/etc/conf.d/clamd <<-EOF
+ MILTER_NICELEVEL=19
+ START_MILTER=no
+ EOF
+
+ systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
+ fi
+
+ for i in clamd freshclam clamav-milter
+ do
+ [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
+ done
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use milter ; then
+ elog "For simple instructions how to setup the clamav-milter read the"
+ elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
+ fi
+ if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
+ ewarn "You must run freshclam manually to populate the virus database files"
+ ewarn "before starting clamav for the first time.\n"
+ fi
+}
diff --git a/app-antivirus/clamav/clamav-0.98.7.ebuild b/app-antivirus/clamav/clamav-0.98.7.ebuild
new file mode 100644
index 000000000000..033c5d83c501
--- /dev/null
+++ b/app-antivirus/clamav/clamav-0.98.7.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic user systemd
+
+DESCRIPTION="Clam Anti-Virus Scanner"
+HOMEPAGE="http://www.clamav.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE="bzip2 clamdtop iconv ipv6 milter metadata-analysis-api selinux static-libs uclibc"
+
+CDEPEND="bzip2? ( app-arch/bzip2 )
+ clamdtop? ( sys-libs/ncurses )
+ iconv? ( virtual/libiconv )
+ metadata-analysis-api? ( dev-libs/json-c )
+ milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
+ dev-libs/libtommath
+ >=sys-libs/zlib-1.2.2
+ dev-libs/openssl:0
+ sys-devel/libtool"
+# openssl is now *required* see this link as to why
+# http://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-clamav )"
+
+DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
+
+pkg_setup() {
+ enewgroup clamav
+ enewuser clamav -1 -1 /dev/null clamav
+}
+
+src_prepare() {
+ use ppc64 && append-flags -mminimal-toc
+ use uclibc && export ac_cv_type_error_t=yes
+}
+
+src_configure() {
+ econf \
+ --disable-experimental \
+ --disable-fanotify \
+ --enable-id-check \
+ --with-dbdir="${EPREFIX}"/var/lib/clamav \
+ --with-system-tommath \
+ --with-zlib="${EPREFIX}"/usr \
+ $(use_enable bzip2) \
+ $(use_enable clamdtop) \
+ $(use_enable ipv6) \
+ $(use_enable milter) \
+ $(use_enable static-libs static) \
+ $(use_with iconv) \
+ $(use_with metadata-analysis-api libjson /usr)
+}
+
+src_install() {
+ default
+
+ rm -rf "${ED}"/var/lib/clamav
+ newinitd "${FILESDIR}"/clamd.initd-r6 clamd
+ newconfd "${FILESDIR}"/clamd.conf-r1 clamd
+
+ systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
+ systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
+ systemd_dounit "${FILESDIR}/clamd.service"
+ systemd_dounit "${FILESDIR}/freshclamd.service"
+
+ keepdir /var/lib/clamav
+ fowners clamav:clamav /var/lib/clamav
+ keepdir /var/log/clamav
+ fowners clamav:clamav /var/log/clamav
+
+ dodir /etc/logrotate.d
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/clamav.logrotate clamav
+
+ # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
+ -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
+ -e "s:.*\(User\) .*:\1 clamav:" \
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
+ -e "s:^\#\(LogTime\).*:\1 yes:" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ "${ED}"/etc/clamd.conf.sample || die
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
+ -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
+ -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
+ -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
+ -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ "${ED}"/etc/freshclam.conf.sample || die
+
+ if use milter ; then
+ # MilterSocket one to include ' /' because there is a 2nd line for
+ # inet: which we want to leave
+ dodoc "${FILESDIR}"/clamav-milter.README.gentoo
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
+ -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
+ -e "s:.*\(User\) .*:\1 clamav:" \
+ -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
+ "${ED}"/etc/clamav-milter.conf.sample || die
+ cat >> "${ED}"/etc/conf.d/clamd <<-EOF
+ MILTER_NICELEVEL=19
+ START_MILTER=no
+ EOF
+
+ systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
+ fi
+
+ for i in clamd freshclam clamav-milter
+ do
+ [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
+ done
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use milter ; then
+ elog "For simple instructions how to setup the clamav-milter read the"
+ elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
+ fi
+ if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
+ ewarn "You must run freshclam manually to populate the virus database files"
+ ewarn "before starting clamav for the first time.\n"
+ fi
+}
diff --git a/app-antivirus/clamav/clamav-0.99.1.ebuild b/app-antivirus/clamav/clamav-0.99.1.ebuild
new file mode 100644
index 000000000000..8b65d87de6b2
--- /dev/null
+++ b/app-antivirus/clamav/clamav-0.99.1.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic user systemd
+
+DESCRIPTION="Clam Anti-Virus Scanner"
+HOMEPAGE="http://www.clamav.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs uclibc"
+
+CDEPEND="bzip2? ( app-arch/bzip2 )
+ clamdtop? ( sys-libs/ncurses:0 )
+ iconv? ( virtual/libiconv )
+ metadata-analysis-api? ( dev-libs/json-c )
+ milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
+ dev-libs/libtommath
+ >=sys-libs/zlib-1.2.2
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ sys-devel/libtool
+ >dev-libs/libpcre-6
+ !!<app-antivirus/clamav-0.99"
+# hard block clamav < 0.99 due to linking problems Bug #567680
+# openssl is now *required* see this link as to why
+# http://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-clamav )"
+
+DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
+
+pkg_setup() {
+ enewgroup clamav
+ enewuser clamav -1 -1 /dev/null clamav
+}
+
+src_prepare() {
+ use ppc64 && append-flags -mminimal-toc
+ use uclibc && export ac_cv_type_error_t=yes
+
+ epatch "${FILESDIR}"/${PN}-0.99-zlib.patch # 604650, fixed in upstream HEAD
+ eautoconf
+}
+
+src_configure() {
+ econf \
+ --disable-experimental \
+ --disable-fanotify \
+ --enable-id-check \
+ --with-dbdir="${EPREFIX}"/var/lib/clamav \
+ --with-system-tommath \
+ --with-zlib="${EPREFIX}"/usr \
+ $(use_enable bzip2) \
+ $(use_enable clamdtop) \
+ $(use_enable ipv6) \
+ $(use_enable milter) \
+ $(use_enable static-libs static) \
+ $(use_with iconv) \
+ $(use_with metadata-analysis-api libjson /usr)
+}
+
+src_install() {
+ default
+
+ rm -rf "${ED}"/var/lib/clamav
+ newinitd "${FILESDIR}"/clamd.initd-r6 clamd
+ newconfd "${FILESDIR}"/clamd.conf-r1 clamd
+
+ systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
+ systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
+ systemd_dounit "${FILESDIR}/clamd.service"
+ systemd_dounit "${FILESDIR}/freshclamd.service"
+
+ keepdir /var/lib/clamav
+ fowners clamav:clamav /var/lib/clamav
+ keepdir /var/log/clamav
+ fowners clamav:clamav /var/log/clamav
+
+ dodir /etc/logrotate.d
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/clamav.logrotate clamav
+
+ # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
+ -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
+ -e "s:.*\(User\) .*:\1 clamav:" \
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
+ -e "s:^\#\(LogTime\).*:\1 yes:" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ "${ED}"/etc/clamd.conf.sample || die
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
+ -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
+ -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
+ -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
+ -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ "${ED}"/etc/freshclam.conf.sample || die
+
+ if use milter ; then
+ # MilterSocket one to include ' /' because there is a 2nd line for
+ # inet: which we want to leave
+ dodoc "${FILESDIR}"/clamav-milter.README.gentoo
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
+ -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
+ -e "s:.*\(User\) .*:\1 clamav:" \
+ -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
+ "${ED}"/etc/clamav-milter.conf.sample || die
+ cat >> "${ED}"/etc/conf.d/clamd <<-EOF
+ MILTER_NICELEVEL=19
+ START_MILTER=no
+ EOF
+
+ systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
+ fi
+
+ for i in clamd freshclam clamav-milter
+ do
+ [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
+ done
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use milter ; then
+ elog "For simple instructions how to setup the clamav-milter read the"
+ elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
+ fi
+ if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
+ ewarn "You must run freshclam manually to populate the virus database files"
+ ewarn "before starting clamav for the first time.\n"
+ fi
+}
diff --git a/app-antivirus/clamav/clamav-0.99.2-r1.ebuild b/app-antivirus/clamav/clamav-0.99.2-r1.ebuild
new file mode 100644
index 000000000000..409382855e3c
--- /dev/null
+++ b/app-antivirus/clamav/clamav-0.99.2-r1.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic user systemd
+
+DESCRIPTION="Clam Anti-Virus Scanner"
+HOMEPAGE="http://www.clamav.net/"
+# no longer on sf.net from 0.99.2 onwards
+SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs uclibc"
+
+CDEPEND="bzip2? ( app-arch/bzip2 )
+ clamdtop? ( sys-libs/ncurses:0 )
+ iconv? ( virtual/libiconv )
+ metadata-analysis-api? ( dev-libs/json-c )
+ milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
+ dev-libs/libtommath
+ >=sys-libs/zlib-1.2.2
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ sys-devel/libtool
+ >dev-libs/libpcre-6
+ !!<app-antivirus/clamav-0.99"
+# hard block clamav < 0.99 due to linking problems Bug #567680
+# openssl is now *required* see this link as to why
+# http://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-clamav )"
+
+DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc-6.patch
+ "${FILESDIR}"/${P}-tinfo.patch
+ "${FILESDIR}"/${PN}-0.99-zlib.patch
+)
+
+pkg_setup() {
+ enewgroup clamav
+ enewuser clamav -1 -1 /dev/null clamav
+}
+
+src_prepare() {
+ default
+
+ eautoconf
+}
+
+src_configure() {
+ use ppc64 && append-flags -mminimal-toc
+ use uclibc && export ac_cv_type_error_t=yes
+
+ econf \
+ $(use_enable bzip2) \
+ $(use_enable clamdtop) \
+ $(use_enable ipv6) \
+ $(use_enable milter) \
+ $(use_enable static-libs static) \
+ $(use_with iconv) \
+ $(use_with metadata-analysis-api libjson /usr) \
+ --cache-file="${S}"/config.cache \
+ --disable-experimental \
+ --disable-gcc-vcheck \
+ --disable-zlib-vcheck \
+ --enable-id-check \
+ --with-dbdir="${EPREFIX}"/var/lib/clamav \
+ --with-system-tommath \
+ --with-zlib="${EPREFIX}"/usr
+}
+
+src_install() {
+ default
+
+ rm -rf "${ED}"/var/lib/clamav
+ newinitd "${FILESDIR}"/clamd.initd-r6 clamd
+ newconfd "${FILESDIR}"/clamd.conf-r1 clamd
+
+ systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
+ systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
+ systemd_dounit "${FILESDIR}/clamd.service"
+ systemd_dounit "${FILESDIR}/freshclamd.service"
+
+ keepdir /var/lib/clamav
+ fowners clamav:clamav /var/lib/clamav
+ keepdir /var/log/clamav
+ fowners clamav:clamav /var/log/clamav
+
+ dodir /etc/logrotate.d
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/clamav.logrotate clamav
+
+ # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
+ -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
+ -e "s:.*\(User\) .*:\1 clamav:" \
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
+ -e "s:^\#\(LogTime\).*:\1 yes:" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ "${ED}"/etc/clamd.conf.sample || die
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
+ -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
+ -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
+ -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
+ -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ "${ED}"/etc/freshclam.conf.sample || die
+
+ if use milter ; then
+ # MilterSocket one to include ' /' because there is a 2nd line for
+ # inet: which we want to leave
+ dodoc "${FILESDIR}"/clamav-milter.README.gentoo
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
+ -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
+ -e "s:.*\(User\) .*:\1 clamav:" \
+ -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
+ "${ED}"/etc/clamav-milter.conf.sample || die
+ cat >> "${ED}"/etc/conf.d/clamd <<-EOF
+ MILTER_NICELEVEL=19
+ START_MILTER=no
+ EOF
+
+ systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
+ fi
+
+ for i in clamd freshclam clamav-milter
+ do
+ [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
+ done
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use milter ; then
+ elog "For simple instructions how to setup the clamav-milter read the"
+ elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
+ fi
+ if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
+ ewarn "You must run freshclam manually to populate the virus database files"
+ ewarn "before starting clamav for the first time.\n"
+ fi
+}
diff --git a/app-antivirus/clamav/clamav-0.99.2.ebuild b/app-antivirus/clamav/clamav-0.99.2.ebuild
new file mode 100644
index 000000000000..bf0acf80abb1
--- /dev/null
+++ b/app-antivirus/clamav/clamav-0.99.2.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic user systemd
+
+DESCRIPTION="Clam Anti-Virus Scanner"
+HOMEPAGE="http://www.clamav.net/"
+# no longer on sf.net from 0.99.2 onwards
+SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs uclibc"
+
+CDEPEND="bzip2? ( app-arch/bzip2 )
+ clamdtop? ( sys-libs/ncurses:0 )
+ iconv? ( virtual/libiconv )
+ metadata-analysis-api? ( dev-libs/json-c )
+ milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
+ dev-libs/libtommath
+ >=sys-libs/zlib-1.2.2
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ sys-devel/libtool
+ >dev-libs/libpcre-6
+ !!<app-antivirus/clamav-0.99"
+# hard block clamav < 0.99 due to linking problems Bug #567680
+# openssl is now *required* see this link as to why
+# http://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-clamav )"
+
+DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
+
+pkg_setup() {
+ enewgroup clamav
+ enewuser clamav -1 -1 /dev/null clamav
+}
+
+src_prepare() {
+ use ppc64 && append-flags -mminimal-toc
+ use uclibc && export ac_cv_type_error_t=yes
+
+ epatch "${FILESDIR}"/${P}-gcc-6.patch #592432
+ epatch "${FILESDIR}"/${PN}-0.99-zlib.patch # 604650, fixed in upstream HEAD
+ eautoconf
+}
+
+src_configure() {
+ econf \
+ --disable-experimental \
+ --disable-fanotify \
+ --enable-id-check \
+ --with-dbdir="${EPREFIX}"/var/lib/clamav \
+ --with-system-tommath \
+ --with-zlib="${EPREFIX}"/usr \
+ $(use_enable bzip2) \
+ $(use_enable clamdtop) \
+ $(use_enable ipv6) \
+ $(use_enable milter) \
+ $(use_enable static-libs static) \
+ $(use_with iconv) \
+ $(use_with metadata-analysis-api libjson /usr)
+}
+
+src_install() {
+ default
+
+ rm -rf "${ED}"/var/lib/clamav
+ newinitd "${FILESDIR}"/clamd.initd-r6 clamd
+ newconfd "${FILESDIR}"/clamd.conf-r1 clamd
+
+ systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
+ systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
+ systemd_dounit "${FILESDIR}/clamd.service"
+ systemd_dounit "${FILESDIR}/freshclamd.service"
+
+ keepdir /var/lib/clamav
+ fowners clamav:clamav /var/lib/clamav
+ keepdir /var/log/clamav
+ fowners clamav:clamav /var/log/clamav
+
+ dodir /etc/logrotate.d
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/clamav.logrotate clamav
+
+ # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
+ -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
+ -e "s:.*\(User\) .*:\1 clamav:" \
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
+ -e "s:^\#\(LogTime\).*:\1 yes:" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ "${ED}"/etc/clamd.conf.sample || die
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
+ -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
+ -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
+ -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
+ -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ "${ED}"/etc/freshclam.conf.sample || die
+
+ if use milter ; then
+ # MilterSocket one to include ' /' because there is a 2nd line for
+ # inet: which we want to leave
+ dodoc "${FILESDIR}"/clamav-milter.README.gentoo
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
+ -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
+ -e "s:.*\(User\) .*:\1 clamav:" \
+ -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
+ "${ED}"/etc/clamav-milter.conf.sample || die
+ cat >> "${ED}"/etc/conf.d/clamd <<-EOF
+ MILTER_NICELEVEL=19
+ START_MILTER=no
+ EOF
+
+ systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
+ fi
+
+ for i in clamd freshclam clamav-milter
+ do
+ [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
+ done
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use milter ; then
+ elog "For simple instructions how to setup the clamav-milter read the"
+ elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
+ fi
+ if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
+ ewarn "You must run freshclam manually to populate the virus database files"
+ ewarn "before starting clamav for the first time.\n"
+ fi
+}
diff --git a/app-antivirus/clamav/clamav-0.99.ebuild b/app-antivirus/clamav/clamav-0.99.ebuild
new file mode 100644
index 000000000000..020f61bb23ec
--- /dev/null
+++ b/app-antivirus/clamav/clamav-0.99.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic user systemd
+
+DESCRIPTION="Clam Anti-Virus Scanner"
+HOMEPAGE="http://www.clamav.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs uclibc"
+
+CDEPEND="bzip2? ( app-arch/bzip2 )
+ clamdtop? ( sys-libs/ncurses:0 )
+ iconv? ( virtual/libiconv )
+ metadata-analysis-api? ( dev-libs/json-c )
+ milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
+ dev-libs/libtommath
+ >=sys-libs/zlib-1.2.2
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ sys-devel/libtool
+ >dev-libs/libpcre-6
+ !!<app-antivirus/clamav-0.99"
+# hard block clamav < 0.99 due to linking problems Bug #567680
+# openssl is now *required* see this link as to why
+# http://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-clamav )"
+
+DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
+
+pkg_setup() {
+ enewgroup clamav
+ enewuser clamav -1 -1 /dev/null clamav
+}
+
+src_prepare() {
+ use ppc64 && append-flags -mminimal-toc
+ use uclibc && export ac_cv_type_error_t=yes
+
+ epatch "${FILESDIR}"/${P}-zlib.patch # 604650, fixed in upstream HEAD
+ eautoconf
+}
+
+src_configure() {
+ econf \
+ --disable-experimental \
+ --disable-fanotify \
+ --disable-zlib-vcheck \
+ --enable-id-check \
+ --with-dbdir="${EPREFIX}"/var/lib/clamav \
+ --with-system-tommath \
+ --with-zlib="${EPREFIX}"/usr \
+ $(use_enable bzip2) \
+ $(use_enable clamdtop) \
+ $(use_enable ipv6) \
+ $(use_enable milter) \
+ $(use_enable static-libs static) \
+ $(use_with iconv) \
+ $(use_with metadata-analysis-api libjson /usr)
+}
+
+src_install() {
+ default
+
+ rm -rf "${ED}"/var/lib/clamav
+ newinitd "${FILESDIR}"/clamd.initd-r6 clamd
+ newconfd "${FILESDIR}"/clamd.conf-r1 clamd
+
+ systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
+ systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
+ systemd_dounit "${FILESDIR}/clamd.service"
+ systemd_dounit "${FILESDIR}/freshclamd.service"
+
+ keepdir /var/lib/clamav
+ fowners clamav:clamav /var/lib/clamav
+ keepdir /var/log/clamav
+ fowners clamav:clamav /var/log/clamav
+
+ dodir /etc/logrotate.d
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/clamav.logrotate clamav
+
+ # Modify /etc/{clamd,freshclam}.conf to be usable out of the box
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
+ -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
+ -e "s:.*\(User\) .*:\1 clamav:" \
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
+ -e "s:^\#\(LogTime\).*:\1 yes:" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ "${ED}"/etc/clamd.conf.sample || die
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
+ -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
+ -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
+ -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
+ -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ "${ED}"/etc/freshclam.conf.sample || die
+
+ if use milter ; then
+ # MilterSocket one to include ' /' because there is a 2nd line for
+ # inet: which we want to leave
+ dodoc "${FILESDIR}"/clamav-milter.README.gentoo
+ sed -i -e "s:^\(Example\):\# \1:" \
+ -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
+ -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
+ -e "s:.*\(User\) .*:\1 clamav:" \
+ -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
+ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
+ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
+ "${ED}"/etc/clamav-milter.conf.sample || die
+ cat >> "${ED}"/etc/conf.d/clamd <<-EOF
+ MILTER_NICELEVEL=19
+ START_MILTER=no
+ EOF
+
+ systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
+ fi
+
+ for i in clamd freshclam clamav-milter
+ do
+ [[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
+ done
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if use milter ; then
+ elog "For simple instructions how to setup the clamav-milter read the"
+ elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
+ fi
+ if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
+ ewarn "You must run freshclam manually to populate the virus database files"
+ ewarn "before starting clamav for the first time.\n"
+ fi
+}
diff --git a/app-antivirus/clamav/files/clamav-0.99-zlib.patch b/app-antivirus/clamav/files/clamav-0.99-zlib.patch
new file mode 100644
index 000000000000..8d1f4e615379
--- /dev/null
+++ b/app-antivirus/clamav/files/clamav-0.99-zlib.patch
@@ -0,0 +1,22 @@
+commit f0bcd186190fe6e67b3f0eaaceb7a99aa6a98865
+Author: Steven Morgan <stevmorg@cisco.com>
+Date: Thu Jan 5 12:30:35 2017 -0500
+
+ bb111711 - fix zlib version check - patch by Daniel J. Luke.
+
+diff --git a/m4/reorganization/libs/libz.m4 b/m4/reorganization/libs/libz.m4
+index b5c7414..f7b67ca 100644
+--- a/m4/reorganization/libs/libz.m4
++++ b/m4/reorganization/libs/libz.m4
+@@ -29,9 +29,9 @@ then
+ AC_MSG_ERROR([Please install zlib and zlib-devel packages])
+ else
+
+- vuln=`grep "ZLIB_VERSION \"1.2.0" $ZLIB_HOME/include/zlib.h`
++ vuln=`grep "ZLIB_VERSION \"1.2.0\"" $ZLIB_HOME/include/zlib.h`
+ if test -z "$vuln"; then
+- vuln=`grep "ZLIB_VERSION \"1.2.1" $ZLIB_HOME/include/zlib.h`
++ vuln=`grep "ZLIB_VERSION \"1.2.1\"" $ZLIB_HOME/include/zlib.h`
+ fi
+
+ if test -n "$vuln"; then
diff --git a/app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch b/app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch
new file mode 100644
index 000000000000..2031edbd3822
--- /dev/null
+++ b/app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch
@@ -0,0 +1,84 @@
+diff --git a/libclamav/c++/llvm/include/llvm/ADT/StringMap.h b/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
+index 59ff6aa..1325394 100644
+--- a/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
++++ b/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
+@@ -169,3 +169,3 @@ public:
+ KeyLength+1;
+- unsigned Alignment = alignof<StringMapEntry>();
++ unsigned Alignment = alignOf<StringMapEntry>();
+
+diff --git a/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h b/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
+index 88044c7..86b0f40 100644
+--- a/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
++++ b/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
+@@ -417,3 +417,3 @@ namespace llvm {
+ ileAllocator.Allocate(sizeof(IndexListEntry),
+- alignof<IndexListEntry>()));
++ alignOf<IndexListEntry>()));
+
+diff --git a/libclamav/c++/llvm/include/llvm/Support/AlignOf.h b/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
+index 6a7a1a6..979e597 100644
+--- a/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
++++ b/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
+@@ -51,8 +51,8 @@ struct AlignOf {
+
+-/// alignof - A templated function that returns the mininum alignment of
++/// alignOf - A templated function that returns the mininum alignment of
+ /// of a type. This provides no extra functionality beyond the AlignOf
+ /// class besides some cosmetic cleanliness. Example usage:
+-/// alignof<int>() returns the alignment of an int.
++/// alignOf<int>() returns the alignment of an int.
+ template <typename T>
+-static inline unsigned alignof() { return AlignOf<T>::Alignment; }
++static inline unsigned alignOf() { return AlignOf<T>::Alignment; }
+
+diff --git a/libclamav/c++/llvm/include/llvm/Support/Allocator.h b/libclamav/c++/llvm/include/llvm/Support/Allocator.h
+index 4a7251f..17caf5e 100644
+--- a/libclamav/c++/llvm/include/llvm/Support/Allocator.h
++++ b/libclamav/c++/llvm/include/llvm/Support/Allocator.h
+@@ -203,3 +203,3 @@ public:
+ for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) {
+- Ptr = Allocator.AlignPtr(Ptr, alignof<T>());
++ Ptr = Allocator.AlignPtr(Ptr, alignOf<T>());
+ if (Ptr + sizeof(T) <= End)
+diff --git a/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp b/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp
+index b892d85..dc72346 100644
+--- a/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp
++++ b/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp
+@@ -495,3 +495,3 @@ void SCEVUnknown::print(raw_ostream &OS) const {
+ if (isAlignOf(AllocTy)) {
+- OS << "alignof(" << *AllocTy << ")";
++ OS << "alignOf(" << *AllocTy << ")";
+ return;
+diff --git a/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp b/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
+index 824021c..757ca50 100644
+--- a/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
++++ b/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
+@@ -569,3 +569,3 @@ void Emitter<CodeEmitter>::emitMemModRMByte(const MachineInstr &MI,
+ // Calculate what the SS field value should be...
+- static const unsigned SSTable[] = { ~0, 0, 1, ~0, 2, ~0, ~0, ~0, 3 };
++ static const unsigned SSTable[] = { ~0u, 0u, 1u, ~0u, 2u, ~0u, ~0u, ~0u, 3u };
+ unsigned SS = SSTable[Scale.getImm()];
+diff --git a/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp b/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
+index 9564fe0..b2b7986 100644
+--- a/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
++++ b/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
+@@ -332,3 +332,3 @@ void X86MCCodeEmitter::EmitMemModRMByte(const MCInst &MI, unsigned Op,
+ // Calculate what the SS field value should be...
+- static const unsigned SSTable[] = { ~0, 0, 1, ~0, 2, ~0, ~0, ~0, 3 };
++ static const unsigned SSTable[] = { ~0u, 0u, 1u, ~0u, 2u, ~0u, ~0u, ~0u, 3u };
+ unsigned SS = SSTable[Scale.getImm()];
+diff --git a/libclamav/mpool.c b/libclamav/mpool.c
+index cd38e15..b5e537d 100644
+--- a/libclamav/mpool.c
++++ b/libclamav/mpool.c
+@@ -417,3 +417,3 @@ static size_t from_bits(unsigned int bits) {
+
+-static inline unsigned int alignof(size_t size)
++static inline unsigned int alignOf(size_t size)
+ {
+@@ -609,3 +609,3 @@ static void* allocate_aligned(struct MPMAP *mpm, size_t size, unsigned align, co
+ void *mpool_malloc(struct MP *mp, size_t size) {
+- size_t align = alignof(size);
++ size_t align = alignOf(size);
+ size_t i, needed = align_increase(size+FRAG_OVERHEAD, align);
diff --git a/app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch b/app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch
new file mode 100644
index 000000000000..4593d16836e1
--- /dev/null
+++ b/app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch
@@ -0,0 +1,23 @@
+--- a/m4/reorganization/clamdtop.m4
++++ b/m4/reorganization/clamdtop.m4
+@@ -4,12 +4,20 @@
+
+ if test "$enable_clamdtop" != "no"; then
+
++PKG_CHECK_MODULES([CURSES],[ncurses],
++ [HAVE_LIBNCURSES=yes; CURSES_INCLUDE="<ncurses.h>"],
++ [HAVE_LIBNCURSES=no],
++)
++
++if test "X$HAVE_LIBNCURSES" != "Xyes"; then
++ HAVE_LIBNCURSES=
+ AC_LIB_FIND([ncurses], [ncurses/ncurses.h],
+ AC_LANG_PROGRAM([#include <ncurses/ncurses.h>],
+ [initscr(); KEY_RESIZE;]),
+ [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
+ CURSES_INCLUDE="<ncurses/ncurses.h>"],
+ [])
++fi
+
+ if test "X$HAVE_LIBNCURSES" != "Xyes"; then
+ HAVE_LIBNCURSES=
diff --git a/app-antivirus/clamav/files/clamav-milter.README.gentoo b/app-antivirus/clamav/files/clamav-milter.README.gentoo
new file mode 100644
index 000000000000..17e9ba628ea5
--- /dev/null
+++ b/app-antivirus/clamav/files/clamav-milter.README.gentoo
@@ -0,0 +1,44 @@
+Nick Hadaway <raker@gentoo.org>
+Updated by Andrea Barisani <lcars@gentoo.org>
+18/05/2004
+
+Setting up clamav-milter on Gentoo Linux
+
+Step 1 - Configure clamd
+
+Check /etc/clamd.conf, default values should work out of the box but
+read and understand all the options especially if you are going to
+use it on production boxes.
+
+Step 2 - Tell the init script to start clamd as well as freshclam and the
+ milter itself.
+
+ nano -w /etc/conf.d/clamd
+
+ START_CLAMD=yes
+ START_FRESHCLAM=yes
+ START_MILTER=yes
+
+Step 3 - Edit sendmail.mc
+
+ Add these lines to sendmail.mc before any any other
+ INPUT_MAIL_FILTER lines and before MAILER(local)
+ NOTE: ANY INPUT_MAIL_FILTER definitions put before these lines
+ will be discarded due to the use of confINPUT_MAIL_FILTERS
+ Make this your first mail filter. :)
+
+ INPUT_MAIL_FILTER(`clmilter',`S=local:/var/run/clamav/clmilter.sock, F=, T=S:4m;R:4m')dnl
+ define(`confINPUT_MAIL_FILTERS', `clmilter')dnl
+
+Step 4 - Rebuild sendmail.cf
+
+ cd /etc/mail
+ m4 sendmail.mc > sendmail.cf
+
+Step 5 - Start clamad
+
+ /etc/init.d/clamd start
+
+Step 6 - Restart sendmail
+
+ /etc/init.d/sendmail restart
diff --git a/app-antivirus/clamav/files/clamav-milter.service b/app-antivirus/clamav/files/clamav-milter.service
new file mode 100644
index 000000000000..5a1a24faa27d
--- /dev/null
+++ b/app-antivirus/clamav/files/clamav-milter.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Milter module for the ClamAV scanner
+After=nss-lookup.target network.target
+Before=sendmail.service
+Before=postfix.service
+
+[Service]
+ExecStart=/usr/sbin/clamav-milter -c /etc/clamav-milter.conf --nofork=yes
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-antivirus/clamav/files/clamav-milter.service-r1 b/app-antivirus/clamav/files/clamav-milter.service-r1
new file mode 100644
index 000000000000..f0118d8346f5
--- /dev/null
+++ b/app-antivirus/clamav/files/clamav-milter.service-r1
@@ -0,0 +1,13 @@
+[Unit]
+Description=Milter module for the ClamAV scanner
+After=nss-lookup.target network.target
+Before=sendmail.service
+Before=postfix.service
+
+[Service]
+Type=forking
+PIDFile=/run/clamav/clamav-milter.pid
+ExecStart=/usr/sbin/clamav-milter -c /etc/clamav-milter.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-antivirus/clamav/files/clamav.logrotate b/app-antivirus/clamav/files/clamav.logrotate
new file mode 100644
index 000000000000..7a811264653b
--- /dev/null
+++ b/app-antivirus/clamav/files/clamav.logrotate
@@ -0,0 +1,17 @@
+/var/log/clamav/clamd.log {
+ su clamav clamav
+ missingok
+ postrotate
+ /etc/init.d/clamd logfix
+ /bin/kill -HUP `cat /var/run/clamav/clamd.pid 2> /dev/null` 2>/dev/null || true
+ endscript
+}
+
+/var/log/clamav/freshclam.log {
+ su clamav clamav
+ missingok
+ postrotate
+ /etc/init.d/clamd logfix
+ /bin/kill -HUP `cat /var/run/clamav/freshclam.pid 2> /dev/null` 2>/dev/null || true
+ endscript
+}
diff --git a/app-antivirus/clamav/files/clamd.conf b/app-antivirus/clamav/files/clamd.conf
new file mode 100644
index 000000000000..ee055138074c
--- /dev/null
+++ b/app-antivirus/clamav/files/clamd.conf
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/clamd
+
+# NOTICE: Since clamav-0.85-r1, only START_CLAMD and START_FRESHCLAM settings
+# are used, other are silently ignored
+
+START_CLAMD=yes
+START_FRESHCLAM=yes
+CLAMD_NICELEVEL=3
+FRESHCLAM_NICELEVEL=19
diff --git a/app-antivirus/clamav/files/clamd.conf-r1 b/app-antivirus/clamav/files/clamd.conf-r1
new file mode 100644
index 000000000000..de95554eea7b
--- /dev/null
+++ b/app-antivirus/clamav/files/clamd.conf-r1
@@ -0,0 +1,7 @@
+# Config file for /etc/init.d/clamd
+
+START_CLAMD=yes
+START_FRESHCLAM=yes
+CLAMD_NICELEVEL=3
+FRESHCLAM_NICELEVEL=19
+IONICE_LEVEL=2
diff --git a/app-antivirus/clamav/files/clamd.initd-r6 b/app-antivirus/clamav/files/clamd.initd-r6
new file mode 100644
index 000000000000..7b50af640727
--- /dev/null
+++ b/app-antivirus/clamav/files/clamd.initd-r6
@@ -0,0 +1,128 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+daemon_clamd="/usr/sbin/clamd"
+daemon_freshclam="/usr/bin/freshclam"
+daemon_milter="/usr/sbin/clamav-milter"
+
+extra_commands="logfix"
+
+depend() {
+ use net
+ provide antivirus
+}
+
+get_config() {
+ clamconf | sed 's/["=]//g' | \
+ awk "{
+ if(\$0==\"Config file: $1.conf\") S=1
+ if(S==1&&\$0==\"\") {
+ print \"$3\"
+ exit
+ }
+ if(S==1&&\$1~\"^$2\$\") {
+ print \$2!=\"disabled\"?\$2:\"$3\"
+ exit
+ }
+ }"
+}
+
+start() {
+ # populate variables and fix log file permissions
+ logfix
+
+ if [ "${START_CLAMD}" = "yes" ]; then
+ checkpath --quiet --mode 755 \
+ --owner "${clamd_user}":"${clamd_user}" \
+ --directory `dirname ${clamd_socket}`
+ if [ -S "${clamd_socket}" ]; then
+ rm -f ${clamd_socket}
+ fi
+ ebegin "Starting clamd"
+ start-stop-daemon --start --quiet \
+ --nicelevel ${CLAMD_NICELEVEL:-0} \
+ --ionice ${IONICE_LEVEL:-0} \
+ --exec ${daemon_clamd}
+ eend $? "Failed to start clamd"
+ fi
+
+ if [ "${START_FRESHCLAM}" = "yes" ]; then
+ checkpath --quiet --mode 755 \
+ --owner "${clamd_user}":"${clamd_user}" \
+ --directory `dirname ${clamd_socket}`
+ ebegin "Starting freshclam"
+ start-stop-daemon --start --quiet \
+ --nicelevel ${FRESHCLAM_NICELEVEL:-0} \
+ --ionice ${IONICE_LEVEL:-0} \
+ --exec ${daemon_freshclam} -- -d
+ retcode=$?
+ if [ ${retcode} = 1 ]; then
+ eend 0
+ einfo "Virus databases are already up to date."
+ else
+ eend ${retcode} "Failed to start freshclam"
+ fi
+ fi
+
+ if [ "${START_MILTER}" = "yes" ]; then
+ if [ -z "${MILTER_CONF_FILE}" ]; then
+ MILTER_CONF_FILE="/etc/clamav-milter.conf"
+ fi
+
+ ebegin "Starting clamav-milter"
+ start-stop-daemon --start --quiet \
+ --nicelevel ${MILTER_NICELEVEL:-0} \
+ --ionice ${IONICE_LEVEL:-0} \
+ --exec ${daemon_milter} -- -c ${MILTER_CONF_FILE}
+ eend $? "Failed to start clamav-milter"
+ fi
+}
+
+stop() {
+ if [ "${START_CLAMD}" = "yes" ]; then
+ ebegin "Stopping clamd"
+ start-stop-daemon --stop --quiet --name clamd
+ eend $? "Failed to stop clamd"
+ fi
+ if [ "${START_FRESHCLAM}" = "yes" ]; then
+ ebegin "Stopping freshclam"
+ start-stop-daemon --stop --quiet --name freshclam
+ eend $? "Failed to stop freshclam"
+ fi
+ if [ "${START_MILTER}" = "yes" ]; then
+ ebegin "Stopping clamav-milter"
+ start-stop-daemon --stop --quiet --name clamav-milter
+ eend $? "Failed to stop clamav-milter"
+ fi
+}
+
+logfix() {
+ clamd_socket=$(get_config clamd LocalSocket /run/clamav/clamd.sock)
+ clamd_user=$(get_config clamd User clamav)
+ freshclam_user=$(get_config freshclam DatabaseOwner clamav)
+
+ if [ "${START_CLAMD}" = "yes" ]; then
+ # fix clamd log permissions
+ # (might be clobbered by logrotate or something)
+ local logfile=$(get_config clamd LogFile)
+ if [ -n "${logfile}" ]; then
+ checkpath --quiet \
+ --owner "${clamd_user}":"${clamd_user}" \
+ --mode 640 \
+ --file ${logfile}
+ fi
+ fi
+
+ if [ "${START_FRESHCLAM}" = "yes" ]; then
+ # fix freshclam log permissions
+ # (might be clobbered by logrotate or something)
+ local logfile=$(get_config freshclam UpdateLogFile)
+ if [ -n "${logfile}" ]; then
+ checkpath --quiet \
+ --owner "${freshclam_user}":"${freshclam_user}" \
+ --mode 640 \
+ --file ${logfile}
+ fi
+ fi
+}
diff --git a/app-antivirus/clamav/files/clamd.service b/app-antivirus/clamav/files/clamd.service
new file mode 100644
index 000000000000..efdab4314a22
--- /dev/null
+++ b/app-antivirus/clamav/files/clamd.service
@@ -0,0 +1,7 @@
+.include /usr/lib/systemd/system/clamd@.service
+
+[Unit]
+Description=Generic ClamAV scanner daemon
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-antivirus/clamav/files/clamd_at.service b/app-antivirus/clamav/files/clamd_at.service
new file mode 100644
index 000000000000..c5ad8dfa6899
--- /dev/null
+++ b/app-antivirus/clamav/files/clamd_at.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=clamd scanner (%i) daemon
+After=nss-lookup.target network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/clamd -c /etc/clamd%i.conf
+Restart=on-failure
+PrivateTmp=true
diff --git a/app-antivirus/clamav/files/freshclamd.service b/app-antivirus/clamav/files/freshclamd.service
new file mode 100644
index 000000000000..a0a72c2e60eb
--- /dev/null
+++ b/app-antivirus/clamav/files/freshclamd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=clamav updater
+
+[Service]
+Type=forking
+PIDFile=/run/clamav/freshclam.pid
+ExecStart=/usr/bin/freshclam -d -p /run/clamav/freshclam.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-antivirus/clamav/files/tmpfiles.d/clamav.conf b/app-antivirus/clamav/files/tmpfiles.d/clamav.conf
new file mode 100644
index 000000000000..1672df60eab5
--- /dev/null
+++ b/app-antivirus/clamav/files/tmpfiles.d/clamav.conf
@@ -0,0 +1 @@
+d /run/clamav 0710 clamav clamav
diff --git a/app-antivirus/clamav/metadata.xml b/app-antivirus/clamav/metadata.xml
new file mode 100644
index 000000000000..7d510408a044
--- /dev/null
+++ b/app-antivirus/clamav/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>antivirus@gentoo.org</email>
+ <name>Gentoo Antivirus Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>net-mail@gentoo.org</email>
+ <name>Net-Mail</name>
+ </maintainer>
+ <use>
+ <flag name="clamdtop">A Top like tool which shows what clamd is currently scanning amongst other things</flag>
+ <flag name="metadata-analysis-api">Enables collection of file property metadata using ClamAV API for analysis by ClamAV bytecode programs.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">clamav</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-antivirus/metadata.xml b/app-antivirus/metadata.xml
new file mode 100644
index 000000000000..7c17b14e55cf
--- /dev/null
+++ b/app-antivirus/metadata.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The app-antivirus category contains antivirus software.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría app-antivirus contiene software anti-virus.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie app-antivirus enthält Antiviren-Software.
+ </longdescription>
+ <longdescription lang="ja">
+ app-antivirusカテゴリにはアンチウィルスソフトが含まれます。
+ </longdescription>
+ <longdescription lang="nl">
+ De categorie app-antivirus bevat anti-virus applicaties.
+ </longdescription>
+ <longdescription lang="sk">
+ Kategória app-antivirus obsahuje antivírusové programy.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm app-antivirus chứa các ứng dụng chống/diệt virus.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria app-antivirus contiene software anti-virus.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria app-antivirus contém software anti-vírus.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria app-antivirus zawiera oprogramowanie antywirusowe.
+ </longdescription>
+</catmetadata>
+
diff --git a/app-antivirus/skyldav/Manifest b/app-antivirus/skyldav/Manifest
new file mode 100644
index 000000000000..9e2ea8aa1727
--- /dev/null
+++ b/app-antivirus/skyldav/Manifest
@@ -0,0 +1,11 @@
+AUX skyldav-conf.patch 1090 SHA256 cb9dfb0bb4f819a97831181285cbda69f32ae51c59a0b49497aaf72463f50f7b SHA512 5e628905f5e638889da761a5ce4e9e1c1a5e4c52a40ee2da0ceceb4706140e9836d37bcf8d5bc78da0fd74be4dc40032300a0d9584ecb431fe71583091ba3c4e WHIRLPOOL 23608d85b577667af0486a61fc9f716fff17ef145fec26bd3a9c4f8a5b019beef3d1673b99281be83942d7d9e1e3b36b7788e6f3c10f76e90e4b025f05efc58a
+AUX skyldav-examples.patch 349 SHA256 60cf3a623b86349ce7fae4f943d37f4e5e090152d28d08f6044ba7e991338ee7 SHA512 b31e227825f5ea695ff8b957e95611d63f7157959fc610edb23c90b6bec69739f6e11288fcc9f19043492cf749c8aa5f8bafe875638e996e58731b354bcc6618 WHIRLPOOL d99d80e2ffae03897cc44beb8595bc192c9732814746ad00e94346fa5f5300010291c42e1e2a120e74fb86f68f7eae7e5a2219c6366a94d6cd2ebd4418340814
+AUX skyldav.confd 301 SHA256 d40a3920ba1f200e833504ab59a666b281d3ec7b3540409c2304e22c9e613a54 SHA512 1b1e1d803761c0ca94937bde03d31831bdd82bac36e374db4fba089fbd44dbe4fef8a9d9aecdd503f12aeb6aba641d48cdc8e27b74d82a8061ba34b915194c0c WHIRLPOOL 9036c2e2b64204f6fc9ab4489ca48eb030b562afdb654607f80f62a5b90b972c7730b7795e6714ee4f065ec3109dcce3d684adeeb0e267f28fd5692276a15c0b
+AUX skyldav.initd 743 SHA256 ea5c2d31bdecd3c830ba6b00af500a4f0beaa734bb336332a23e17a3400cddfe SHA512 485ef14b7636fc9514388d66525d03dae460cdb20814335684ef47a6217d035d235a900d219b54e5ea6867ed4339797bdc1f03ba02b8547429445ea28918a6ad WHIRLPOOL 6c038d5335e1f7e77165351c94e31146985fdbe4c7840ca55ed6195a4d910fcde052373cc0c740f0375856aa542e62c4838c72c04d5af96f75950585465b8876
+AUX skyldav.service-r1 392 SHA256 17f49ee3b23883ae8f67ffe896f7655e545f72660f31ef4573363d555501116a SHA512 40da1fc4925076396a4fe75449bae3231d75cfaa4dc8cd5f1b2d7518804a78d37d7d4e87c371d58191b2cc20273b86dc93a79c24b867ab6ef493a2ebb5d9b5a7 WHIRLPOOL f98912d455faa4799c2aa71f0f290759b36e2bcee091b2b83b739913e86a224f98c88fa35031135eb7ee692319280fddf51e88a6dfacfad011cc6ef2abd26725
+AUX skyldav.service.conf 78 SHA256 f604cf7dfb8f16673f0629de5cd917499219777302886ca52c50d1a457ab2711 SHA512 04089de87d2c842cd9f9103cd81ea999b55239c616a731107fd7d8f40fffdc7bd6bcb168cb322a00bece72e3422ed423782f0377bb63e89731b776df145e63cc WHIRLPOOL 426f520fae82f50aef3befcf94c2696fba44abcff17b13098808863665dd748a28807318a04e2633b2a15d6dce68e6679357542d5d85023dd2c472fc9e27c07e
+AUX skyldav.tmpfilesd 108 SHA256 df4c94c0a93f642790ef92f42923ca2f3231e60441c41ea19cf04b943fd44f96 SHA512 a30f18083dbdd613d735fc632b43a45bdb61a63a91fef4306afe379cf1dc398974caa72b11d0cff4e62765c5c8ea43212a9e366a95ca902d53f04248527d8e83 WHIRLPOOL 115c695f94e696bc09e40a0ceabbf2d9ef2b51553f89760ec86e86a031b71123b7b88353782a052e02421abbb13f72fa376da143e87314e40480fb7d0616b020
+DIST skyldav-0.7.tar.gz 244444 SHA256 e238706fd923cc3da685b27ef6d89bd49200d56102eba11dc279a47b93840a6d SHA512 008988ca7ab24ea8b77377e7a639ddc0a26149eab41af1d429cf8f870320617feda01ec2c9403493a3bb0bd5cd0c8cad94701bcb6c28993f2d9739e1a1b36c0b WHIRLPOOL b8612e3d835b0ef086f17fc430b671fdded6f5e7d53a0340638a95db59d2c0d79496c56962bdbbf9371f9a5389ec70751e2aee460244af462f618d46d6a2574d
+EBUILD skyldav-0.7.ebuild 3188 SHA256 1dce6b09ac3835703031169b7f5ed51553fc5c670fbf9a75afc560105b67809a SHA512 b9b829dc59fda88c932bcdd8d937ac679fd492e0a0cf405ae9ad1f3268651495a988223b60a9eeeac13cd66f2d3b80b98088a03d1c110fdab412c4d00d09ee76 WHIRLPOOL fe1677d08c8c3fae6c6b4674efbea659d5fbc2655313cc2c2e30e86ce83b6056f3d4e0d296d2b1b9454ba4c3500ef6fea5b432cf2b91dc86bf568d6d02caba5f
+MISC ChangeLog 1347 SHA256 49608ad37978051267dba4471e01816db9d1d92733e43ff4465b8f7c384adcdb SHA512 8304269ecb328ba9a9c357983c3ff11ca11cbfa9d75e71488652f75dd0d27a62129bece9ab3fc6a2c55a9d446073f07830026ad97cdde1a530b7ebfb54ccd3a3 WHIRLPOOL a0bee09f3a40bcc1f05e9e75064c99d75abe8349b3711be2e5ddb6e582307f14fa959e86d33d08177a1cbd3650a4f9bcb647c17b4bfc9a0956d70efa4b30e6d0
+MISC metadata.xml 339 SHA256 faff10bb6ba560d9a36cb33cf9cd8ea8235363c89c974959ca27db19d7d21c61 SHA512 e949752a0886d6bb0783d2039a58444fe3809c1fd9393bd2f7ad26efc711c375d3fee9f335ece66161ffabc7f55435e028010eef3af84f88d26d8529bde5fb98 WHIRLPOOL 4a53ad5ebbd7e0ebe1f7ce14c7d281e5208c546cf18166e77021a642ee49810f08d080d2a5cbc4e04143092fbb585f31805ff47f7fecff2ae5bbfc98270a0ea1
diff --git a/app-antivirus/skyldav/files/skyldav-conf.patch b/app-antivirus/skyldav/files/skyldav-conf.patch
new file mode 100644
index 000000000000..ed5b2058f6a6
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav-conf.patch
@@ -0,0 +1,21 @@
+diff -urN skyldav-0.7.orig/examples/etc/skyldav.conf skyldav-0.7/examples/etc/skyldav.conf
+--- skyldav-0.7.orig/examples/etc/skyldav.conf 2016-06-12 18:39:51.000000000 +0200
++++ skyldav-0.7/examples/etc/skyldav.conf 2017-02-21 15:12:06.875945224 +0100
+@@ -22,6 +22,9 @@
+
+ # Directories that shall not be scanned (including subdirectories)
+ # EXCLUDE_PATH = /var/noscan, /opt/noscan
++#
++# Exclude various portage directories for performance reasons
++EXCLUDE_PATH = /usr/portage, /var/cache/edb, /var/db/pkg, /var/tmp/portage, /var/tmp/binpkgs, /var/log/portage
+
+ # File systems that are local, virus scan results may be cached.
+ # LOCAL_FS = ext3, ext4, iso9660, tmpfs, vfat
+@@ -31,6 +34,7 @@
+ # File systems that shall not be marked for virus scan.
+ # Cifs uses a background daemon which causes problems when scanned.
+ # Exclusion of fuse file systems is hard coded.
++# Do not exclude devtmpfs and configfs, as userspace could write malware onto them!
+ # NOMARK_FS = proc, sysfs
+ NOMARK_FS = proc, sysfs, devpts, debugfs, securityfs, cgroup, rpc_pipefs
+ NOMARK_FS = mqueue, autofs, cifs
diff --git a/app-antivirus/skyldav/files/skyldav-examples.patch b/app-antivirus/skyldav/files/skyldav-examples.patch
new file mode 100644
index 000000000000..b62e78cc9698
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav-examples.patch
@@ -0,0 +1,11 @@
+diff -urN skyldav-0.7.orig/Makefile.am skyldav-0.7/Makefile.am
+--- skyldav-0.7.orig/Makefile.am 2016-06-12 18:39:51.000000000 +0200
++++ skyldav-0.7/Makefile.am 2017-02-21 15:11:35.709518793 +0100
+@@ -9,7 +9,6 @@
+ rm -rf doc/doxygen
+
+ install-data-local: \
+- install-skyldav-examples \
+ install-skyldav-conf \
+ install-skyldavnotify-desktop
+
diff --git a/app-antivirus/skyldav/files/skyldav.confd b/app-antivirus/skyldav/files/skyldav.confd
new file mode 100644
index 000000000000..87829b658ebe
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.confd
@@ -0,0 +1,10 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Config file for /etc/init.d/skyldav
+
+# Options to pass to the skyldav daemon.
+# Option -d for daemonizing is always passed!
+# See the skyldav(1) man page for more info.
+
+#SKYLDAV_OPTS="-m 1"
diff --git a/app-antivirus/skyldav/files/skyldav.initd b/app-antivirus/skyldav/files/skyldav.initd
new file mode 100755
index 000000000000..539cd4f083cd
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+SKYLDAV_BIN="/usr/sbin/skyldav"
+SKYLDAV_OPTS="${SKYLDAV_OPTS:--m 2}"
+SKYLDAV_CONFIGFILE="/etc/skyldav.conf"
+SKYLDAV_PIDFILE_DIR="${SKYLDAV_PIDFILE_DIR:-/var/run/${RC_SVCNAME}}"
+SKYLDAV_PIDFILE="${SKYLDAV_PIDFILE:-${SKYLDAV_PIDFILE_DIR}/${RC_SVCNAME}.pid}"
+
+name="${SKYLDAV_BIN##*/}"
+command="${SKYLDAV_BIN}"
+command_args="-d ${SKYLDAV_OPTS}"
+pidfile="${SKYLDAV_PIDFILE}"
+description="Skyld AV is an anti-virus on-access scanner based upon Clam AV and fanotify"
+required_files="${SKYLDAV_CONFIG}"
+
+depend() {
+ use logger
+ need localmount
+}
+
+start_pre() {
+ checkpath -d -m 0755 -o root:root "${SKYLDAV_PIDFILE_DIR}"
+}
diff --git a/app-antivirus/skyldav/files/skyldav.service-r1 b/app-antivirus/skyldav/files/skyldav.service-r1
new file mode 100644
index 000000000000..decd788a9f83
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.service-r1
@@ -0,0 +1,15 @@
+[Unit]
+Description=SkyldAV anti-virus on-access scanning daemon based upon Clam AV and fanotify
+Requires=local-fs.target clamd.service
+After=local-fs.target clamd.service
+Before=multi-user.target
+
+[Service]
+Type=simple
+Environment="SKYLDAV_MESSAGE_LEVEL=2"
+ExecStart=/usr/sbin/skyldav -d -m ${SKYLDAV_MESSAGE_LEVEL}
+#KillMode=process
+#KillSignal=SIGTERM
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-antivirus/skyldav/files/skyldav.service.conf b/app-antivirus/skyldav/files/skyldav.service.conf
new file mode 100644
index 000000000000..79c23a3ff05d
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.service.conf
@@ -0,0 +1,3 @@
+[Service]
+# skyldav message level (-m)
+#Environment="SKYLDAV_MESSAGE_LEVEL=1"
diff --git a/app-antivirus/skyldav/files/skyldav.tmpfilesd b/app-antivirus/skyldav/files/skyldav.tmpfilesd
new file mode 100644
index 000000000000..a4f7cdc47423
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.tmpfilesd
@@ -0,0 +1,2 @@
+# skyldav runtime directory for skyldav.pid and log (used by skyldavnotify)
+d /run/skyldav 0755 root root -
diff --git a/app-antivirus/skyldav/metadata.xml b/app-antivirus/skyldav/metadata.xml
new file mode 100644
index 000000000000..63306ff3a6d0
--- /dev/null
+++ b/app-antivirus/skyldav/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>wschlich@gentoo.org</email>
+ <name>Wolfram Schlich</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">xypron/skyldav</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-antivirus/skyldav/skyldav-0.7.ebuild b/app-antivirus/skyldav/skyldav-0.7.ebuild
new file mode 100644
index 000000000000..0a0ef09e08fb
--- /dev/null
+++ b/app-antivirus/skyldav/skyldav-0.7.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic linux-info linux-mod autotools-utils readme.gentoo-r1 systemd
+
+DESCRIPTION="Skyld AV: on-access scanning daemon for ClamAV using fanotify"
+HOMEPAGE="http://xypron.github.io/skyldav/"
+
+## github release tarball
+MY_PV=${PV/_rc/rc}
+MY_P="${PN}-${MY_PV}"
+SRC_URI="https://github.com/xypron/skyldav/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+
+## selfmade tarball
+#MY_PVR=${PVR/_rc/rc}
+#MY_P="${PN}-${MY_PVR}"
+#SRC_URI="https://dev.gentoo.org/~wschlich/src/${CATEGORY}/${PN}/${MY_P}.tar.gz"
+
+## github commit tarball
+#MY_GIT_COMMIT="49bdb5e710b5a77c38ceb87da6015afb7009f1f9"
+#MY_P="xypron-${PN}-${MY_GIT_COMMIT:0:7}"
+#SRC_URI="https://github.com/xypron/${PN}/tarball/${MY_GIT_COMMIT} -> ${PF}.tar.gz"
+
+S="${WORKDIR}/${MY_P}"
+
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+LICENSE="Apache-2.0"
+IUSE="libnotify systemd"
+
+RDEPEND=">=app-antivirus/clamav-0.97.8
+ sys-apps/util-linux
+ sys-libs/libcap
+ libnotify? (
+ media-libs/libcanberra[gtk]
+ x11-libs/libnotify
+ x11-libs/gtk+:2
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/autoconf-archive"
+
+## autotools-utils.eclass settings
+AUTOTOOLS_AUTORECONF="1"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+DOCS=( AUTHORS NEWS README )
+PATCHES=(
+ "${FILESDIR}/${PN}-examples.patch"
+ "${FILESDIR}/${PN}-conf.patch"
+)
+
+pkg_setup() {
+ linux-info_pkg_setup
+ kernel_is ge 3 8 0 || die "Linux 3.8.0 or newer recommended"
+ CONFIG_CHECK="FANOTIFY FANOTIFY_ACCESS_PERMISSIONS"
+ check_extra_config
+
+ ## define contents for README.gentoo
+ if use systemd; then
+ DOC_CONTENTS='Skyld AV provides a systemd service.'$'\n'
+ DOC_CONTENTS+='Please edit the systemd service config file to match your needs:'$'\n'
+ DOC_CONTENTS+='/etc/systemd/system/skyldav.service.d/00gentoo.conf'$'\n'
+ DOC_CONTENTS+='# systemctl daemon-reload'$'\n'
+ DOC_CONTENTS+='# systemctl restart skyldav.service'$'\n'
+ DOC_CONTENTS+='Example for enabling the Skyld AV service:'$'\n'
+ DOC_CONTENTS+='# systemctl enable skyldav.service'$'\n'
+ else
+ DOC_CONTENTS='Skyld AV provides an init script for OpenRC.'$'\n'
+ DOC_CONTENTS+='Please edit the init script config file to match your needs:'$'\n'
+ DOC_CONTENTS+='/etc/conf.d/skyldav'$'\n'
+ DOC_CONTENTS+='Example for enabling the Skyld AV init script:'$'\n'
+ DOC_CONTENTS+='# rc-update add skyldav default'$'\n'
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with libnotify notification)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ ## install systemd service or OpenRC init scripts
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/skyldav.service-r1" skyldav.service
+ systemd_install_serviced "${FILESDIR}"/skyldav.service.conf
+ systemd_newtmpfilesd "${FILESDIR}"/skyldav.tmpfilesd skyldav.conf
+ else
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ fi
+
+ ## create README.gentoo from ${DOC_CONTENTS}
+ DISABLE_AUTOFORMATTING=1 readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ ## workaround for /usr/lib/tmpfiles.d/skyldav.conf
+ ## not getting processed until the next reboot
+ if use systemd; then
+ install -d -m 0755 -o root -g root /run/skyldav
+ fi
+}