2004-09-09 12:35:12 +00:00
|
|
|
%define _use_internal_dependency_generator 0
|
|
|
|
|
2004-09-09 12:34:26 +00:00
|
|
|
%define name spamassassin
|
|
|
|
%define real_name Mail-SpamAssassin
|
2004-09-09 12:37:25 +00:00
|
|
|
%define krb5backcompat %([ -a /usr/kerberos/include/krb5.h ] && echo 1 || echo 0)
|
2004-09-09 12:34:26 +00:00
|
|
|
|
2004-09-09 12:39:30 +00:00
|
|
|
%{!?perl_vendorlib: %define perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)}
|
|
|
|
|
2004-09-09 12:35:12 +00:00
|
|
|
Summary: Spam filter for email which can be invoked from mail delivery agents.
|
2004-09-09 12:34:26 +00:00
|
|
|
Name: %{name}
|
2004-09-09 12:38:45 +00:00
|
|
|
Version: 3.0
|
2004-09-09 12:40:49 +00:00
|
|
|
Release: 6.rc1
|
2004-09-09 12:38:53 +00:00
|
|
|
License: Apache License
|
2004-09-09 12:34:52 +00:00
|
|
|
Group: Applications/Internet
|
2004-09-09 12:34:26 +00:00
|
|
|
URL: http://spamassassin.org/
|
2004-09-09 12:40:35 +00:00
|
|
|
Source0: Mail-SpamAssassin-3.0.0-rc1.tar.bz2
|
2004-09-09 12:34:26 +00:00
|
|
|
Source2: redhat_local.cf
|
|
|
|
Source3: spamassassin-default.rc
|
|
|
|
Source4: spamassassin-spamc.rc
|
|
|
|
Source5: spamassassin.sysconfig
|
2004-09-09 12:35:12 +00:00
|
|
|
Source10: spamassassin-helper.sh
|
2004-09-09 12:34:26 +00:00
|
|
|
Source99: filter-requires-spamassassin.sh
|
2004-09-09 12:39:43 +00:00
|
|
|
Patch3: spamassassin-3.0-krb5-backcompat.patch
|
2004-09-09 12:38:38 +00:00
|
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
2004-09-09 12:34:26 +00:00
|
|
|
Buildroot: %{_tmppath}/%{name}-root
|
|
|
|
Prefix: %{_prefix}
|
2004-09-09 12:37:25 +00:00
|
|
|
Requires: /sbin/chkconfig /sbin/service
|
2004-09-09 12:34:26 +00:00
|
|
|
|
|
|
|
BuildRequires: perl >= 2:5.8.0
|
2004-09-09 12:40:49 +00:00
|
|
|
BuildRequires: perl(Net::DNS)
|
|
|
|
BuildRequires: perl(Time::HiRes)
|
|
|
|
BuildRequires: perl(HTML::Parser)
|
2004-09-09 12:37:25 +00:00
|
|
|
BuildRequires: openssl-devel
|
2004-09-09 12:34:26 +00:00
|
|
|
|
2004-09-09 12:40:49 +00:00
|
|
|
Requires: perl(Net::DNS)
|
2004-09-09 12:34:26 +00:00
|
|
|
Requires: perl(Time::HiRes)
|
|
|
|
Requires: procmail
|
|
|
|
|
|
|
|
Obsoletes: perl-Mail-SpamAssassin
|
|
|
|
|
|
|
|
%define __find_requires %{SOURCE99}
|
|
|
|
|
|
|
|
%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 MDA such as sendmail 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. This distribution includes the spamd/spamc components
|
|
|
|
which create a server that considerably speeds processing of mail.
|
|
|
|
|
|
|
|
To enable spamassassin, if you are receiving mail locally, simply add
|
|
|
|
this line to your ~/.procmailrc:
|
|
|
|
INCLUDERC=/etc/mail/spamassassin/spamassassin-default.rc
|
|
|
|
|
|
|
|
To filter spam for all users, add that line to /etc/procmailrc
|
|
|
|
(creating if necessary).
|
|
|
|
|
|
|
|
%prep
|
2004-09-09 12:39:58 +00:00
|
|
|
%setup -q -n Mail-SpamAssassin-3.0.0
|
2004-09-09 12:38:45 +00:00
|
|
|
# %%setup -q -n %{real_name}-%{version}
|
|
|
|
|
2004-09-09 12:37:25 +00:00
|
|
|
# Backwards compatibility with older krb5-devel
|
|
|
|
echo %{krb5backcompat}
|
|
|
|
%if %{krb5backcompat}
|
|
|
|
%patch3 -p1
|
|
|
|
%endif
|
2004-09-09 12:34:26 +00:00
|
|
|
|
|
|
|
%build
|
2004-09-09 12:37:25 +00:00
|
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
%{__perl} Makefile.PL DESTDIR=$RPM_BUILD_ROOT/ SYSCONFDIR=%{_sysconfdir} INSTALLDIRS=vendor ENABLE_SSL=yes < /dev/null
|
2004-09-09 12:34:52 +00:00
|
|
|
|
2004-09-09 12:34:26 +00:00
|
|
|
|
|
|
|
%{__make} OPTIMIZE="$RPM_OPT_FLAGS"
|
|
|
|
#%make test
|
|
|
|
|
|
|
|
%install
|
2004-09-09 12:37:25 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2004-09-09 12:34:26 +00:00
|
|
|
%makeinstall PREFIX=%buildroot/%{prefix} \
|
2004-09-09 12:38:38 +00:00
|
|
|
INSTALLMAN1DIR=%buildroot/%{_mandir}/man1 \
|
|
|
|
INSTALLMAN3DIR=%buildroot/%{_mandir}/man3 \
|
2004-09-09 12:34:26 +00:00
|
|
|
LOCAL_RULES_DIR=%{buildroot}/etc/mail/spamassassin
|
2004-09-09 12:37:25 +00:00
|
|
|
chmod 755 %buildroot/%{_bindir}/* # allow stripping
|
2004-09-09 12:38:38 +00:00
|
|
|
install -d %buildroot/%{_initrddir}
|
|
|
|
install -m 0755 spamd/redhat-rc-script.sh %buildroot/%{_initrddir}/spamassassin
|
2004-09-09 12:34:26 +00:00
|
|
|
|
2004-09-09 12:34:52 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
|
|
|
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/local.cf
|
|
|
|
install -m644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/spamassassin
|
2004-09-09 12:34:26 +00:00
|
|
|
|
|
|
|
install -m 0644 %{SOURCE3} %buildroot/etc/mail/spamassassin
|
|
|
|
install -m 0644 %{SOURCE4} %buildroot/etc/mail/spamassassin
|
2004-09-09 12:35:12 +00:00
|
|
|
install -m 0755 %{SOURCE10} %buildroot/etc/mail/spamassassin
|
2004-09-09 12:34:26 +00:00
|
|
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
|
|
|
|
|
|
|
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
|
|
|
|
|
2004-09-09 12:34:52 +00:00
|
|
|
find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;
|
2004-09-09 12:39:30 +00:00
|
|
|
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
|
2004-09-09 12:34:52 +00:00
|
|
|
|
2004-09-09 12:34:26 +00:00
|
|
|
find $RPM_BUILD_ROOT/usr -type f -print |
|
|
|
|
sed "s@^$RPM_BUILD_ROOT@@g" |
|
|
|
|
grep -v perllocal.pod |
|
|
|
|
grep -v "\.packlist" > %{name}-%{version}-filelist
|
|
|
|
if [ "$(cat %{name}-%{version}-filelist)X" = "X" ] ; then
|
|
|
|
echo "ERROR: EMPTY FILE LIST"
|
|
|
|
exit -1
|
|
|
|
fi
|
2004-09-09 12:39:30 +00:00
|
|
|
find $RPM_BUILD_ROOT%{perl_vendorlib}/* -type d -print |
|
|
|
|
sed "s@^$RPM_BUILD_ROOT@%dir @g" >> %{name}-%{version}-filelist
|
2004-09-09 12:34:26 +00:00
|
|
|
|
|
|
|
%files -f %{name}-%{version}-filelist
|
|
|
|
%defattr(-,root,root)
|
2004-09-09 12:40:28 +00:00
|
|
|
%doc BUGS LICENSE CREDITS Changes README STATUS TRADEMARK UPGRADE
|
2004-09-09 12:39:30 +00:00
|
|
|
%doc USAGE sample-nonspam.txt sample-spam.txt
|
2004-09-09 12:38:38 +00:00
|
|
|
%config(noreplace) %{_initrddir}/spamassassin
|
2004-09-09 12:34:26 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/mail/spamassassin
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/spamassassin
|
|
|
|
|
|
|
|
%clean
|
2004-09-09 12:37:25 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2004-09-09 12:34:26 +00:00
|
|
|
|
|
|
|
%post
|
|
|
|
/sbin/chkconfig --add spamassassin
|
|
|
|
|
2004-09-09 12:39:30 +00:00
|
|
|
# -a and --auto-whitelist options were removed from 3.0.0
|
|
|
|
# prevent service startup failure
|
|
|
|
perl -p -i -e 's/(["\s]-\w+)a/$1/ ; s/(["\s]-)a(\w+)/$1$2/ ; s/(["\s])-a\b/$1/' /etc/sysconfig/spamassassin
|
|
|
|
perl -p -i -e 's/ --auto-whitelist//' /etc/sysconfig/spamassassin
|
|
|
|
|
2004-09-09 12:34:26 +00:00
|
|
|
if [ -f /etc/spamassassin.cf ]; then
|
|
|
|
%{__mv} /etc/spamassassin.cf /etc/mail/spamassassin/migrated.cf
|
|
|
|
fi
|
|
|
|
if [ -f /etc/mail/spamassassin.cf ]; then
|
|
|
|
%{__mv} /etc/mail/spamassassin.cf /etc/mail/spamassassin/migrated.cf
|
|
|
|
fi
|
|
|
|
|
2004-09-09 12:35:12 +00:00
|
|
|
%postun
|
|
|
|
if [ "$1" -ge "1" ]; then
|
|
|
|
/sbin/service spamassassin condrestart > /dev/null 2>&1
|
|
|
|
fi
|
|
|
|
|
2004-09-09 12:34:26 +00:00
|
|
|
%preun
|
|
|
|
if [ $1 = 0 ] ; then
|
|
|
|
/sbin/service spamassassin stop >/dev/null 2>&1
|
|
|
|
/sbin/chkconfig --del spamassassin
|
|
|
|
fi
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%changelog
|
2004-09-09 12:40:49 +00:00
|
|
|
* Sat Aug 21 2004 Warren Togami <wtogami@redhat.com> - 3.0-6.rc1
|
|
|
|
- fix perl module syntax in req and buildreqs
|
|
|
|
|
2004-09-09 12:40:35 +00:00
|
|
|
* Thu Aug 19 2004 Warren Togami <wtogami@redhat.com> - 3.0-5.rc1
|
|
|
|
- 3.0 rc1
|
|
|
|
|
2004-09-09 12:40:28 +00:00
|
|
|
* Sat Aug 07 2004 Warren Togami <wtogami@redhat.com> - 3.0-3.pre4
|
|
|
|
- 3.0 pre4
|
|
|
|
|
2004-09-09 12:39:58 +00:00
|
|
|
* Wed Jul 28 2004 Warren Togami <wtogami@redhat.com> - 3.0-3.pre2
|
|
|
|
- 3.0 pre2
|
|
|
|
|
2004-09-09 12:39:43 +00:00
|
|
|
* Mon Jun 20 2004 Warren Togami <wtogami@redhat.com> - 3.0-2.pre1
|
|
|
|
- 3.0.0 pre1
|
|
|
|
- remove unnecessary patches applied upstream
|
|
|
|
- update krb5 backcompat patch
|
|
|
|
|
2004-09-09 12:39:40 +00:00
|
|
|
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
|
|
|
|
- rebuilt
|
|
|
|
|
2004-09-09 12:39:30 +00:00
|
|
|
* Mon May 31 2004 Warren Togami <wtogami@redhat.com> - 3.0-svn20040530
|
|
|
|
- svn snapshot 20040530
|
|
|
|
- #124870 prevent service startup failure due to old -a option
|
|
|
|
- #124871 more docs
|
|
|
|
- #124872 unowned directories
|
|
|
|
|
2004-09-09 12:38:53 +00:00
|
|
|
* Tue May 24 2004 Warren Togami <wtogami@redhat.com> - 3.0-svn20040524
|
|
|
|
- #123432 do not start service by default
|
|
|
|
- #122488 remove CRLF's
|
|
|
|
- #123706 correct license
|
|
|
|
- svn snapshot 20040524
|
2004-09-09 12:38:45 +00:00
|
|
|
- svn snapshot 20040518
|
|
|
|
|
2004-09-09 12:38:38 +00:00
|
|
|
* Sun May 2 2004 Ville Skyttä <ville.skytta at iki.fi> - 2.63-8
|
|
|
|
- #122233
|
|
|
|
- Require perl(:MODULE_COMPAT_*).
|
|
|
|
- Use %%{_mandir} and %%{_initrddir}.
|
|
|
|
- Fix License tag and include License in docs.
|
|
|
|
- Backslashify multiline init script description.
|
|
|
|
|
2004-09-09 12:38:21 +00:00
|
|
|
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
|
|
|
|
- rebuilt
|
|
|
|
|
|
|
|
* Wed Feb 11 2004 Warren Togami <wtogami@redhat.com> 2.63-6
|
|
|
|
- require sitelib instead
|
2004-09-09 12:37:25 +00:00
|
|
|
|
|
|
|
* Wed Jan 21 2004 Warren Togami <wtogami@redhat.com> 2.63-3
|
|
|
|
- krb5-backcompat.patch so older krb5-devel does not fail
|
|
|
|
|
|
|
|
* Wed Jan 21 2004 Warren Togami <wtogami@redhat.com> 2.63-2
|
|
|
|
- upgrade to 2.63
|
|
|
|
|
|
|
|
* Mon Jan 19 2004 Warren Togami <wtogami@redhat.com> 2.62-3
|
|
|
|
- Ville Skyttä's fixes from #113596 including:
|
|
|
|
- Fix buildroot traces
|
|
|
|
- enable openssl
|
|
|
|
- Trailing slash to DESTDIR (bug 90202 comment 14).
|
|
|
|
- export optflags so they're honored, affects spamc only.
|
|
|
|
|
|
|
|
* Mon Jan 19 2004 Warren Togami <wtogami@redhat.com> 2.62-2
|
|
|
|
- upgrade to 2.62
|
|
|
|
- Prereq -> Requires, former is deprecated
|
|
|
|
- Require current version of perl
|
|
|
|
- Remove urban myth clean test
|
|
|
|
- TODO: Get rid of prefix
|
|
|
|
|
|
|
|
* Wed Dec 31 2003 Dan Walsh <dwalsh@redhat.com> 2.61-2
|
|
|
|
- Change sysconfdir to not use full path
|
|
|
|
|
|
|
|
* Tue Dec 9 2003 Chip Turner <cturner@redhat.com> 2.61-1
|
|
|
|
- upgrade to 2.61
|
|
|
|
|
2004-09-09 12:37:11 +00:00
|
|
|
* Fri Sep 26 2003 Chip Turner <cturner@redhat.com> 2.60-2
|
|
|
|
- update to 2.60
|
|
|
|
|
|
|
|
* Sat Jul 5 2003 Chip Turner <cturner@redhat.com> 2.55-3
|
|
|
|
- change perl dependency to more accurate versions with explicit epochs
|
|
|
|
|
|
|
|
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
|
|
|
|
- rebuilt
|
|
|
|
|
|
|
|
* Sat May 31 2003 Chip Turner <cturner@redhat.com> 2.55-1
|
|
|
|
- move to upstream version 2.55
|
|
|
|
|
2004-09-09 12:36:33 +00:00
|
|
|
* Tue May 13 2003 Chip Turner <cturner@redhat.com>
|
|
|
|
- bump for build
|
2004-09-09 12:37:11 +00:00
|
|
|
- change init.d script to not default to started
|
2004-09-09 12:36:33 +00:00
|
|
|
|
|
|
|
* Sun May 04 2003 Florian La Roche <Florian.LaRoche@redhat.de>
|
|
|
|
- remove Distribution: tag in spec file
|
|
|
|
|
|
|
|
* Wed Apr 16 2003 Chip Turner <cturner@redhat.com> 2.53-5
|
|
|
|
- remove SIGCHILD patch to properly return it to SIG_IGN now that
|
|
|
|
waitpid isn't used on Linux
|
|
|
|
|
|
|
|
* Mon Apr 14 2003 Chip Turner <cturner@redhat.com> 2.53-4.8.x
|
|
|
|
- update to 2.53 from upstream
|
|
|
|
|
|
|
|
* Fri Mar 21 2003 Chip Turner <cturner@redhat.com> 2.50-3.8.x
|
|
|
|
- update patch for servicename; should fix restarting/runlevel issues (#85975)
|
|
|
|
|
|
|
|
* Thu Mar 13 2003 Chip Turner <cturner@redhat.com> 2.50-2.8.x
|
|
|
|
- update to 2.50
|
|
|
|
|
2004-09-09 12:35:12 +00:00
|
|
|
* Tue Feb 25 2003 Elliot Lee <sopwith@redhat.com>
|
|
|
|
- rebuilt
|
|
|
|
|
|
|
|
* Fri Feb 21 2003 Chip Turner <cturner@redhat.com>
|
|
|
|
- revert double fix for 84774
|
|
|
|
|
|
|
|
* Mon Feb 17 2003 Bill Nottingham <notting@redhat.com>
|
|
|
|
- fix startup (#84445)
|
|
|
|
|
|
|
|
* Thu Feb 13 2003 Bill Nottingham <notting@redhat.com>
|
|
|
|
- fix paths in initscript (#84216)
|
|
|
|
|
|
|
|
* Thu Feb 13 2003 Chip Turner <cturner@redhat.com>
|
|
|
|
- removing -P option since it is the default now, bug 84144
|
|
|
|
|
|
|
|
* Wed Feb 12 2003 Florian La Roche <Florian.LaRoche@redhat.de>
|
|
|
|
- fix SIGCHLD handling
|
|
|
|
|
|
|
|
* Mon Feb 10 2003 Bill Nottingham <notting@redhat.com>
|
|
|
|
- move condrestart to %postun
|
|
|
|
|
|
|
|
* Sun Feb 2 2003 Chip Turner <cturner@redhat.com>
|
|
|
|
- update to 2.44
|
|
|
|
- add condrestart to service script
|
|
|
|
|
|
|
|
* Thu Jan 30 2003 Chip Turner <cturner@redhat.com>
|
|
|
|
- release bump and rebuild
|
|
|
|
|
|
|
|
* Wed Jan 29 2003 Chip Turner <cturner@redhat.com>
|
|
|
|
- add upstream bsmtp off-by-one patch
|
|
|
|
|
|
|
|
* Mon Jan 20 2003 Chip Turner <cturner@redhat.com>
|
|
|
|
- add wrapper for 'spamassassin -e' for native evolution spam filtering
|
|
|
|
|
|
|
|
* Sat Jan 4 2003 Jeff Johnson <jbj@redhat.com> 2.43-10
|
|
|
|
- use internal dep generator.
|
|
|
|
|
|
|
|
* Wed Jan 1 2003 Chip Turner <cturner@redhat.com>
|
|
|
|
- rebuild
|
|
|
|
|
|
|
|
* Tue Dec 17 2002 Bill Nottingham <notting@redhat.com> 2.43-7
|
|
|
|
- don't run by default
|
|
|
|
|
|
|
|
* Sat Dec 14 2002 Tim Powers <timp@redhat.com> 2.43-6
|
|
|
|
- don't use rpms internal dep generator
|
|
|
|
- buildrequire perl-Time-HiRes instead of perl(Time:HiRes) so we can satisfy build deps in the build system
|
|
|
|
|
2004-09-09 12:34:52 +00:00
|
|
|
* Fri Nov 22 2002 Tim Powers <timp@redhat.com>
|
|
|
|
- rebuilt to solve broken perl deps
|
|
|
|
|
2004-09-09 12:34:29 +00:00
|
|
|
* Thu Aug 15 2002 Chip Turner <cturner@redhat.com>
|
|
|
|
- speedup patch from upstream
|
|
|
|
|
2004-09-09 12:34:26 +00:00
|
|
|
* Tue Aug 6 2002 Chip Turner <cturner@redhat.com>
|
|
|
|
- automated release bump and build
|
|
|
|
|
|
|
|
* Thu Jul 18 2002 Chip Turner <cturner@redhat.com>
|
|
|
|
- better control of service level, improvement in %post script.
|
|
|
|
- (contribs from schirmer@taytron.net)
|
|
|
|
|
|
|
|
* Fri Jun 28 2002 Chip Turner <cturner@redhat.com>
|
|
|
|
- added proper BuildRequire
|
|
|
|
|
|
|
|
* Wed Jun 26 2002 Chip Turner <cturner@redhat.com>
|
|
|
|
- updated to 2.31, added .rc file for procmail to INCLUDERC to enable
|
|
|
|
|
|
|
|
* Fri Apr 19 2002 Theo Van Dinter <felicity@kluge.net>
|
|
|
|
- Updated for 2.20 release
|
|
|
|
- made /etc/mail/spamassassin a config directory so local.cf doesn't get wiped out
|
|
|
|
- added a patch to remove findbin stuff
|
|
|
|
|
|
|
|
* Wed Feb 27 2002 Craig Hughes <craig@hughes-family.org>
|
|
|
|
- Updated for 2.1 release
|
|
|
|
|
|
|
|
* Sat Feb 02 2002 Theo Van Dinter <felicity@kluge.net>
|
|
|
|
- Updates for 2.01 release
|
|
|
|
- Fixed rc file
|
|
|
|
- RPM now buildable as non-root
|
|
|
|
- fixed post_service errors
|
|
|
|
- fixed provides to include perl modules
|
|
|
|
- use file find instead of manually specifying files
|
|
|
|
|
|
|
|
* Tue Jan 15 2002 Craig Hughes <craig@hughes-family.org>
|
|
|
|
- Updated for 2.0 release
|
|
|
|
|
|
|
|
* Wed Dec 05 2001 Craig Hughes <craig@hughes-family.org>
|
|
|
|
- Updated for final 1.5 distribution.
|
|
|
|
|
|
|
|
* Sun Nov 18 2001 Craig Hughes <craig@hughes-family.org>
|
|
|
|
- first version of rpm.
|
|
|
|
|