File bogofilter.spec of Package bogofilter

#
# spec file for package bogofilter (Version 1.2.1)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           bogofilter
Version:        1.2.1
Release:        7
License:        GPLv2+
Group:          Productivity/Networking/Email/Utilities
Url:            http://bogofilter.sourceforge.net/
Source:         http://downloads.sourceforge.net/bogofilter/bogofilter-%{version}.tar.bz2
Patch:          bogofilter-SA-2010-01.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  db-devel sharutils
Summary:        Fast Anti-Spam Filtering by Bayesian Statistical Analysis

%description
Bogofilter is a Bayesian spam filter.  In normal operation, it takes an
e-mail message or text from standard input, does a statistical check
against lists of "good" and "bad" words, and returns a status code
indicating whether the message is spam.  Bogofilter is designed with
fast algorithms (including the Berkeley DB system), coded directly in
C, and tuned for speed, so it can be used for production by sites that
process a lot of mail.



Authors:
--------
    Eric Steven Raymond <esr@thyrsus.com>
    Adrian Otto <adrian_otto at users.sourceforge.net>
    David Relson <relson@osagesoftware.com>
    Matthias Andree <matthias.andree@gmx.de>
    Gyepi Sam <gyepi@praxis-sw.com>
    Allyn Fratkin <allyn@fratkin.com>
    Clint Adams <schizo@debian.org>

%prep
%setup
%patch -p1

%build
%{?suse_update_config:%{suse_update_config -f}}
%configure \
%ifarch %arm
	--disable-dbshared-test \
%endif
        --with-gnu-ld # just a dummy option to break the line
%{__make} %{?jobs:-j%jobs}

%install
%makeinstall
mv %{buildroot}/%{_sysconfdir}/bogofilter.cf.example %{buildroot}/%{_sysconfdir}/bogofilter.cf
for d in contrib; do
	install -d %{buildroot}%{_datadir}/%{name}/${d}
	files=$( find ${d} -maxdepth 1 -type f)
	for f in ${files} ; do
		case ${f} in
			*.c|*.o|*.obj|*/Makefile*) continue ;;
			*.1)
				cp -p ${f} %{buildroot}/%{_mandir}/man1 ;;
			*)
				cp -p ${f} %{buildroot}/%{_datadir}/%{name}/${d}
				head -n 1 ${f} | grep -q "^#\!" && \
					chmod 0755 %{buildroot}/%{_datadir}/%{name}/${d}/${f##*/}
				;;
		esac
	done
done

%check
%ifnarch %arm
%{__make} %{?jobs:-j%jobs} check
%endif

%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/bogofilter.cf
%{_bindir}/bogofilter
%{_bindir}/bogolexer
%{_bindir}/bogoupgrade
%{_bindir}/bogotune
%{_bindir}/bogoutil
%{_bindir}/bf_compact
%{_bindir}/bf_copy
%{_bindir}/bf_tar
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/contrib
%{_datadir}/%{name}/contrib/*
%{_mandir}/man1/bf_compact.1.gz
%{_mandir}/man1/bf_copy.1.gz
%{_mandir}/man1/bf_tar.1.gz
%{_mandir}/man1/bogofilter.1.gz
%{_mandir}/man1/bogolexer.1.gz
%{_mandir}/man1/bogotune.1.gz
%{_mandir}/man1/bogoupgrade.1.gz
%{_mandir}/man1/bogoutil.1.gz
%doc AUTHORS COPYING GETTING.STARTED INSTALL NEWS README* RELEASE.NOTES*
%doc TODO bogofilter.cf.example
%doc doc/README* doc/bogofilter-SA-* doc/*.html doc/integrating*
%doc doc/programmer/ doc/rpm.notes.BerkeleyDB

%changelog
openSUSE Build Service is sponsored by