summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild')
-rw-r--r--app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild90
1 files changed, 90 insertions, 0 deletions
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..bc1ff1bbcbaf
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild
@@ -0,0 +1,90 @@
+# 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="http://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 ''
+}