137fae3
%define cvsver 20070301
137fae3
%define codename BlameBaltar
7f0e717
%define rel 4
60dbba1
60dbba1
Summary: CRM114 Bayesian Spam Detector
60dbba1
Name: crm114
60dbba1
Version: 0
60dbba1
Release: 0.%{rel}.%{cvsver}%{?dist}
60dbba1
URL: http://crm114.sourceforge.net/
60dbba1
License: GPL
60dbba1
Group: Applications/Text
137fae3
Source0: http://crm114.sourceforge.net/%{name}-%{cvsver}-%{codename}.no-TRE.src.tar.bz2
60dbba1
Patch0: %{name}-rpm.patch
7f0e717
Patch1: %{name}-64bit.patch
60dbba1
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
60dbba1
BuildRequires: tre-devel
60dbba1
60dbba1
%description 
60dbba1
CRM114 is a system to examine incoming e-mail, system log streams,
60dbba1
data files or other data streams, and to sort, filter, or alter the
60dbba1
incoming files or data streams according to the user's wildest
60dbba1
desires. Criteria for categorization of data can be by satisfaction of
60dbba1
regexes, by sparse binary polynomial matching with a Bayesian Chain
60dbba1
Rule evaluator, or by other means.
60dbba1
60dbba1
%package emacs
60dbba1
Summary: CRM114 mode for Emacs
60dbba1
Group: Applications/Text
60dbba1
Requires: emacs-el
60dbba1
60dbba1
%description emacs
60dbba1
Major Emacs mode for editing crm114 scripts.
60dbba1
60dbba1
%prep
137fae3
%setup -q -n %{name}-%{cvsver}-%{codename}.no-TRE.src
60dbba1
%patch0 -p1 -b .r
7f0e717
%patch1 -p1 -b .64bit
60dbba1
chmod 644 README *.cf *.h *.recipe *.txt
60dbba1
60dbba1
%build
60dbba1
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS"
60dbba1
60dbba1
%clean 
60dbba1
rm -rf $RPM_BUILD_ROOT
60dbba1
60dbba1
%install
60dbba1
rm -rf $RPM_BUILD_ROOT
60dbba1
install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/{%{name},emacs/site-lisp}}
60dbba1
make DESTDIR=$RPM_BUILD_ROOT install
60dbba1
install -pm 755 mail{filter,reaver,trainer}.crm $RPM_BUILD_ROOT%{_datadir}/%{name}/
60dbba1
install -pm 644 maillib.crm $RPM_BUILD_ROOT%{_datadir}/%{name}/
60dbba1
60dbba1
%check
60dbba1
make megatest
60dbba1
60dbba1
%files
60dbba1
%defattr(-,root,root,-)
60dbba1
%doc README *.txt *.recipe *.example mailfilter.cf
60dbba1
%{_bindir}/*
60dbba1
%{_datadir}/%{name}
60dbba1
60dbba1
%files emacs
60dbba1
%defattr(644,root,root,755)
60dbba1
%{_datadir}/emacs/site-lisp/*.el
60dbba1
60dbba1
%changelog
7f0e717
* Tue Apr 17 2007 Dominik Mierzejewski <rpm@greysector.net> 0-0.4.20070301
7f0e717
- fix testsuite on 64bit, patch by Jaakko Hyvätti
7f0e717
137fae3
* Sun Apr 15 2007 Dominik Mierzejewski <rpm@greysector.net> 0-0.3.20070301
137fae3
- updated to 20070301 "BlameBaltar"
137fae3
- added missing quine.crm to testsuite
137fae3
- no more crashes on x86_64, removed ExcludeArch, fixes #202893
137fae3
b96af80
* Tue Aug 29 2006 Dominik Mierzejewski <rpm@greysector.net> 0-0.2.20060704
b96af80
- mass rebuild
b96af80
60dbba1
* Wed Aug 16 2006 Dominik Mierzejewski <rpm@greysector.net> 0-0.1.20060704
60dbba1
- FE-compliant versioning
60dbba1
- emacs subpackage should require emacs-el
60dbba1
- simplified file list
60dbba1
- added %%check
60dbba1
- small patch to make 'make megatest' work from current dir
60dbba1
- ExcludeArch: x86_64 until 64bit tre is fixed
60dbba1
60dbba1
* Wed Jul 26 2006 Dominik Mierzejewski <rpm@greysector.net>
60dbba1
- 20060704a release
60dbba1
- added -emacs package with crm mode for emacs
60dbba1
- fixed parallel make build
60dbba1
- use dist tag
60dbba1
- shut up rpmlint
60dbba1
60dbba1
* Sun Feb 19 2006 Dominik Mierzejewski <rpm@greysector.net> 0-0.1.20060118
60dbba1
- FE compliance
60dbba1
- package mailfilter scripts
60dbba1
60dbba1
* Mon Dec 15 2003 Bill Yerazunis <wsy@merl.com>
60dbba1
- removed -RCx stuff, now version contains it.
60dbba1
- updated for version 20031215-RC12
60dbba1
- License is GPL, not Artistic, so I corrected that.
60dbba1
60dbba1
* Sat Dec 13 2003 Kevin Fenzi <kevin-crm114@tummy.com>
60dbba1
- Converted line endings from dos format to unix. 
60dbba1
- Changed BuildPreReq to be 'tre-devel' 
60dbba1
- Fixed install to install into rpm build root. 
60dbba1
- tested on redhat 9 with latest tre. 
60dbba1
60dbba1
* Tue Oct 22 2003 Nico Kadel-Garcia <nkadel@merl.com>
60dbba1
- Created RedHat compatible .spec file
60dbba1
- Added libtre dependency to avoid building second package
60dbba1
- Hard-coded "INSTALL_DIR" in build/install setups