summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-antivirus')
-rw-r--r--app-antivirus/clamav-unofficial-sigs/Manifest1
-rw-r--r--app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-4.5.3.ebuild89
2 files changed, 90 insertions, 0 deletions
diff --git a/app-antivirus/clamav-unofficial-sigs/Manifest b/app-antivirus/clamav-unofficial-sigs/Manifest
index e5aa696cbeab..6643c7fbb95a 100644
--- a/app-antivirus/clamav-unofficial-sigs/Manifest
+++ b/app-antivirus/clamav-unofficial-sigs/Manifest
@@ -1 +1,2 @@
DIST clamav-unofficial-sigs-3.7.2.tar.gz 38549 SHA256 96e98e6e4434c5950fa9831c6a43236fed7eabae44beded16171305cf3f9bdb9 SHA512 ee07bf521cca229bc85acb887c8e520149955732797a9d220e24f09cb9e89f9bd189ad77dc781c03c60bdaaec2bfa91a6c96cf7a0b689759cddf3ff231b8b0a4 WHIRLPOOL af4925c8a9bb8c09472131f98026b809da13e122a530c4a48614014b8156a259d37303cb1042da98d0bd8b0f4abef3cd7c05f2d549f87e1b7cd533d4a8d4d188
+DIST clamav-unofficial-sigs-4.5.3.tar.gz 44580 SHA256 ca5f9af4be401eed470148c7108ffed043f9251d53dd99ceffd633849948d65b SHA512 8b3f26253657188a9bc8ece0f2096b3564cbc97baa208989d04fca8443f73d3e391414b96fba27be38569141c312e8c674b2d1c8ba9ae9d45b4b8af03cf70542 WHIRLPOOL c69f6e8b1771f6f82936a145224353114eee00dbe88b8715ba57242d9ffff1cd4b6e68c0d005e1925cfebee8b0c78fa896721f89b46b5f3a6c66cc2313eec04a
diff --git a/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-4.5.3.ebuild b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-4.5.3.ebuild
new file mode 100644
index 000000000000..a2eae4d56a50
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-4.5.3.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Downloads and installs 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/curl"
+
+src_prepare() {
+ # Fix the user/group in the config file to match the ones used by
+ # clamav.
+ local user_default="clam_user=\"clam\""
+ local user_gentoo="clam_user=\"clamav\""
+
+ local group_default="clam_group=\"clam\""
+ local group_gentoo="clam_group=\"clamav\""
+
+ # Log to someplace that (likely) already exists. Omit the
+ # "log_file_path" variable name so that we can reuse these patterns
+ # later to sed the logrotate file.
+ local log_default="/var/log/clamav-unofficial-sigs"
+ local log_gentoo="/var/log/clamav"
+
+ # 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 "s~${user_default}~${user_gentoo}~" \
+ -e "s~${group_default}~${group_gentoo}~" \
+ -e "s~${log_default}~${log_gentoo}~" \
+ -e "s~${socket_default}~${socket_gentoo}~" \
+ "${PN}.conf" \
+ || die "failed to update paths in ${PN}.conf"
+
+ # Fix the log path in the logrotate file, too.
+ sed -i -e "s~${log_default}~${log_gentoo}~" "${PN}-logrotate" \
+ || die "failed to update paths in ${PN}-logrotate"
+}
+
+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 "${PN}-logrotate"
+
+ insinto /etc
+ doins "${PN}.conf"
+
+ doman "${PN}.8"
+ dodoc CHANGELOG INSTALL README.md
+}
+
+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 ''
+}