--- /usr/local/debug/mail/spamassassin/redhat/spamassassin-3.2.5-2.fc10.fedora/specs/spamassassin.spec	2008-09-05 00:46:30.000000000 +0300
+++ spamassassin.spec	2008-09-07 11:06:55.000000000 +0300
@@ -1,9 +1,22 @@
+# Conditional build (--with/--without option)
+# --with contrib
+# --without ssl
+# --without ipv6
+# --with sa_compile
+# --with spf
+# --with spf_query
+
 # OPTION: perl-Archive-Tar (FC2+, RHEL4.6+)
 %define option_archive_tar 1
 # OPTION: SSL and IPv6 (FC6+, RHEL5+)
+%if %{?_without_ssl:0}%{!?_without_ssl:1}
 %define option_ssl 1
+%else
+%define option_ssl 0
+%endif
 # OPTION: Split perl-devel (FC7+)
-%define perl_devel 1
+#%define perl_devel 1
+%define perl_devel 0
 
 # DEPRECATED OPTION: Old krb5.h location (RHEL3 and old FC)
 %define option_old_krb5 0
@@ -14,7 +27,7 @@
 Summary: Spam filter for email which can be invoked from mail delivery agents.
 Name: spamassassin
 Version: 3.2.5
-Release: 2%{?dist}
+Release: 2%{?dist}.corvax
 License: ASL 2.0
 Group: Applications/Internet
 URL: http://spamassassin.apache.org/
@@ -31,6 +44,12 @@
 # none yet
 # Patches 100+ are SVN backports (DO NOT REUSE!)
 #Patch100: Mail-SpamAssassin-3.2.2-bug5574-setuid.patch
+# Patches 900+ for corvax
+Patch992: patch-src::DSPAM-3.2.5.patch
+Patch995: patch-src::MandatoryLearn-3.1.0.patch
+Patch997: patch-src::Charsets-3.1.3.patch
+Patch998: patch-src::RealName-3.1.0.patch
+Patch999: patch-src::MultiCaseSensHeadersCheck-3.2.0.patch
 # end of patches
 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 Buildroot: %{_tmppath}/%{name}-root
@@ -42,7 +61,10 @@
 BuildRequires: perl(Net::DNS)
 BuildRequires: perl(Time::HiRes)
 BuildRequires: perl(HTML::Parser)
+%if %{?_without_ssl:0}%{!?_without_ssl:1}
 BuildRequires: openssl-devel
+BuildRequires: krb5-devel e2fsprogs-devel
+%endif
 
 Requires: perl(HTTP::Date)
 Requires: perl(LWP::UserAgent)
@@ -56,12 +78,24 @@
 BuildRequires: perl-HTML-Parser >= 3.43
 Requires: perl-HTML-Parser >= 3.43
 
+%if %{?_with_sa_compile:1}%{!?_with_sa_compile:0}
+Requires: re2c >= 0.12.0
+%endif
+%if %{?_with_spf_query:1}%{!?_with_spf_query:0}
+Requires: perl-Mail-SPF-Query
+%endif
+%if %{?_with_spf:1}%{!?_with_spf:0}
+Requires: perl-Mail-SPF
+%endif
+
 %if %{option_archive_tar}
 Requires: perl(Archive::Tar)
 %endif
-%if %{option_ssl}
+%if %{?_without_ssl:0}%{!?_without_ssl:1}
 # Needed for spamc/spamd SSL
 Requires: perl(IO::Socket::SSL)
+%endif
+%if %{?_without_ipv6:0}%{!?_without_ipv6:1}
 # Needed for IPv6
 Requires: perl(IO::Socket::INET6)
 %endif
@@ -94,13 +128,30 @@
 # none yet
 # Patches 100+ are SVN backports (DO NOT REUSE!)
 #%patch100 -p0
+# Patches 900+ for corvax
+touch rules/local.pre
+%patch992 -p0 -b .orig
+%patch995 -p0 -b .orig
+%patch997 -p0 -b .orig
+%patch998 -p0 -b .orig
+echo "loadplugin Mail::SpamAssassin::Plugin::RealName" >> rules/local.pre
+%patch999 -p0 -b .orig
 # end of patches
 
 %build
 export CFLAGS="$RPM_OPT_FLAGS"
-%{__perl} Makefile.PL DESTDIR=$RPM_BUILD_ROOT/ SYSCONFDIR=%{_sysconfdir} INSTALLDIRS=vendor ENABLE_SSL=yes < /dev/null
+%if %{?_without_ssl:0}%{!?_without_ssl:1}
+%define enable_ssl yes
+%else
+%define enable_ssl no
+%endif
+%{__perl} Makefile.PL DESTDIR=$RPM_BUILD_ROOT/ INSTALLSCRIPT=%{_bindir} SYSCONFDIR=%{_sysconfdir} INSTALLDIRS=vendor ENABLE_SSL=%{enable_ssl} < /dev/null
 
+%if %{?_without_ssl:0}%{!?_without_ssl:1}
 %{__make} %{?option_old_krb5:SSLCFLAGS=-DSPAMC_SSL\ -I/usr/kerberos/include} OPTIMIZE="$RPM_OPT_FLAGS"
+%else
+%{__make} OPTIMIZE="$RPM_OPT_FLAGS"
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -126,6 +177,10 @@
 install -m 0600 %{SOURCE7} %buildroot/etc/cron.d/sa-update
 install -m 0744 %{SOURCE8} %buildroot%{_datadir}/spamassassin/sa-update.cron
 
+install -m 0644 rules/local.pre %buildroot/etc/mail/spamassassin
+
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
+
 [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
 
 find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;
@@ -149,6 +204,10 @@
 %defattr(-,root,root)
 %doc LICENSE NOTICE CREDITS Changes README TRADEMARK UPGRADE
 %doc USAGE sample-nonspam.txt sample-spam.txt
+%if %{?_with_contrib:1}%{!?_with_contrib:0}
+#%doc sql tools masses contrib
+%doc sql
+%endif
 %config %{_initrddir}/spamassassin
 %config(noreplace) %{_sysconfdir}/mail/spamassassin
 %config(noreplace) %{_sysconfdir}/sysconfig/spamassassin
@@ -212,6 +271,9 @@
 
 * Tue Jan 01 2008 Warren Togami <wtogami@redhat.com> 3.2.4-1
 - 3.2.4 major bugfix release
+ 
+* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org> - 3.2.3-3
+- Rebuild for deps
 
 * Tue Aug 21 2007 Warren Togami <wtogami@redhat.com> 3.2.3-2
 - rebuild
