3 %bcond_with mysql # enable MySQL storage driver (disable db4 driver)
4 %bcond_with pgsql # enable pgsql storage driver (disable db4 driver)
6 Summary: A library and Mail Delivery Agent for Bayesian spam filtering
7 Summary(pl): Biblioteka i MDA do bayesowskiego filtrowania spamu
12 Group: Applications/Mail
13 Source0: http://www.nuclearelephant.com/projects/dspam/sources/%{name}-%{version}.tar.gz
14 # Source0-md5: f5b568e8fea50faaf4c1fcabee177934
15 Patch0: %{name}-Makefile.patch
16 URL: http://www.nuclearelephant.com/projects/dspam/
18 BuildRequires: mysql-devel
19 %else if %{with pgsql}
20 BuildRequires: postgresql-devel
22 BuildRequires: db-devel
24 Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 DSPAM (as in De-Spam) is an open-source project to create a new kind
28 of anti-spam mechanism, and is currently effective as both a
29 server-side agent for UNIX email servers and a developer's library for
30 mail clients, other anti-spam tools, and similar projects requiring
31 drop-in spam filtering.
33 The DSPAM agent masquerades as the email server's local delivery agent
34 and filters/learns spams using an advanced Bayesian statistical
35 approach (based on Bayes's theorem of combined probabilities) which
36 provides an administratively maintenance-free, easy-learning Anti-Spam
37 service custom tailored to each individual user's behavior. Advanced
38 because on top of standard Bayesian filtering is also incorporated the
39 use of Chained Tokens, de-obfuscation, and other enhancements. DSPAM
40 works great with Sendmail and Exim, and should work well with any
41 other MTA that supports an external local delivery agent (postfix,
45 DSPAM (czyli De-Spam) to projekt o otwartych ¼ród³ach maj±cy na celu
46 stworzenie nowego rodzaju mechanizmu antyspamowego. Aktualnie jest
47 efektywny zarówno jako dzia³aj±cy po stronie serwera agent dla
48 uniksowych serwerów pocztowych jak i biblioteka dla programistów
49 klientów pocztowych, innych narzêdzi antyspamowych i innych projektów
50 wymagaj±cych filtrowania spamu w locie.
52 Agent DSPAM zachowuje siê jak lokalny agent dostarczania poczty (MDA)
53 i filtruje/uczy siê spamu przy u¿yciu zaawansowanego bayesowskiego
54 przybli¿enia statystycznego (opartego na twierdzeniu Bayesa o
55 po³±czonych prawdopodobieñstwach), daj±c nie wymagaj±c± obs³ugi
56 administracyjnej, ³atwo ucz±c± siê us³ugê antyspamow± dostosowan± do
57 zachowania ka¿dego u¿ytkownika. Metoda jest zaawansowana poniewa¿ na
58 podstawie standardowego filtrowania bayesowskiego wprowadzono u¿ycie
59 tokenów ³añcuchowych, eliminowanie ukrywanie i inne rozszerzenia.
60 DSPAM dzia³a wspaniale z Sendmailem i Eximem, powinien dzia³aæ dobrze
61 z ka¿dym innym MTA obs³uguj±cym zewnêtrznego agenta MDA (postfiksem,
65 Summary: A library for Bayesian spam filtering
66 Summary(pl): Biblioteka do bayesowskiego filtrowania spamu
70 DSPAM (as in De-Spam) is an open-source project to create a new kind
71 of anti-spam mechanism, and is currently effective as both a
72 server-side agent for UNIX email servers and a developer's library for
73 mail clients, other anti-spam tools, and similar projects requiring
74 drop-in spam filtering.
76 This package contains the library.
78 %description libs -l pl
79 DSPAM (czyli De-Spam) to projekt o otwartych ¼ród³ach maj±cy na celu
80 stworzenie nowego rodzaju mechanizmu antyspamowego. Aktualnie jest
81 efektywny zarówno jako dzia³aj±cy po stronie serwera agent dla
82 uniksowych serwerów pocztowych jak i biblioteka dla programistów
83 klientów pocztowych, innych narzêdzi antyspamowych i innych projektów
84 wymagaj±cych filtrowania spamu w locie.
86 Ten pakiet zawiera wspomnian± bibliotekê.
89 Summary: Header files for the DSPAM library
90 Summary(pl): Pliki nag³ówkowe biblioteki DSPAM
91 Group: Development/Libraries
92 Requires: %{name}-libs = %{version}-%{release}
95 DSPAM has had its core engine moved into a separate library, libdspam.
96 This library can be used by developers to provide 'drop-in' spam
97 filtering for their mail client applications, other anti-spam tools,
100 %description devel -l pl
101 G³ówny silnik DSPAM zosta³ przeniesiony do oddzielnej biblioteki
102 libdspam, która mo¿e byæ u¿ywana przez programistów do zapewnienia
103 filtrowania spamu w locie dla aplikacji klientów pocztowych, innych
104 narzêdzi antyspamowych i podobnych projektów.
107 Summary: Static DSPAM library
108 Summary(pl): Statyczna biblioteka DSPAM
109 Group: Development/Libraries
110 Requires: %{name}-devel = %{version}-%{release}
113 Static DSPAM library.
115 %description static -l pl
116 Statyczna biblioteka DSPAM.
124 --enable-trusted-user-security \
125 --enable-bayesian-dobly \
126 --enable-chained-tokens \
127 --enable-experimental \
129 --enable-large-scale \
130 --enable-delivery-to-stdout \
131 --enable-virtual-users \
132 --with-userdir=/var/lib/%{name} \
133 --with-dspam-home=/var/lib/%{name} \
134 --with-userdir-owner=none \
135 --with-userdir-group=none \
136 --with-dspam-owner=none \
137 --with-dspam-group=none \
138 --with-signature-life=14 \
139 --disable-dependency-tracking \
141 --enable-neural-networking \
142 --enable-virtual-users \
143 --with-storage-driver=mysql_drv \
144 --with-mysql-includes=%{_includedir}/mysql \
145 --with-mysql-libraries=%{_libdir}
148 --enable-neural-networking \
149 --enable-virtual-users \
150 --with-storage-driver=pgsql_drv \
151 --with-pgsql-includes=%{_includedir}/postgresql \
152 --with-pgsql-libraries=%{_libdir}
154 --with-storage-driver=libdb4_drv \
155 --with-db4-includes=%{_includedir} \
156 --with-db4-libraries=%{_libdir}
162 rm -rf $RPM_BUILD_ROOT
165 %{__make} install DESTDIR=$RPM_BUILD_ROOT
167 # install devel files
168 install -d $RPM_BUILD_ROOT{%{_includedir}/%{name},/var/lib/%{name}}
169 install -m0644 libdspam.h $RPM_BUILD_ROOT%{_includedir}/%{name}
170 install -m0644 libdspam_objects.h $RPM_BUILD_ROOT%{_includedir}/%{name}
171 install -m0644 lht.h $RPM_BUILD_ROOT%{_includedir}/%{name}
172 install -m0644 nodetree.h $RPM_BUILD_ROOT%{_includedir}/%{name}
174 # provide maintenance scripts
175 install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily
176 install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly
178 cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name} <<EOF
180 exec %{_bindir}/%{name}_clean -s -p
183 chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name}
186 perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" $RPM_BUILD_ROOT%{_bindir}/%{name}_corpus
187 perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" cgi/dspam.cgi
190 #install -m0755 dspam-cron.weekly $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly/%{name}
193 cp tools.mysql_drv/README README.mysql
196 install -d $RPM_BUILD_ROOT/var/lib/%{name}
197 cat > $RPM_BUILD_ROOT/var/lib/%{name}/mysql.data <<EOF
202 This file can only contain 5 lines with the following values:
213 cp tools.pgsql_drv/README README.pgsql
216 install -d $RPM_BUILD_ROOT/var/lib/%{name}
217 cat > $RPM_BUILD_ROOT/var/lib/%{name}/pgsql.data <<EOF
222 This file can only contain 5 lines with the following values:
233 rm -rf $RPM_BUILD_ROOT
235 %post libs -p /sbin/ldconfig
236 %postun libs -p /sbin/ldconfig
239 %defattr(644,root,root,755)
240 %doc README CHANGELOG RELEASE.NOTES
241 %doc cgi/base.css cgi/dspam.cgi cgi/logo.gif
244 %doc tools.mysql_drv/mysql_objects.sql.space.optimized
245 %doc tools.mysql_drv/mysql_objects.sql.speed.optimized
246 %doc tools.mysql_drv/purge.sql
247 %doc tools.mysql_drv/virtual_users.sql
251 %doc tools.pgsql_drv/virtual_users.sql
252 %doc tools.pgsql_drv/pgsql_objects.sql
253 %doc tools.pgsql_drv/purge.sql
255 %dir %attr(0750,root,mail) /var/lib/%{name}
256 %{?with_mysql:%attr(640,root,mail) %config(noreplace) /var/lib/%{name}/mysql.data}
257 %{?with_pgsql:%attr(640,root,mail) %config(noreplace) /var/lib/%{name}/pgsql.data}
258 %attr(755,root,root) %config(noreplace) %{_sysconfdir}/cron.daily/%{name}
259 #%attr(755,root,root) %config(noreplace) %{_sysconfdir}/cron.weekly/%{name}
260 %attr(755,root,mail) %{_bindir}/%{name}
261 %attr(755,root,root) %{_bindir}/%{name}_clean
262 %attr(755,root,root) %{_bindir}/%{name}_corpus
263 %attr(755,root,root) %{_bindir}/%{name}_crc
264 %attr(755,root,root) %{_bindir}/%{name}_dump
265 %attr(755,root,root) %{_bindir}/%{name}_genaliases
266 %attr(755,root,root) %{_bindir}/%{name}_stats
267 %attr(755,root,root) %{_bindir}/%{name}_merge
268 %attr(755,root,root) %{_bindir}/%{name}_2sql
269 %attr(755,root,root) %{_bindir}/%{name}_stats
270 #%attr(755,root,root) %{_bindir}/libdb4_purge
274 %defattr(644,root,root,755)
275 %doc README CHANGELOG
276 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
279 %defattr(644,root,root,755)
280 %attr(755,root,root) %{_libdir}/lib*.so
282 %{_includedir}/%{name}
285 %defattr(644,root,root,755)