summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Jackson <mjo@gentoo.org>2010-04-02 00:02:53 +0000
committerMartin Jackson <mjo@gentoo.org>2010-04-02 00:02:53 +0000
commit049e5e2c974dbaf0948f2ea21d894f6c00d877e3 (patch)
tree6a5fb4346654d4fbfc49327fdcc54f1089756c80
parentapp-misc/2gis-data: Version bump, added Rostov and Vladivostok maps (diff)
downloadsunrise-reviewed-049e5e2c974dbaf0948f2ea21d894f6c00d877e3.tar.gz
sunrise-reviewed-049e5e2c974dbaf0948f2ea21d894f6c00d877e3.tar.bz2
sunrise-reviewed-049e5e2c974dbaf0948f2ea21d894f6c00d877e3.zip
app-antivirus/clamav-unofficial-sigs: New ebuild to address bug 272872. Thanks to Felix Leimbach and steveb for ebuild inspiration/input.
svn path=/sunrise/; revision=10371
-rw-r--r--app-antivirus/clamav-unofficial-sigs/ChangeLog9
-rw-r--r--app-antivirus/clamav-unofficial-sigs/Manifest4
-rw-r--r--app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.ebuild65
-rw-r--r--app-antivirus/clamav-unofficial-sigs/metadata.xml5
4 files changed, 83 insertions, 0 deletions
diff --git a/app-antivirus/clamav-unofficial-sigs/ChangeLog b/app-antivirus/clamav-unofficial-sigs/ChangeLog
new file mode 100644
index 000000000..1c6cba208
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for app-antivirus/clamav-unofficial-sigs
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 02 Apr 2010; Michael Orlitzky <michael@orlitzky.com>
+ +clamav-unofficial-sigs-3.7.ebuild, +metadata.xml:
+ New ebuild to address bug 272872. Thanks to Felix Leimbach and steveb for
+ ebuild inspiration/input.
+
diff --git a/app-antivirus/clamav-unofficial-sigs/Manifest b/app-antivirus/clamav-unofficial-sigs/Manifest
new file mode 100644
index 000000000..a9fbd7f7e
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/Manifest
@@ -0,0 +1,4 @@
+DIST clamav-unofficial-sigs-3.7.tar.gz 36400 RMD160 4da9d4aef891ef0a3138160340b011b1c521425a SHA1 c226d904d3658ecd0d419d70fa0d2fc893be27b5 SHA256 2dc968c76b5d06a84eb85cae490d354207b57226ac450b4bad1d92cdc83395d1
+EBUILD clamav-unofficial-sigs-3.7.ebuild 1979 RMD160 f7628b53c6d114ff71266babc9fdea6313fe5979 SHA1 2672be42e61b3087802228563eca832239a73fe9 SHA256 6b6183ae407ed23a1ce955f3f12e710b4b4485d428069fdba24221d7f5dd72c5
+MISC ChangeLog 350 RMD160 38a6f28cccec6ad9ddb66195e8ede8e8398d62eb SHA1 45f4f20809a873bd44b00e48681d4651e40bcb08 SHA256 6b2ef176074c50d5491cfed01ba3b20e92a41ed3aabf147baa210f52b721e9d0
+MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
diff --git a/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.ebuild b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.ebuild
new file mode 100644
index 000000000..ffd95bb1e
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+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=""
+
+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_compile() {
+ # First, fix the paths contained in the configuration file.
+ sed -i -e '$a\pkg_mgr="emerge"' \
+ -e "\$a\\pkg_rm=\"emerge -C ${PN}\"" \
+ -e 's~/var/run/clamd.socket~/var/run/clamav/clamd.sock~' \
+ -e 's~/var/run/clamd.pid~/var/run/clamav/clamd.pid~' \
+ ${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 install.
+ sed -i -e "s~/usr/unofficial-dbs~/var/lib/${PN}~" ${PN}.conf \
+ || die 'failed to update the work_dir variable'
+}
+
+src_install() {
+ dosbin ${PN}.sh || die
+
+ # 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 -m0755 -o clamav -g clamav
+ dodir /var/lib/${PN} || die "failed to create working directory"
+
+ insinto /etc/logrotate.d
+ doins ${PN}-logrotate || die
+
+ insinto /etc
+ doins ${PN}.conf || die
+
+ doman ${PN}.8 || die
+ dodoc CHANGELOG INSTALL README || die
+}
+
+pkg_postinst() {
+ elog "You will need to set up your /etc/${PN}.conf file."
+ elog "For details, please see the ${PN}(8) manual page."
+ elog ""
+ elog "Don't forget to set user_configuration_complete=\"yes\"."
+}
diff --git a/app-antivirus/clamav-unofficial-sigs/metadata.xml b/app-antivirus/clamav-unofficial-sigs/metadata.xml
new file mode 100644
index 000000000..7e3286984
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>maintainer-wanted</herd>
+</pkgmetadata>