[arch-general] ClamAV should be update to 0.93
Gerhard Brauer
gerhard.brauer at web.de
Sun May 4 07:29:50 EDT 2008
On Sun, May 04, 2008 at 01:05:31PM +0200, Alessio Bolognino wrote:
> If you want to help someway, you could update the package, test it and
> send the sources (PKGBUILD and other stuff) to the maintainer or maybe
> even in this mailing list.
Here is my PKGBUILD for 0.93. I have tested it on two servers.
clamav restart must be done with caution cause sometimes the old
incremental daily content isn't regognized, so a freshclam must be done.
So restart or stop/start twice worked for me.
Regards
Gerhard
--
OOP? Frueher haben wir die Fehler selbst
programmiert, heute werden sie vererbt.
-------------- next part --------------
# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
# Maintainer: Dale Blount <dale at archlinux.org>
# Contributor: Gregor Ibic <gregor.ibic at intelicom.si>
pkgname=clamav
pkgver=0.93
pkgrel=1
pkgdesc="Anti-virus toolkit for Unix."
arch=(i686 x86_64)
depends=('bzip2' 'zlib' 'gmp' 'curl>=7.16.2' 'perl')
options=(!libtool)
install="$pkgname.install"
license=(GPL)
backup=(etc/clamav/clamav.conf etc/clamav/clamd.conf etc/clamav/freshclam.conf etc/conf.d/clamav)
url="http://www.clamav.net"
source=(http://easynews.dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
clamav
clamav.confd
clamav.logrotate)
build() {
cd $startdir/src/$pkgname-$pkgver
./configure --prefix=/usr --sysconfdir=/etc/clamav \
--with-dbdir=/var/lib/clamav --disable-clamav
# will add clamav user with clamav.install
make || return 1
make DESTDIR=$startdir/pkg install || return 1
# make sure conf files get installed, cause make install
# doesn't do that if clamav is already installed upon building.
for i in clamd freshclam; do
install -D -m644 etc/$i.conf $startdir/pkg/etc/clamav/$i.conf
done
install -D -m644 $startdir/src/clamav.confd $startdir/pkg/etc/conf.d/clamav
install -D -m755 $startdir/src/clamav $startdir/pkg/etc/rc.d/clamav
install -D -m644 $startdir/src/clamav.logrotate $startdir/pkg/etc/logrotate.d/clamav
# create log dirs/files & fix conf files.
mkdir -p $startdir/pkg/var/log/clamav/
mkdir -p $startdir/pkg/var/run/clamav/
chown 64.root $startdir/pkg/var/log/clamav/
chown 64.root $startdir/pkg/var/run/clamav/
sed -i -e "s:\#LogFile /tmp/clamd.log:LogFile /var/log/clamav/clamd.log:" \
-e "s:\#PidFile /var/run/clamd.pid:PidFile /var/run/clamav/clamd.pid:" \
-e "s:\#User clamav:User clamav:" \
-e "s:\#LogTime:LogTime:" \
-e "s:\#TemporaryDirectory /var/tmp:TemporaryDirectory /tmp:" \
-e "s:\LocalSocket /tmp/clamd.socket:LocalSocket /var/lib/clamav/clamd.sock:" \
$startdir/pkg/etc/clamav/clamd.conf || return 1
sed -i -e "s:\#UpdateLogFile /var/log/freshclam.log:UpdateLogFile /var/log/clamav/freshclam.log:" \
-e "s:\#NotifyClamd /path/to/clamd.conf$:NotifyClamd /etc/clamav/clamd.conf:" \
$startdir/pkg/etc/clamav/freshclam.conf || return 1
# fix perms on virus database directory and un-distribute databases to require freshclam
rm $startdir/pkg/var/lib/clamav/*.cvd
chown 64:64 -R $startdir/pkg/var/lib/clamav/
# install clamdwatch
cd $startdir/src/$pkgname-$pkgver/contrib/clamdwatch
tar zxf clamdwatch.tar.gz
sed -i -e 's@/var/run/clamd.ctl@/var/lib/clamav/clamd.sock@' \
-e 's@/var/lock/subsys/clamd@/var/run/clamav/clamd.pid@' \
-e 's at mkstemp( "/tmp/clamdwatch-XXXXXXXXXXXXXXXX" );@mkstemp( "/tmp/clamdwatch-XXXXXXXXXXXXXXXX" );\nchmod 0644, "$tempFile";@' clamdwatch || return 1
install -D -m755 clamdwatch $startdir/pkg/usr/sbin/clamdwatch.pl || return 1
}
md5sums=('72ed6f4706858e72f24dda8a591df0da'
'338db2f3fbca9d5747ba635d576d8739'
'f1fd8e736f808da0487928274f585851'
'a7a4d527ba80ec9d4811e2264e9fab9e')
More information about the arch-general
mailing list