Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37563300
en ru br
ALT Linux repositórios
S:0.103.8-alt1
5.0: 0.95.2-alt0.M50.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

Outros repositórios
Upstream:0.93rc1

Group :: Ferramentas de Arquivo
RPM: clamav

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%def_without static
%def_with milter

%def_with ownconfdir

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

%define rctag %nil

Name: clamav
Version: 0.95.2
Release: alt0.M50.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
%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.94.2-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

# sed used by configure script

BuildRequires: sed
# Automatically added by buildreq on Wed Sep 03 2008
# ...and edited manually to separate conditional buildreqs
BuildRequires: bzlib-devel libcheck-devel zlib-devel
%{?_with_milter:BuildRequires: sendmail-devel}


# for snapshots

%ifdef snap
BuildRequires: automake
%endif

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

### --- %patch10 -p0

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

%build
%ifdef snap
aclocal
%endif

# See http://www.gossamer-threads.com/lists/clamav/users/41630

rm -f configure.in

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

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

%make_build

install -m644 %_sourcedir/virusstat* .

%install
%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/
%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/var/lib/clamav/*.cvd
%if_without static
rm -f %buildroot%_libdir/*.a
%endif

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

# Quick fix for bad version tag

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

%post
# 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)

RNDM=$[$RANDOM/555]
/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
%preun_service clamd

%post milter
%post_service clamav-milter

%preun milter
%preun_service clamav-milter

%files
%doc AUTHORS BUGS ChangeLog README
%doc docs/signatures.*
%doc virusstat*

%_bindir/clamdscan
%_bindir/clamscan
%_bindir/sigtool
%_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*
%_man5dir/*
%_man8dir/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}
%_libdir/lib*.so.*

%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
%_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 static
%files -n lib%{name}-devel-static
%_libdir/lib*.a
%endif

%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/*.msg
%config(noreplace) %verify(not md5 size mtime) %clamconfdir/clamav-milter.conf
%config(noreplace) %verify(not md5 size mtime) %clamconfdir/clamav-milter.whitelist
%_man8dir/clamav-milter.*
%endif

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009