]> git.pld-linux.org Git - packages/dspam.git/blame - dspam.spec
- nfy
[packages/dspam.git] / dspam.spec
CommitLineData
782a8c09
AM
1Summary: A library and Mail Delivery Agent for Bayesian spam filtering
2Name: dspam
3Version: 2.10.6
4Release: 1
5License: GPL
6Group: Applications/Mail
7Source0: http://www.nuclearelephant.com/projects/dspam/sources/%{name}-%{version}.tar.gz
8URL: http://www.nuclearelephant.com/projects/dspam/
9BuildRequires: mysql-devel
10Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
11
12%description
13DSPAM (as in De-Spam) is an open-source project to create a new kind
14of anti-spam mechanism, and is currently effective as both a
15server-side agent for UNIX email servers and a developer's library for
16mail clients, other anti-spam tools, and similar projects requiring
17drop-in spam filtering.
18
19The DSPAM agent masquerades as the email server's local delivery agent
20and filters/learns spams using an advanced Bayesian statistical
21approach (based on Baye's theorem of combined probabilities) which
22provides an administratively maintenance-free, easy-learning Anti-Spam
23service custom tailored to each individual user's behavior. Advanced
24because on top of standard Bayesian filtering is also incorporated the
25use of Chained Tokens, de-obfuscation, and other enhancements. DSPAM
26works great with Sendmail and Exim, and should work well with any
27other MTA that supports an external local delivery agent (postfix,
28qmail, etc.)
29
30%package libs
31Summary: A library and Mail Delivery Agent for Bayesian spam filtering
32Group: Libraries
33
34%description libs
35DSPAM (as in De-Spam) is an open-source project to create a new kind
36of anti-spam mechanism, and is currently effective as both a
37server-side agent for UNIX email servers and a developer's library for
38mail clients, other anti-spam tools, and similar projects requiring
39drop-in spam filtering.
40
41The DSPAM agent masquerades as the email server's local delivery agent
42and filters/learns spams using an advanced Bayesian statistical
43approach (based on Baye's theorem of combined probabilities) which
44provides an administratively maintenance-free, easy-learning Anti-Spam
45service custom tailored to each individual user's behavior. Advanced
46because on top of standard Bayesian filtering is also incorporated the
47use of Chained Tokens, de-obfuscation, and other enhancements. DSPAM
48works great with Sendmail and Exim, and should work well with any
49other MTA that supports an external local delivery agent (postfix,
50qmail, etc.)
51
52%package devel
53Summary: Development library and header files for the %{name} library
54Group: Development/Libraries
55Requires: %{name}-libs = %{version}-%{release}
56
57%description devel
58DSPAM has had its core engine moved into a separate library, libdspam.
59This library can be used by developers to provide 'drop-in' spam
60filtering for their mail client applications, other anti-spam tools,
61or similar projects.
62
63%prep
64%setup -q
65
66%build
67%configure2_13 \
68 --enable-trusted-user-security \
69 --enable-bayesian-dobly \
70 --enable-chained-tokens \
71 --enable-neural-networking \
72 --enable-experimental \
73 --enable-signature-attachments \
74 --enable-bias \
75 --enable-large-scale \
76 --enable-delivery-to-stdout \
77 --enable-virtual-users \
78 --with-userdir=/var/lib/%{name} \
79 --with-userdir-owner=none \
80 --with-userdir-group=none \
81 --with-dspam-owner=none \
82 --with-dspam-group=none \
83 --with-signature-life=14 \
84 --disable-dependency-tracking \
85 --enable-virtual-users \
86 --with-storage-driver=mysql_drv \
87 --with-mysql-includes=%{_includedir}/mysql \
88 --with-mysql-libraries=%{_libdir}/mysql \
89%{__make}
90
91%install
92rm -rf $RPM_BUILD_ROOT
93
94%makeinstall_std
95
96# install devel files
97install -d %{buildroot}%{_includedir}/%{name}
98install -m0644 libdspam.h %{buildroot}%{_includedir}/%{name}/
99install -m0644 libdspam_objects.h %{buildroot}%{_includedir}/%{name}/
100install -m0644 lht.h %{buildroot}%{_includedir}/%{name}/
101install -m0644 nodetree.h %{buildroot}%{_includedir}/%{name}/
102
103# provide maintenance scripts
104install -d %{buildroot}%{_sysconfdir}/cron.daily
105install -d %{buildroot}%{_sysconfdir}/cron.weekly
106
107cat > %{buildroot}%{_sysconfdir}/cron.daily/%{name} <<EOF
108#!/bin/sh
109exec %{_bindir}/%{name}_clean 2>&1 > /dev/null
110EOF
111
112chmod 755 %{buildroot}%{_sysconfdir}/cron.daily/%{name}
113
114# fix prefix
115perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" %{buildroot}%{_bindir}/%{name}_corpus
116perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" cgi/dspam.cgi
117
118cp tools.mysql_drv/README README.mysql
119
120# fix purge stuff
121install -m0755 dspam-cron.weekly %{buildroot}%{_sysconfdir}/cron.weekly/%{name}
122
123# fix missing file
124install -d %{buildroot}/var/lib/%{name}
125cat > %{buildroot}/var/lib/%{name}/mysql.data <<EOF
126_UNCONFIGURED_
127
128Note!
129
130This file can only contain 5 lines with the following values:
131
132HOSTNAME
133PORT
134USERNAME
135PASSWORD
136DATABASE
137EOF
138
139%post libs -p /sbin/ldconfig
140%postun libs -p /sbin/ldconfig
141
142%clean
143[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
144
145%files
146%defattr(644,root,root,755)
147%doc README CHANGE
148%doc cgi/base.css cgi/dspam.cgi cgi/logo.gif cgi/template.html
149%doc README.mysql
150%doc tools.mysql_drv/mysql_objects.sql.space.optimized
151%doc tools.mysql_drv/mysql_objects.sql.speed.optimized
152%doc tools.mysql_drv/purge.sql
153%doc tools.mysql_drv/virtual_users.sql
154%dir %attr(0750,root,mail) /var/lib/%{name}
155%attr(0640,root,mail) %config(noreplace) /var/lib/%{name}/mysql.data
156%attr(0755,root,root) %config(noreplace) %{_sysconfdir}/cron.daily/%{name}
157%attr(0755,root,root) %config(noreplace) %{_sysconfdir}/cron.weekly/%{name}
158%attr(0755,root,mail) %{_bindir}/%{name}
159%attr(0755,root,root) %{_bindir}/%{name}_clean
160%attr(0755,root,root) %{_bindir}/%{name}_corpus
161%attr(0755,root,root) %{_bindir}/%{name}_crc
162%attr(0755,root,root) %{_bindir}/%{name}_dump
163%attr(0755,root,root) %{_bindir}/%{name}_genaliases
164%attr(0755,root,root) %{_bindir}/%{name}_stats
165%attr(0755,root,root) %{_bindir}/%{name}_merge
166%attr(0755,root,root) %{_bindir}/%{name}_2mysql
167%attr(0755,root,root) %{_bindir}/%{name}_ngstats
168
169%files libs
170%defattr(644,root,root,755)
171%doc README CHANGE
172%attr(0755,root,root) %{_libdir}/*.so.*
173
174%files devel
175%defattr(644,root,root,755)
176%attr(0644,root,root) %{_includedir}/%{name}/*.h
177%attr(0755,root,root) %{_libdir}/*.so
178%attr(0644,root,root) %{_libdir}/*.la
179%attr(0755,root,root) %{_libdir}/*.a
This page took 0.139859 seconds and 4 git commands to generate.