]>
Commit | Line | Data |
---|---|---|
782a8c09 AM |
1 | Summary: A library and Mail Delivery Agent for Bayesian spam filtering |
2 | Name: dspam | |
3 | Version: 2.10.6 | |
4 | Release: 1 | |
5 | License: GPL | |
6 | Group: Applications/Mail | |
7 | Source0: http://www.nuclearelephant.com/projects/dspam/sources/%{name}-%{version}.tar.gz | |
8 | URL: http://www.nuclearelephant.com/projects/dspam/ | |
9 | BuildRequires: mysql-devel | |
10 | Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
11 | ||
12 | %description | |
13 | DSPAM (as in De-Spam) is an open-source project to create a new kind | |
14 | of anti-spam mechanism, and is currently effective as both a | |
15 | server-side agent for UNIX email servers and a developer's library for | |
16 | mail clients, other anti-spam tools, and similar projects requiring | |
17 | drop-in spam filtering. | |
18 | ||
19 | The DSPAM agent masquerades as the email server's local delivery agent | |
20 | and filters/learns spams using an advanced Bayesian statistical | |
21 | approach (based on Baye's theorem of combined probabilities) which | |
22 | provides an administratively maintenance-free, easy-learning Anti-Spam | |
23 | service custom tailored to each individual user's behavior. Advanced | |
24 | because on top of standard Bayesian filtering is also incorporated the | |
25 | use of Chained Tokens, de-obfuscation, and other enhancements. DSPAM | |
26 | works great with Sendmail and Exim, and should work well with any | |
27 | other MTA that supports an external local delivery agent (postfix, | |
28 | qmail, etc.) | |
29 | ||
30 | %package libs | |
31 | Summary: A library and Mail Delivery Agent for Bayesian spam filtering | |
32 | Group: Libraries | |
33 | ||
34 | %description libs | |
35 | DSPAM (as in De-Spam) is an open-source project to create a new kind | |
36 | of anti-spam mechanism, and is currently effective as both a | |
37 | server-side agent for UNIX email servers and a developer's library for | |
38 | mail clients, other anti-spam tools, and similar projects requiring | |
39 | drop-in spam filtering. | |
40 | ||
41 | The DSPAM agent masquerades as the email server's local delivery agent | |
42 | and filters/learns spams using an advanced Bayesian statistical | |
43 | approach (based on Baye's theorem of combined probabilities) which | |
44 | provides an administratively maintenance-free, easy-learning Anti-Spam | |
45 | service custom tailored to each individual user's behavior. Advanced | |
46 | because on top of standard Bayesian filtering is also incorporated the | |
47 | use of Chained Tokens, de-obfuscation, and other enhancements. DSPAM | |
48 | works great with Sendmail and Exim, and should work well with any | |
49 | other MTA that supports an external local delivery agent (postfix, | |
50 | qmail, etc.) | |
51 | ||
52 | %package devel | |
53 | Summary: Development library and header files for the %{name} library | |
54 | Group: Development/Libraries | |
55 | Requires: %{name}-libs = %{version}-%{release} | |
56 | ||
57 | %description devel | |
58 | DSPAM has had its core engine moved into a separate library, libdspam. | |
59 | This library can be used by developers to provide 'drop-in' spam | |
60 | filtering for their mail client applications, other anti-spam tools, | |
61 | or 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 | |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
94 | %makeinstall_std | |
95 | ||
96 | # install devel files | |
97 | install -d %{buildroot}%{_includedir}/%{name} | |
98 | install -m0644 libdspam.h %{buildroot}%{_includedir}/%{name}/ | |
99 | install -m0644 libdspam_objects.h %{buildroot}%{_includedir}/%{name}/ | |
100 | install -m0644 lht.h %{buildroot}%{_includedir}/%{name}/ | |
101 | install -m0644 nodetree.h %{buildroot}%{_includedir}/%{name}/ | |
102 | ||
103 | # provide maintenance scripts | |
104 | install -d %{buildroot}%{_sysconfdir}/cron.daily | |
105 | install -d %{buildroot}%{_sysconfdir}/cron.weekly | |
106 | ||
107 | cat > %{buildroot}%{_sysconfdir}/cron.daily/%{name} <<EOF | |
108 | #!/bin/sh | |
109 | exec %{_bindir}/%{name}_clean 2>&1 > /dev/null | |
110 | EOF | |
111 | ||
112 | chmod 755 %{buildroot}%{_sysconfdir}/cron.daily/%{name} | |
113 | ||
114 | # fix prefix | |
115 | perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" %{buildroot}%{_bindir}/%{name}_corpus | |
116 | perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" cgi/dspam.cgi | |
117 | ||
118 | cp tools.mysql_drv/README README.mysql | |
119 | ||
120 | # fix purge stuff | |
121 | install -m0755 dspam-cron.weekly %{buildroot}%{_sysconfdir}/cron.weekly/%{name} | |
122 | ||
123 | # fix missing file | |
124 | install -d %{buildroot}/var/lib/%{name} | |
125 | cat > %{buildroot}/var/lib/%{name}/mysql.data <<EOF | |
126 | _UNCONFIGURED_ | |
127 | ||
128 | Note! | |
129 | ||
130 | This file can only contain 5 lines with the following values: | |
131 | ||
132 | HOSTNAME | |
133 | PORT | |
134 | USERNAME | |
135 | PASSWORD | |
136 | DATABASE | |
137 | EOF | |
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 |