Репозиторий Sisyphus
Последнее обновление: 5 июня 2023 | Пакетов: 18455 | Посещений: 27942947
en ru br
Репозитории ALT
5.1: 0.98.1-alt0.M51.1
4.1: 0.97.8-alt0.M41.1
4.0: 0.97.8-alt0.M40.1
3.0: 0.86.2-alt1

Другие репозитории

Группа :: Работа с файлами
Пакет: clamav

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

# This spec is backported to ALTLinux 3.0 automatically by rpmbph script. Do not edit it.
%def_without static
%def_with milter

%def_with ownconfdir

%if_with ownconfdir
%define clamconfdir /etc/clamav
%define clamconfdir /etc

%define rctag %nil

Name: clamav
Version: 0.93.3
Release: alt0.M30.1

Packager: Victor Forsyuk <force at altlinux.org>

Summary: Clam Antivirus scanner
License: GPLv2 only
Group: File tools

URL: http://www.clamav.net/
%ifdef snap
Source0: http://www.clamav.net/snapshot/clamav-devel-%snap.tar.gz
Source0: http://download.sourceforge.net/clamav/clamav-%{version}%{rctag}.tar.gz

Source1: clamav.init
Source2: clamav.sysconfig

Source4: freshclam.cron
Source5: freshclam.logrotate
Source6: clamav.logrotate

Source10: clamav-milter.init
Source11: clamav-milter.sysconfig
Source12: clamav-milter.msg
Source13: clamav-milter.whitelist
Source14: clamav-milter.conf

Source20: virusstat-perIP
Source21: virusstat-perIP-PrevHour
Source22: virusstat-total
Source23: virusstat.cron.example

Patch1: clamav-0.91-config.patch
Patch2: freshclam-0.92rc2-config.patch

Patch10: clamav-milter-20070313-template.patch
Patch11: clamav-milter-20041206-ip-to-log.patch

Patch12: clamav-milter-0.87.3-2-log.patch
Patch13: clamav.cfgparser.0.88.3.c.SysLogVerbose.parch

Patch20: clamav-0.90-libs.private.patch

# Package with clamd should require libclamav, not vice versa.

# Corresponding libclamav version need to be updated before, or clamd restart may fail!
Requires: lib%{name} = %version-%release

# Database updater moved to separated package.

Requires: clamav-freshclam = %version-%release

# postinstall uses subst utility

Requires(post): sed >= 1:3.02-alt1

# bc and sed used by configure script

BuildRequires: sed

# Automatically added by buildreq on Wed Feb 14 2007

# ...and edited manually to separate conditional buildreqs (and remove exim-common :-)
BuildRequires: bc bzlib-devel libgmp-devel zlib-devel

# for snapshots

%ifdef snap
BuildRequires: automake_1.8

%{?_with_milter:BuildRequires: sendmail-devel sendmail-libs}

BuildRequires: rpm-build-compat >= 0.95

Clam AntiVirus is an anti-virus toolkit for Unix. The main purpose
of this software is the integration with mail servers (attachment
scanning). The package provides a flexible and scalable
multi-threaded daemon, a commandline scanner, and a tool for
automatic updating via Internet. The programs are based on a
shared library distributed with the Clam AntiVirus package, which
you can use in your own software.

%package -n lib%{name}
Summary: Shared libraries for clamav
Group: Development/C

%description -n lib%{name}
Shared libraries for clamav.

%package -n lib%{name}-devel
Summary: Development header files and libraries for clamav
Group: Development/C
Requires: %name = %version

%description -n lib%{name}-devel
This package contains the development header files and libraries
necessary to develop clamav client applications.

%package -n lib%{name}-devel-static
Summary: clamav static libraries
Group: Development/C
Requires: lib%{name}-devel = %version

%description -n lib%{name}-devel-static
clamav static libraries.

%package milter
Summary: clamav-milter for sendmail
Group: File tools
Requires: clamav = %version, sendmail

%description milter
This package contains the filter for Sendmail necessary to
integrate clamav with Sendmail MTA.

%package manual
Summary: ClamAV User Manual
Group: Books/Howtos

%description manual
This package contains user manual for clamav in HTML format.

%package freshclam
Summary: Auto-updater for the Clam Antivirus scanner virus signature files
Group: File tools

%description freshclam
This package contains programs which can be used to update the clamav
anti-virus database automatically. It uses the freshclam(1) utility for
this task.

%setup %{?snap: -n clamav-devel-%snap} %{?rctag: -n clamav-%{version}%{rctag}}
%patch1 -p1
%patch2 -p1

%patch10 -p0
#%patch11 -p0
#%patch12 -p0
#%patch13 -p0
%patch20 -p1

%ifdef snap

# --disable-clamav: Disable test for clamav user/group

%configure \
--enable-experimental \
--sysconfdir=%clamconfdir \
--disable-clamav \
--with-user=mail \
--with-group=mail \
--without-tcpwrappers \
--with-dbdir=/var/lib/%name %{?_with_milter: --enable-milter --with-sendmail=/usr/sbin/sendmail}

# configure trying to get sendmail version (used in milter code) from installed sendmail!

# I'd like to simplify build on host systems with alternative MTA installed so I prefer
# to just add needed strings:
cat <<EOF >>clamav-config.h
# NB: yes, hardcoded. If you want to build clamav-milter for older sendmail
# change numbers accordingly!


install -m644 %_sourcedir/virusstat* .

%make_install install DESTDIR=%buildroot

# fix config

%__subst 's| at  at CLAMAVCONFDIR at  at |%clamconfdir|' %buildroot%clamconfdir/freshclam.conf

%{!?_with_milter:rm -f %buildroot%_man1dir/clamav-milter*}

install -pD -m755 %_sourcedir/clamav.init %buildroot/etc/rc.d/init.d/clamd
install -m755 %_sourcedir/clamav-milter.init %buildroot/etc/rc.d/init.d/clamav-milter

install -pD %_sourcedir/clamav.sysconfig %buildroot/etc/sysconfig/clamd

%if_with milter
#install -m644 %_sourcedir/clamav-milter.sysconfig %buildroot/etc/sysconfig/clamav-milter
sed -e 's| at  at CLAMAVCONFDIR at  at |%clamconfdir|' < %_sourcedir/clamav-milter.sysconfig > %buildroot/etc/sysconfig/clamav-milter
install -m644 %_sourcedir/clamav-milter.whitelist %buildroot%clamconfdir/
install -m644 %_sourcedir/clamav-milter.msg %buildroot%clamconfdir/
install -m644 %_sourcedir/clamav-milter.conf %buildroot%clamconfdir/

install -d %buildroot%_logdir/clamav
touch %buildroot%_logdir/clamav/clamd.log
touch %buildroot%_logdir/clamav/freshclam.log

# install the logrotate stuff

install -pD -m644 %_sourcedir/freshclam.logrotate %buildroot%_sysconfdir/logrotate.d/freshclam
install -m644 %_sourcedir/clamav.logrotate %buildroot%_sysconfdir/logrotate.d/clamav

# pid file dir

install -d %buildroot/var/run/clamav

# install html docs

mkdir -p %buildroot%_defaultdocdir/clamav-manual
rm -rf docs/html/CVS
install -m644 docs/html/* %buildroot%_defaultdocdir/clamav-manual

# remove non-packaged files

rm -f %buildroot%_libdir/*.la
rm -f %buildroot/var/lib/clamav/*.cvd
%if_without static
rm -f %buildroot%_libdir/*.a

install -d %buildroot%_sysconfdir/cron.d
cat <<EOF >%buildroot%_sysconfdir/cron.d/freshclam
30 * * * *       root    %_bindir/freshclam --quiet --daemon-notify

# Quick fix for bad version tag

%__subst 's/Version: \([0-9]\):\([0-9]\):\([0-9]\)/Version: \1\.\2\.\3/;' %buildroot%_libdir/pkgconfig/libclamav.pc

# virus db format changed with 0.65, so delete old databases
rm -f /var/lib/clamav/viruses.db*

# randomize time of database updating (in order to distribute load on servers evenly)

/usr/bin/subst s/^[0-9]*/$RNDM/ %_sysconfdir/cron.d/freshclam

touch %_logdir/clamav/clamd.log
chown mail.root %_logdir/clamav/clamd.log
chmod 644 %_logdir/clamav/clamd.log

%post_service clamd

%preun_service clamd

%post -n lib%{name} -p %post_ldconfig
%postun -n lib%{name} -p %postun_ldconfig

%post milter
%post_service clamav-milter

%preun milter
%preun_service clamav-milter

%doc docs/signatures.*
%doc virusstat*

%config %_initdir/clamd
%{?_with_ownconfdir: %dir %clamconfdir}
%config(noreplace) %verify(not md5 size mtime) %clamconfdir/clamd.conf
%config(noreplace) %_sysconfdir/logrotate.d/clamav
%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/clamd
%attr(3775,root,mail) %dir /var/lib/clamav
%attr(3775,root,mail) %dir /var/run/clamav
%attr(3771,root,mail) %dir %_logdir/clamav
%attr(640,mail,root) %ghost %_logdir/clamav/clamd.log

%files -n lib%{name}

%files freshclam
%{?_with_ownconfdir: %dir %clamconfdir}
%attr(3775,root,mail) %dir /var/lib/clamav
%attr(3775,root,mail) %dir /var/run/clamav
%attr(3771,root,mail) %dir %_logdir/clamav
%config(noreplace) %verify(not md5 size mtime) %clamconfdir/freshclam.conf
%config(noreplace) %_sysconfdir/cron.d/freshclam
%config(noreplace) %_sysconfdir/logrotate.d/freshclam
%attr(644,mail,mail) %ghost %_logdir/clamav/freshclam.log

%files -n lib%{name}-devel

%files manual

%if_with static
%files -n lib%{name}-devel-static

%if_with milter
%files milter
%config %_initdir/clamav-milter
%config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/clamav-milter
%config(noreplace) %verify(not md5 size mtime) %clamconfdir/*.msg
%config(noreplace) %verify(not md5 size mtime) %clamconfdir/clamav-milter.conf
%config(noreplace) %verify(not md5 size mtime) %clamconfdir/clamav-milter.whitelist


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin