summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs/clamfs')
-rw-r--r--sys-fs/clamfs/Manifest1
-rw-r--r--sys-fs/clamfs/clamfs-1.0.1-r1.ebuild43
-rw-r--r--sys-fs/clamfs/files/clamfs-1.0.1-gcc45.patch15
-rw-r--r--sys-fs/clamfs/files/clamfs-1.0.1-gentoo.patch12
-rw-r--r--sys-fs/clamfs/files/clamfs.confd1
-rw-r--r--sys-fs/clamfs/files/clamfs.initd22
-rw-r--r--sys-fs/clamfs/metadata.xml15
7 files changed, 109 insertions, 0 deletions
diff --git a/sys-fs/clamfs/Manifest b/sys-fs/clamfs/Manifest
new file mode 100644
index 000000000000..7e8758f70657
--- /dev/null
+++ b/sys-fs/clamfs/Manifest
@@ -0,0 +1 @@
+DIST clamfs-1.0.1.tar.gz 142386 SHA256 d4f8b0ce767fab3deeb356e8c7cd45a34b5e3de43177735b4f315fc16aa11d03
diff --git a/sys-fs/clamfs/clamfs-1.0.1-r1.ebuild b/sys-fs/clamfs/clamfs-1.0.1-r1.ebuild
new file mode 100644
index 000000000000..39286e311291
--- /dev/null
+++ b/sys-fs/clamfs/clamfs-1.0.1-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+inherit eutils linux-info
+
+DESCRIPTION="A FUSE-based user-space file system with on-access anti-virus file scanning"
+HOMEPAGE="http://clamfs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=dev-libs/boost-1.33
+ sys-fs/fuse
+ dev-cpp/commoncpp2
+ dev-libs/rlog
+ dev-libs/poco"
+RDEPEND="${DEPEND}
+ app-antivirus/clamav"
+
+CONFIG_CHECK="~FUSE_FS"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-gentoo.patch" \
+ "${FILESDIR}/${P}-gcc45.patch"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+
+ insinto /etc/clamfs
+ doins doc/clamfs.xml || die
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} || die
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} || die
+
+ dodoc AUTHORS ChangeLog NEWS README TODO || die
+}
diff --git a/sys-fs/clamfs/files/clamfs-1.0.1-gcc45.patch b/sys-fs/clamfs/files/clamfs-1.0.1-gcc45.patch
new file mode 100644
index 000000000000..1f5f63a252f2
--- /dev/null
+++ b/sys-fs/clamfs/files/clamfs-1.0.1-gcc45.patch
@@ -0,0 +1,15 @@
+Fix building with gcc 4.5
+
+http://bugs.gentoo.org/show_bug.cgi?id=320107
+
+--- src/scancache.cxx
++++ src/scancache.cxx
+@@ -37,7 +37,7 @@
+ }
+
+ ScanCache::ScanCache(long int elements, long int expire):
+- ExpireLRUCache<ino_t, CachedResult>::ExpireLRUCache<ino_t, CachedResult>(elements, expire) {
++ ExpireLRUCache<ino_t, CachedResult>(elements, expire) {
+ }
+
+ ScanCache::~ScanCache() {
diff --git a/sys-fs/clamfs/files/clamfs-1.0.1-gentoo.patch b/sys-fs/clamfs/files/clamfs-1.0.1-gentoo.patch
new file mode 100644
index 000000000000..f5c02daca6d6
--- /dev/null
+++ b/sys-fs/clamfs/files/clamfs-1.0.1-gentoo.patch
@@ -0,0 +1,12 @@
+diff -Naur clamfs-1.0.1.orig/doc/clamfs.xml clamfs-1.0.1/doc/clamfs.xml
+--- clamfs-1.0.1.orig/doc/clamfs.xml 2009-02-07 23:09:26.000000000 +0900
++++ clamfs-1.0.1/doc/clamfs.xml 2010-01-08 18:19:13.000000000 +0900
+@@ -16,7 +16,7 @@
+ check - (yes or no) check if clamd is available on startup (useful if
+ mounting clamfs file systems from /etc/fstab early on startup,
+ while clamav daemon is not yet started) -->
+- <clamd socket="/var/run/clamav/clamd.ctl" check="yes" />
++ <clamd socket="/var/run/clamav/clamd.sock" check="yes" />
+
+ <!-- File system settings
+ root - real directory to attach as our root
diff --git a/sys-fs/clamfs/files/clamfs.confd b/sys-fs/clamfs/files/clamfs.confd
new file mode 100644
index 000000000000..941549a4ca60
--- /dev/null
+++ b/sys-fs/clamfs/files/clamfs.confd
@@ -0,0 +1 @@
+CLAMFS_CONFFILE="/etc/clamfs/clamfs.xml"
diff --git a/sys-fs/clamfs/files/clamfs.initd b/sys-fs/clamfs/files/clamfs.initd
new file mode 100644
index 000000000000..d7f911ee2b62
--- /dev/null
+++ b/sys-fs/clamfs/files/clamfs.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use logger
+ need clamd
+}
+
+start() {
+ ebegin "Starting clamfs"
+ start-stop-daemon --start --quiet \
+ --exec /usr/bin/clamfs -- ${CLAMFS_CONFFILE}
+ eend $? "Failed to start clamfs"
+}
+
+stop() {
+ ebegin "Stopping clamfs"
+ start-stop-daemon --stop --quiet --name clamfs
+ eend $? "Failed to stop clamfs"
+}
diff --git a/sys-fs/clamfs/metadata.xml b/sys-fs/clamfs/metadata.xml
new file mode 100644
index 000000000000..5b7eab143333
--- /dev/null
+++ b/sys-fs/clamfs/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ ClamFS is a FUSE-based user-space file system for Linux with on-access
+ anti-virus file scanning through clamd daemon (a file scanning service
+ developed by ClamAV Project).
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">clamfs</remote-id>
+ </upstream>
+</pkgmetadata>