diff options
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | clamfs.rc.d | 51 | ||||
-rw-r--r-- | scancache.cxx.patch | 12 |
4 files changed, 123 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..fb2c7cbb1e30 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = clamfs + pkgdesc = A user-space anti-virus protected file system + pkgver = 1.0.1 + pkgrel = 4 + url = http://clamfs.sourceforge.net/ + arch = i686 + arch = x86_64 + license = GPL2 + makedepends = boost>=1.33 + depends = clamav + depends = commoncpp2 + depends = fuse + depends = poco + depends = rlog + backup = etc/clamav/clamfs.xml + source = http://downloads.sourceforge.net/clamfs/clamfs-1.0.1.tar.gz + source = scancache.cxx.patch + source = clamfs.rc.d + md5sums = e1528c48d3b2340b6c3ee83cfb427820 + md5sums = a672569c2caab2cc855cc7df1c9536d8 + md5sums = 4fd3f09866fb4bd20098f1da5d011a42 + +pkgname = clamfs + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1611abcc737b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Contributor: Jonathan Liu <net147@hotmail.com> +pkgname=clamfs +pkgver=1.0.1 +pkgrel=4 +pkgdesc="A user-space anti-virus protected file system" +arch=('i686' 'x86_64') +url="http://clamfs.sourceforge.net/" +license=('GPL2') +depends=('clamav' 'commoncpp2' 'fuse' 'poco' 'rlog') +makedepends=('boost>=1.33') +backup=('etc/clamav/clamfs.xml') +source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz" + "scancache.cxx.patch" + "clamfs.rc.d") +md5sums=('e1528c48d3b2340b6c3ee83cfb427820' + 'a672569c2caab2cc855cc7df1c9536d8' + '4fd3f09866fb4bd20098f1da5d011a42') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i "${srcdir}/scancache.cxx.patch" || return 1 + + ./configure --prefix=/usr + make || return 1 + make DESTDIR="${pkgdir}" install + + # copy sample config file + install -D -m644 doc/clamfs.xml "${pkgdir}/etc/clamav/clamfs.xml" + # adjust path to socket + sed -i -e 's#clamd socket="/var/run/clamav/clamd.ctl"#clamd socket="/var/lib/clamav/clamd.sock"#g' \ + "${pkgdir}/etc/clamav/clamfs.xml" + # install startup script + install -D -m755 "${srcdir}/clamfs.rc.d" "${pkgdir}/etc/rc.d/clamfs" +} + +# vim:set ts=2 sw=2 et: diff --git a/clamfs.rc.d b/clamfs.rc.d new file mode 100644 index 000000000000..f5853c64ca66 --- /dev/null +++ b/clamfs.rc.d @@ -0,0 +1,51 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/bin/clamfs` + +case "$1" in + start) + # if clamd isn't started first, notifyclamd fails at times + stat_busy "Starting ClamFS" + [ -z "$PID" ] && /usr/bin/clamfs /etc/clamav/clamfs.xml > /dev/null + + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon clamfs + stat_done + fi + ;; + + stop) + stat_busy "Stopping ClamFS" + [ -n "$PID" ] && kill $PID &> /dev/null + + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon clamfs + stat_done + fi + ;; + + restart) + $0 stop + sleep 3 + $0 start + ;; + + status) + stat_busy "Checking ClamFS status"; + ck_status clamfs + ;; + + *) + echo "usage: $0 {start|stop|restart|status}" +esac + +exit 0 + +# vim:set ts=2 sw=2 et: diff --git a/scancache.cxx.patch b/scancache.cxx.patch new file mode 100644 index 000000000000..e7cf026c927b --- /dev/null +++ b/scancache.cxx.patch @@ -0,0 +1,12 @@ +diff -Nur clamfs-1.0.1.orig/src/scancache.cxx clamfs-1.0.1/src/scancache.cxx +--- clamfs-1.0.1.orig/src/scancache.cxx 2009-02-08 01:09:26.000000000 +1100 ++++ clamfs-1.0.1/src/scancache.cxx 2010-08-01 21:25:14.985359686 +1000 +@@ -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() { |