1 # NOTE about versioning:
2 # Stable Releases: 3.4.x, Development Releases: 3.5.x
3 # All odd-versioned minor releases are considered development
4 # releases, and all even-versioned minor releases are stable releases
5 # - from http://www.nuclearelephant.com/projects/dspam/download.shtml
10 # - missing /etc/dspam.conf for cron:
11 # /etc/cron.daily/dspam:
12 # 2430: [6/28/2005 1:2:1] Unable to open file for reading: /etc/dspam.conf: No such file or directory
13 # 2430: [6/28/2005 1:2:1] Unable to read dspam.conf
16 %bcond_without mysql # enable MySQL storage driver (disable sqlite/pgsql driver)
17 %bcond_with pgsql # enable PostgreSQL storage driver (disable sqlite/mysql driver)
18 %bcond_with sqlite # enable SQLite3 storage driver
21 %if %{with mysql} && %{with pgsql}
23 %{warn:disabled mysql as mysql and pgsql aren't supported together (yet)
27 %if %{with mysql} && %{with sqlite}
29 %{warn:disabled mysql as mysql and sqlite aren't supported together (yet)
33 %if %{with pgsql} && %{with sqlite}
35 %{warn:disabled sqlite as pgsql and sqlite aren't supported together (yet)
40 %if %{with mysql} || %{with pgsql}
44 Summary: A library and Mail Delivery Agent for Bayesian spam filtering
45 Summary(pl): Biblioteka i MDA do bayesowskiego filtrowania spamu
50 Group: Applications/Mail
51 Source0: http://www.nuclearelephant.com/projects/dspam/sources/%{name}-%{version}.tar.gz
52 # Source0-md5: d9ee63a8cf67ea933d711b00851ce916
54 URL: http://www.nuclearelephant.com/projects/dspam/
55 BuildRequires: autoconf
56 BuildRequires: automake
57 BuildRequires: libtool
58 %{?with_mysql:BuildRequires: mysql-devel}
59 %{?with_pgsql:BuildRequires: postgresql-devel}
60 %{?with_sqlite:BuildRequires: sqlite3-devel}
61 BuildRequires: sed >= 4.0
62 Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65 DSPAM (as in De-Spam) is an open-source project to create a new kind
66 of anti-spam mechanism, and is currently effective as both a
67 server-side agent for UNIX email servers and a developer's library for
68 mail clients, other anti-spam tools, and similar projects requiring
69 drop-in spam filtering.
71 The DSPAM agent masquerades as the email server's local delivery agent
72 and filters/learns spams using an advanced Bayesian statistical
73 approach (based on Bayes's theorem of combined probabilities) which
74 provides an administratively maintenance-free, easy-learning Anti-Spam
75 service custom tailored to each individual user's behavior. Advanced
76 because on top of standard Bayesian filtering is also incorporated the
77 use of Chained Tokens, de-obfuscation, and other enhancements. DSPAM
78 works great with Sendmail and Exim, and should work well with any
79 other MTA that supports an external local delivery agent (postfix,
83 DSPAM (czyli De-Spam) to projekt o otwartych ¼ród³ach maj±cy na celu
84 stworzenie nowego rodzaju mechanizmu antyspamowego. Aktualnie jest
85 efektywny zarówno jako dzia³aj±cy po stronie serwera agent dla
86 uniksowych serwerów pocztowych jak i biblioteka dla programistów
87 klientów pocztowych, innych narzêdzi antyspamowych i innych projektów
88 wymagaj±cych filtrowania spamu w locie.
90 Agent DSPAM zachowuje siê jak lokalny agent dostarczania poczty (MDA)
91 i filtruje/uczy siê spamu przy u¿yciu zaawansowanego bayesowskiego
92 przybli¿enia statystycznego (opartego na twierdzeniu Bayesa o
93 po³±czonych prawdopodobieñstwach), daj±c nie wymagaj±c± obs³ugi
94 administracyjnej, ³atwo ucz±c± siê us³ugê antyspamow± dostosowan± do
95 zachowania ka¿dego u¿ytkownika. Metoda jest zaawansowana poniewa¿ na
96 podstawie standardowego filtrowania bayesowskiego wprowadzono u¿ycie
97 tokenów ³añcuchowych, eliminowanie ukrywanie i inne rozszerzenia.
98 DSPAM dzia³a wspaniale z Sendmailem i Eximem, powinien dzia³aæ dobrze
99 z ka¿dym innym MTA obs³uguj±cym zewnêtrznego agenta MDA (postfiksem,
103 Summary: dspam client
104 Summary(pl): Klient dspam
105 Group: Applications/Mail
106 # to get the same dspam.conf when both installed
107 Conflicts: dspam > %{version}-%{release}
108 Conflicts: dspam < %{version}-%{release}
113 %description -l pl client
117 Summary: A library for Bayesian spam filtering
118 Summary(pl): Biblioteka do bayesowskiego filtrowania spamu
122 DSPAM (as in De-Spam) is an open-source project to create a new kind
123 of anti-spam mechanism, and is currently effective as both a
124 server-side agent for UNIX email servers and a developer's library for
125 mail clients, other anti-spam tools, and similar projects requiring
126 drop-in spam filtering.
128 This package contains the library.
130 %description libs -l pl
131 DSPAM (czyli De-Spam) to projekt o otwartych ¼ród³ach maj±cy na celu
132 stworzenie nowego rodzaju mechanizmu antyspamowego. Aktualnie jest
133 efektywny zarówno jako dzia³aj±cy po stronie serwera agent dla
134 uniksowych serwerów pocztowych jak i biblioteka dla programistów
135 klientów pocztowych, innych narzêdzi antyspamowych i innych projektów
136 wymagaj±cych filtrowania spamu w locie.
138 Ten pakiet zawiera wspomnian± bibliotekê.
141 Summary: Header files for the DSPAM library
142 Summary(pl): Pliki nag³ówkowe biblioteki DSPAM
143 Group: Development/Libraries
144 Requires: %{name}-libs = %{version}-%{release}
147 DSPAM has had its core engine moved into a separate library, libdspam.
148 This library can be used by developers to provide 'drop-in' spam
149 filtering for their mail client applications, other anti-spam tools,
152 %description devel -l pl
153 G³ówny silnik DSPAM zosta³ przeniesiony do oddzielnej biblioteki
154 libdspam, która mo¿e byæ u¿ywana przez programistów do zapewnienia
155 filtrowania spamu w locie dla aplikacji klientów pocztowych, innych
156 narzêdzi antyspamowych i podobnych projektów.
159 Summary: Static DSPAM library
160 Summary(pl): Statyczna biblioteka DSPAM
161 Group: Development/Libraries
162 Requires: %{name}-devel = %{version}-%{release}
165 Static DSPAM library.
167 %description static -l pl
168 Statyczna biblioteka DSPAM.
172 sed -i -e 's#\-static##g' src/Makefile* src/*/Makefile*
180 %{?debug: --enable-debug --enable-bnr-debug --enable-verbose-debug} \
181 --enable-trusted-user-security \
183 --enable-large-scale \
184 --with-userdir=/var/lib/%{name} \
185 --with-dspam-home=/var/lib/%{name} \
186 --with-userdir-owner=none \
187 --with-userdir-group=none \
188 --with-dspam-owner=none \
189 --with-dspam-group=none \
190 --with-signature-life=14 \
191 --disable-dependency-tracking \
193 --enable-neural-networking \
195 --enable-virtual-users \
196 --with-storage-driver=mysql_drv \
197 --with-mysql-includes=%{_includedir}/mysql \
198 --with-mysql-libraries=%{_libdir}
201 --enable-neural-networking \
203 --enable-virtual-users \
204 --with-storage-driver=pgsql_drv \
205 --with-pgsql-includes=%{_includedir}/postgresql \
206 --with-pgsql-libraries=%{_libdir}
209 --with-storage-driver=sqlite3_drv \
210 --with-sqlite3-includes=%{_includedir} \
211 --with-sqlite3-libraries=%{_libdir}
216 rm -rf $RPM_BUILD_ROOT
219 DESTDIR=$RPM_BUILD_ROOT
221 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
222 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dspam
224 # install devel files
225 install -d $RPM_BUILD_ROOT{%{_includedir}/%{name},/var/lib/%{name}}
226 install src/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}
228 # provide maintenance scripts
229 install -d $RPM_BUILD_ROOT/etc/cron.daily
230 install -d $RPM_BUILD_ROOT/etc/cron.weekly
232 cat > $RPM_BUILD_ROOT/etc/cron.daily/%{name} <<EOF
234 exec %{_bindir}/%{name}_clean -s -p
237 chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name}
240 sed -i -e "s|%{_prefix}/local|%{_prefix}|g" $RPM_BUILD_ROOT%{_bindir}/%{name}_corpus
241 sed -i -e "s|%{_prefix}/local|%{_prefix}|g" webui/cgi-bin/dspam.cgi
244 #install dspam-cron.weekly $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly/%{name}
248 install -d $RPM_BUILD_ROOT/var/lib/%{name}
249 cat > $RPM_BUILD_ROOT/var/lib/%{name}/mysql.data <<EOF
254 This file can only contain 5 lines with the following values:
266 install -d $RPM_BUILD_ROOT/var/lib/%{name}
267 cat > $RPM_BUILD_ROOT/var/lib/%{name}/pgsql.data <<EOF
272 This file can only contain 5 lines with the following values:
283 /sbin/chkconfig --add dspam
284 if [ -f /var/lock/subsys/dspam ]; then
285 /etc/rc.d/init.d/dspam restart 1>&2
287 echo "Run \"/etc/rc.d/init.d/dspam start\" to start dspam daemon."
291 if [ "$1" = "0" ]; then
292 if [ -f /var/lock/subsys/dspam ]; then
293 /etc/rc.d/init.d/dspam stop 1>&2
295 /sbin/chkconfig --del dspam
299 rm -rf $RPM_BUILD_ROOT
301 %post libs -p /sbin/ldconfig
302 %postun libs -p /sbin/ldconfig
305 %defattr(644,root,root,755)
306 %doc README CHANGELOG RELEASE.NOTES UPGRADING
307 %doc webui/cgi-bin/base.css webui/cgi-bin/dspam.cgi
309 %doc doc/mysql_drv.txt
310 %doc src/tools.mysql_drv/*.sql
313 %doc doc/pgsql_drv.txt
314 %doc src/tools.pgsql_drv/*.sql
316 %if %{without mysql} && %{without pgsql}
317 %doc doc/sqlite_drv.txt
319 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dspam.conf
320 %dir %attr(750,root,mail) /var/lib/%{name}
321 %{?with_mysql:%attr(640,root,mail) %config(noreplace) /var/lib/%{name}/mysql.data}
322 %{?with_pgsql:%attr(640,root,mail) %config(noreplace) /var/lib/%{name}/pgsql.data}
323 %attr(755,root,root) %config(noreplace) /etc/cron.daily/%{name}
324 %attr(755,root,mail) %{_bindir}/%{name}
325 %attr(755,root,mail) %{_bindir}/%{name}_logrotate
326 %attr(755,root,root) %{_bindir}/%{name}_clean
327 %attr(755,root,root) %{_bindir}/%{name}_corpus
328 %attr(755,root,root) %{_bindir}/%{name}_crc
329 %attr(755,root,root) %{_bindir}/%{name}_dump
330 %attr(755,root,root) %{_bindir}/%{name}_genaliases
331 %attr(755,root,root) %{_bindir}/%{name}_stats
332 %attr(755,root,root) %{_bindir}/%{name}_merge
333 %attr(755,root,root) %{_bindir}/%{name}_2sql
334 %attr(755,root,root) %{_bindir}/%{name}_admin
335 %{?with_pgsql:%attr(755,root,root) %{_bindir}/%{name}_pg2int8}
336 %{_mandir}/man?/%{name}*
339 %attr(754,root,root) /etc/rc.d/init.d/dspam
341 %defattr(644,root,root,755)
342 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dspam.conf
344 %attr(755,root,mail) %{_bindir}/%{name}c
347 %defattr(644,root,root,755)
348 %doc README CHANGELOG
349 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
352 %defattr(644,root,root,755)
353 %attr(755,root,root) %{_libdir}/lib*.so
355 %{_includedir}/%{name}
356 %{_mandir}/man3/libdspam*
357 %{_pkgconfigdir}/*.pc
360 %defattr(644,root,root,755)