# $Id$ Name: FuzzyOcr Version: 3.5.1 Release: 3%{?dist} Summary: An OCR plugin for SpamAssassin Group: Development/Libraries License: Apache URL: http://fuzzyocr.own-hero.net/wiki Source0: http://users.own-hero.net/~decoder/fuzzyocr/fuzzyocr-%{version}-devel.tar.gz Patch100: FuzzyOcr-3.5.1-locations.patch Patch101: FuzzyOcr-3.5.1-pamditherbw.patch Patch102: FuzzyOcr-3.5.1-scanorder.patch Patch103: FuzzyOcr-3.5.1-fixes.patch Patch104: FuzzyOcr-3.5.1-lognoise.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch AutoReqProv: No Requires: perl Requires: gocr Requires: gifsicle Requires: ocrad Requires: netpbm-progs Requires: spamassassin >= 3.1.8 Requires: /usr/bin/giffix Requires: /usr/bin/giftext Requires: /usr/bin/gifinter Requires: perl(MLDBM) Requires: perl(String::Approx) Requires: perl(Time::HiRes) Requires: perl(MLDBM::Sync) Requires: perl(Log::Agent) Requires: perl(Tie::Cache) %description This plugin checks for specific keywords in GIF, JPEG, and PNG attachments, using gocr (an optical character recognition program). This plugin can be used to detect spam that puts all the real spam content in an attached image. The mail itself often will contain only random text and random html, without any URL's or identifiable information. This plugin has been extended to do approximate matches on words, so errors in recognition or attempts to obfuscate the text inside the image will not cause the detection to fail. %prep %setup %patch100 -p1 %patch101 -p1 %patch102 -p1 %patch103 -p1 %patch104 -p1 %{__perl} -pi -e "s#/usr/local/bin/perl#/usr/bin/perl#g" Utils/* %install # Determine the proper perl directory: eval `%{__perl} -V:installsitelib` install -d %{buildroot}$installsitelib/Mail/SpamAssassin/Plugin/ install -d %{buildroot}$installsitelib/Mail/SpamAssassin/Plugin/FuzzyOcr/ install -d %{buildroot}%{_sysconfdir}/mail/spamassassin/ install -d %{buildroot}%{_bindir} install -m 644 FuzzyOcr.words %{buildroot}%{_sysconfdir}/mail/spamassassin/FuzzyOcr.words install -m 644 FuzzyOcr.cf %{buildroot}%{_sysconfdir}/mail/spamassassin/FuzzyOcr.cf install -m 644 FuzzyOcr.preps %{buildroot}%{_sysconfdir}/mail/spamassassin/FuzzyOcr.preps install -m 644 FuzzyOcr.scansets %{buildroot}%{_sysconfdir}/mail/spamassassin/FuzzyOcr.scansets install -m 644 FuzzyOcr.mysql %{buildroot}%{_sysconfdir}/mail/spamassassin/FuzzyOcr.mysql install -m 444 FuzzyOcr.pm %{buildroot}$installsitelib/Mail/SpamAssassin/Plugin/FuzzyOcr.pm install -m 444 FuzzyOcr/* %{buildroot}$installsitelib/Mail/SpamAssassin/Plugin/FuzzyOcr/ install -m 755 Utils/* %{buildroot}%{_bindir} # List files in perl directories above find %{buildroot}$installsitelib -type f \ | %{__perl} -pi -e 's#^%{buildroot}##g' > %{name}-%{version}-%{release}-filelist %pre %post %postun %clean rm -rf %{buildroot} %files -f %{name}-%{version}-%{release}-filelist %defattr(-,root,root) %doc INSTALL CHANGES %attr(0755,root,root) %{_bindir}/* %config %{_sysconfdir}/mail/spamassassin/* %changelog * Sun Jun 24 2007 Shad L. Lords 3.5.1-3 - Fix log (lint) noise [SME: 3100] * Sun Apr 29 2007 Shad L. Lords - Clean up spec so package can be built by koji/plague * Sun Jan 07 2007 Shad L. Lords 3.5.0-0.rc1.sme.5 - add perl-MLDBM-Sync and perl-Time-Hires to requires, both are available from rpmforge - add perl-Log-Agent to requires - found src rpm here: http://apt.bea.ki.se/biorpms/fedora/linux/1/i386/SRPMS.biorpms/ (might work??) * Sun Dec 10 2006 Greg Swallow 3.5.0-0.rc1 - Fix typo in FuzzyOcr.preps * Sun Dec 10 2006 Shad L. Lords 3.5.0-0.rc1 - Fix location in cf file * Sun Dec 10 2006 Greg Swallow 3.5.0-0.rc1 - Update to 3.5.0 rc1 version - listed a few more new files - added patch to work with netpbm in CentOS * Thu Dec 07 2006 Shad L. Lords - Update to new release naming. No functional changes. - Make Packager generic * Mon Nov 20 2006 Japheth Cleaver 3.4.2-devel - new package