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}
146 %else if %{with pgsql}
147 --enable-neural-networking \
148 --enable-virtual-users \
149 --with-storage-driver=pgsql_drv \
150 --with-pgsql-includes=%{_includedir}/postgresql \
151 --with-pgsql-libraries=%{_libdir}
153 --with-storage-driver=libdb4_drv \
154 --with-db4-includes=%{_includedir} \
155 --with-db4-libraries=%{_libdir}
160 rm -rf $RPM_BUILD_ROOT
163 %{__make} install DESTDIR=$RPM_BUILD_ROOT
165 # install devel files
166 install -d $RPM_BUILD_ROOT{%{_includedir}/%{name},/var/lib/%{name}}
167 install -m0644 libdspam.h $RPM_BUILD_ROOT%{_includedir}/%{name}
168 install -m0644 libdspam_objects.h $RPM_BUILD_ROOT%{_includedir}/%{name}
169 install -m0644 lht.h $RPM_BUILD_ROOT%{_includedir}/%{name}
170 install -m0644 nodetree.h $RPM_BUILD_ROOT%{_includedir}/%{name}
172 # provide maintenance scripts
173 install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily
174 install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly
176 cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name} <<EOF
178 exec %{_bindir}/%{name}_clean 2>&1 > /dev/null
181 chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name}
184 perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" $RPM_BUILD_ROOT%{_bindir}/%{name}_corpus
185 perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" cgi/dspam.cgi
188 #install -m0755 dspam-cron.weekly $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly/%{name}
191 cp tools.mysql_drv/README README.mysql
194 install -d $RPM_BUILD_ROOT/var/lib/%{name}
195 cat > $RPM_BUILD_ROOT/var/lib/%{name}/mysql.data <<EOF
200 This file can only contain 5 lines with the following values:
211 cp tools.pgsql_drv/README README.pgsql
214 install -d $RPM_BUILD_ROOT/var/lib/%{name}
215 cat > $RPM_BUILD_ROOT/var/lib/%{name}/pgsql.data <<EOF
220 This file can only contain 5 lines with the following values:
231 rm -rf $RPM_BUILD_ROOT
233 %post libs -p /sbin/ldconfig
234 %postun libs -p /sbin/ldconfig
237 %defattr(644,root,root,755)
238 %doc README CHANGELOG RELEASE.NOTES
239 %doc cgi/base.css cgi/dspam.cgi cgi/logo.gif
242 %doc tools.mysql_drv/mysql_objects.sql.space.optimized
243 %doc tools.mysql_drv/mysql_objects.sql.speed.optimized
244 %doc tools.mysql_drv/purge.sql
245 %doc tools.mysql_drv/virtual_users.sql
249 %doc tools.pgsql_drv/virtual_users.sql
250 %doc tools.pgsql_drv/pgsql_objects.sql
251 %doc tools.pgsql_drv/purge.sql
253 %dir %attr(0750,root,mail) /var/lib/%{name}
254 %{?with_mysql:%attr(640,root,mail) %config(noreplace) /var/lib/%{name}/mysql.data}
255 %{?with_pgsql:%attr(640,root,mail) %config(noreplace) /var/lib/%{name}/pgsql.data}
256 %attr(755,root,root) %config(noreplace) %{_sysconfdir}/cron.daily/%{name}
257 #%attr(755,root,root) %config(noreplace) %{_sysconfdir}/cron.weekly/%{name}
258 %attr(755,root,mail) %{_bindir}/%{name}
259 %attr(755,root,root) %{_bindir}/%{name}_clean
260 %attr(755,root,root) %{_bindir}/%{name}_corpus
261 %attr(755,root,root) %{_bindir}/%{name}_crc
262 %attr(755,root,root) %{_bindir}/%{name}_dump
263 %attr(755,root,root) %{_bindir}/%{name}_genaliases
264 %attr(755,root,root) %{_bindir}/%{name}_stats
265 %attr(755,root,root) %{_bindir}/%{name}_merge
266 %attr(755,root,root) %{_bindir}/%{name}_2sql
267 %attr(755,root,root) %{_bindir}/%{name}_stats
268 #%attr(755,root,root) %{_bindir}/libdb4_purge
272 %defattr(644,root,root,755)
273 %doc README CHANGELOG
274 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
277 %defattr(644,root,root,755)
278 %attr(755,root,root) %{_libdir}/lib*.so
280 %{_includedir}/%{name}
283 %defattr(644,root,root,755)