Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37547803
en ru br
Репозитории ALT
S:0.103.8-alt1
5.1: 0.98.1-alt0.M51.1
4.1: 0.97.8-alt0.M41.1
+updates:0.94.1-alt0.M41.1
4.0: 0.97.8-alt0.M40.1
+updates:0.91.2-alt1
3.0: 0.86.2-alt1
+updates:0.91.1-alt0.M30.1
+backports:0.93.3-alt0.M30.1
www.altlinux.org/Changes

Другие репозитории
Upstream:0.93rc1

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

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

%def_without milter

%def_with ownconfdir

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

%define rctag %nil

Name: clamav
Version: 0.97.8
Release: alt0.M40.1

Packager: Victor Forsiuk <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
%else
Source0: http://downloads.sourceforge.net/clamav/clamav-%{version}%{rctag}.tar.gz
%endif

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.96-config.patch
Patch2: freshclam-0.96.1-config.patch

Patch20: clamav-0.97.2-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

# sed used by configure script

BuildRequires: sed
# Automatically added by buildreq on Sat Oct 31 2009
BuildRequires: gcc-c++ bzlib-devel git-core libcheck-devel libncurses-devel subversion zlib-devel pkg-config

# ...and edited manually to separate conditional buildreqs

%{?_with_milter:BuildRequires: sendmail-devel}

# for snapshots

%{?snap: BuildRequires: automake}

%description
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 milter
Summary: clamav-milter for sendmail
Group: File tools
Requires: clamav = %version, /usr/sbin/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
BuildArch: noarch

%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.

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

%patch20 -p1

%build
%{?snap: aclocal}

%undefine __libtoolize

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

%configure \
--enable-llvm \
--sysconfdir=%clamconfdir \
--enable-experimental \
--enable-clamdtop \
--disable-clamav \
--with-user=mail \
--with-group=mail \
--with-dbdir=/var/lib/%name %{?_with_milter: --enable-milter}

# Safety belt for IPv6 enabling. We want to build clamav with IPv6 support,

# but can not rely on configure check as it can fail if build host set up
# as IPv4 only system.
echo >> clamav-config.h
echo "#ifndef SUPPORT_IPv6" >> clamav-config.h
echo "#define SUPPORT_IPv6 1" >> clamav-config.h
echo "#endif" >> clamav-config.h

%make_build

install -m644 %_sourcedir/virusstat* .

%install
%makeinstall_std

# 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 -pD %_sourcedir/clamav.sysconfig %buildroot/etc/sysconfig/clamd

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

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%_libdir/*.a
# databases is not installing in 0.97.5
if [ -d %buildroot/var/lib/clamav ] ; then
   rm -f %buildroot/var/lib/clamav/*.cvd
else
   mkdir -p %buildroot/var/lib/clamav
fi


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

%if_without milter
rm -f %buildroot/%_man8dir/clamav-milter.*
%endif

%post
# Format of database changing occasionally. So removing database.
for FNAME in `ls --ignore=*.socket /var/lib/clamav`; do
   [ -h /var/lib/clamav/$FNAME ] && continue
   [ -d /var/lib/clamav/$FNAME ] && rm -rf /var/lib/clamav/$FNAME
   [ -f /var/lib/clamav/$FNAME ] && rm -f /var/lib/clamav/$FNAME
done

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

RNDM=$[$RANDOM/555]
subst s/^[0-9]*/$RNDM/ %_sysconfdir/cron.d/freshclam

%post_service clamd

%preun
%preun_service clamd

%post milter
%post_service clamav-milter

%preun milter
%preun_service clamav-milter

%files
%doc docs/signatures.*
%doc virusstat*

%_bindir/clamdscan
%_bindir/clamscan
%_bindir/sigtool
%_bindir/clamdtop
%_bindir/clambc
%_sbindir/clamd
%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
%_man1dir/clamdscan*
%_man1dir/clamscan*
%_man1dir/sigtool*
%_man1dir/clamdtop*
%_man1dir/clambc*
%_man5dir/*
%_man8dir/clamd*
%attr(3775,root,mail) %dir /var/lib/clamav
%attr(3775,root,mail) %ghost %dir /var/run/clamav
%attr(3771,root,mail) %dir %_logdir/clamav
%attr(640,mail,root) %ghost %_logdir/clamav/clamd.log

%files -n lib%{name}
%_libdir/lib*.so.*

%files freshclam
%{?_with_ownconfdir: %dir %clamconfdir}
%attr(3775,root,mail) %dir /var/lib/clamav
%attr(3775,root,mail) %ghost %dir /var/run/clamav
%attr(3771,root,mail) %dir %_logdir/clamav
%_bindir/freshclam
%_man1dir/freshclam*
%_bindir/clamconf
%_man1dir/clamconf*
%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
%_bindir/clamav-config
%_libdir/lib*.so
%_libdir/pkgconfig/*
%_includedir/*.h

%files manual
%_defaultdocdir/clamav-manual

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

%changelog

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

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