Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37042365
en ru br
Репозитории ALT
S:4.0.0-alt1.1
5.1: 3.3.0-alt0.M51.1
4.1: 3.2.5-alt1.M41.2
4.0: 3.2.1-alt1
+updates:3.2.1-alt1
3.0: 3.0.4-alt1
+backports:3.1.3-alt0.M30
www.altlinux.org/Changes

Группа :: Сети/Почта
Пакет: spamassassin

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

Name: spamassassin
Version: 3.2.1
Release: alt1

Summary: Spam filter for email written in perl
Group: Networking/Mail
License: Apache License v2.0
URL: http://www.spamassassin.org/

%define pname Mail-SpamAssassin
%define srcname %pname-%version

Source0: http://www.apache.org/dist/spamassassin/source/%srcname.tar.bz2
Source1: spamd.init
Source2: spamassassin_local.cf
Source3: spamd.sysconfig
Source10: 30_text_ru.cf

# disabled now

Patch1: spamassassin_3.0.x_dcc_lookup_revert.patch
# disabled now
Patch2: spamc-alt-configure.patch
# disabled now
Patch3: spamassassin-utf8_mode.patch

# from Debian:

Patch10: spamassassin-3.2.1-debian-change_config_paths.patch

%def_without test
# normal method nukes on errors :(
%define _perl_req_method relaxed

# build spamc with SSL support enabled?

%def_enable ssl

%{?_enable_ssl:BuildRequires: libssl-devel}

# Automatically added by buildreq on Tue Nov 14 2006

BuildRequires: libssl-devel perl-Archive-Tar perl-DBI perl-HTML-Parser perl-IO-Socket-SSL perl-IP-Country perl-Mail-SPF-Query perl-Razor

BuildRequires: perl-Net-DNS
BuildRequires: perl-Date-Manip
BuildRequires: perl-Parse-Syslog

Requires: perl-%pname = %version-%release

# Versioned requires for sa-update (see INSTALL in source for required versions):

Requires: perl-IO-Zlib >= 1.04
Requires: perl-Archive-Tar >= 1.23

%description
SpamAssassin provides you with a way to reduce if not completely eliminate
Unsolicited Commercial Email (SPAM) from your incoming email. It can be
invoked by a MTA such as exim or postfix, or can be called from a procmail
script, .forward file, etc. It uses a genetic-algorithm evolved scoring
system to identify messages which look spammy, then adds headers to the
message so they can be filtered by the user's mail reading software.

%package spamd
Summary: spamd - daemonized version of spamassassin
Group: Networking/Mail
Requires: perl-%pname = %version-%release

# Not autodetected by rpm, needed for spamc/spamd SSL communication:

Requires: perl-IO-Socket-SSL

# Use of Storable module removed in 3.1.0!

# Requires: perl-Storable

Requires(pre): shadow-utils
Requires(post): %post_service
Requires(preun): %preun_service

%description spamd
The purpose of this program is to provide a daemonized version of the
spamassassin executable. The goal is improving throughput performance
for automated mail checking.

This is intended to be used alongside "spamc", a fast, low-overhead C
client program.

%package spamc
Summary: spamc - client for spamd
Group: Networking/Mail
Requires(post): shadow-utils
Requires: %name-spamd = %version-%release

%description spamc
Spamc is the client half of the spamc/spamd pair. It should be used in place
of "spamassassin" in scripts to process mail. It will read the mail from
STDIN, and spool it to its connection to spamd, then read the result back and
print it to STDOUT. Spamc has extremely low overhead in loading, so it should
be much faster to load than the whole spamassassin program.

%package -n perl-%pname
Summary: Mail::SpamAssassin - SpamAssassin e-mail filter libraries
Group: Development/Perl
# Non-autodetectable deps listed below:
Requires: perl-Net-DNS
# Needed by SPF plugin
Requires: perl-Mail-SPF-Query
# Needed by RelayCountry plugin
Requires: perl-IP-Country

%description -n perl-%pname
Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text
analysis and several internet-based realtime blacklists. Using its rule
base, it uses a wide range of heuristic tests on mail headers and body
text to identify ``spam'', also known as unsolicited commercial email.
Once identified, the mail can then be optionally tagged as spam for
later filtering using the user's own mail user-agent application.

%prep
%setup -q -n %srcname
#%patch1 -p0
#%patch2 -p0
#%patch3 -p1

%patch10 -p1

install -m644 %_sourcedir/30_text_ru.cf rules/

%build
%perl_vendor_build LOCALRULESDIR=%_sysconfdir/spamassassin
pushd spamc
autoreconf -fisv
%configure \
--sysconfdir=%_sysconfdir/spamassassin \
--datadir=%_datadir/spamassassin \
%{subst_enable ssl}
popd
rm -f spamc/spamc
%make_build blib/script/spamc

%install
mkdir -p $RPM_BUILD_ROOT{/var/spool/spamassassin,%_localstatedir/spamd,/var/run/spamd}

%perl_vendor_install \
SYSCONFDIR=$RPM_BUILD_ROOT%_sysconfdir \
B_CONFDIR=$RPM_BUILD_ROOT%_sysconfdir/spamassassin \
I_CONF_DIR=$RPM_BUILD_ROOT%_sysconfdir/spamassassin \
B_DATADIR=$RPM_BUILD_ROOT%_datadir/spamassassin \
install

find $RPM_BUILD_ROOT -name .svn -exec rm -rf -- {} \;

install -pD -m755 %SOURCE1 $RPM_BUILD_ROOT%_initdir/spamd
install -pD -m644 %SOURCE2 $RPM_BUILD_ROOT%_sysconfdir/spamassassin/local.cf
install -pD -m644 %SOURCE3 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/spamd

# --- cp -p tools/sa-stats.pl $RPM_BUILD_ROOT%_bindir/sa-stats


# remove unpackaged files

rm -f $RPM_BUILD_ROOT/{.perl.req,usr/lib/perl5/i386-linux/perllocal.pod}

# NO! We don't want dependancy on PostgreSQL!

%add_findreq_skiplist %perl_vendor_privlib/Mail/SpamAssassin/BayesStore/PgSQL.pm

%post spamd
%post_service spamd

%preun spamd
%preun_service spamd

%post spamc
/usr/sbin/groupadd -r -f spamd
/usr/sbin/useradd -r -g spamd -d /dev/null -s /dev/null -n spamc >/dev/null 2>&1 ||:

%pre spamd
/usr/sbin/groupadd -r -f spamd
/usr/sbin/useradd -r -g spamd -d %_localstatedir/spamd -s /dev/null -n spamd >/dev/null 2>&1 ||:

%files
%doc CREDITS INSTALL README TRADEMARK USAGE procmailrc.example
%doc ldap sql
%_bindir/spamassassin
%_bindir/sa-compile
%_bindir/sa-learn
%_bindir/sa-update
%_man1dir/spamassassin*
%_man1dir/sa-compile*
%_man1dir/sa-learn*
%_man1dir/sa-update*
%dir %attr(0775,root,mail) /var/spool/spamassassin

%files spamd
%doc spamd/README spamd/PROTOCOL
%config %_initdir/spamd
%config(noreplace) %_sysconfdir/sysconfig/spamd
%_bindir/spamd
%_man1dir/spamd*
%attr(700,spamd,spamd) %_localstatedir/spamd/
%attr(3770,root,spamd) /var/run/spamd/

%files spamc
%_bindir/spamc
%_man1dir/spamc*

%files -n perl-%pname
%doc sample-nonspam.txt sample-spam.txt
%dir %_sysconfdir/spamassassin
%config(noreplace) %_sysconfdir/spamassassin/*
%_datadir/spamassassin
%perl_vendor_privlib/Mail
%perl_vendor_privlib/spamassassin-run.pod
%_man3dir/*

%changelog

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

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