]> git.pld-linux.org Git - packages/dspam.git/blob - dspam.spec
- updated to 3.2.1
[packages/dspam.git] / dspam.spec
1 #
2 # Conditional build:
3 %bcond_with     mysql   # enable MySQL storage driver (disable db4 driver)
4 %bcond_with     pgsql   # enable PostgreSQL storage driver (disable db4 driver)
5 #
6 Summary:        A library and Mail Delivery Agent for Bayesian spam filtering
7 Summary(pl):    Biblioteka i MDA do bayesowskiego filtrowania spamu
8 Name:           dspam
9 Version:        3.2.1
10 Release:        1
11 License:        GPL
12 Group:          Applications/Mail
13 Source0:        http://www.nuclearelephant.com/projects/dspam/sources/%{name}-%{version}.tar.gz
14 # Source0-md5:  a4357c02ca39a68480719adf47fca67a
15 Patch0:         %{name}-Makefile.patch
16 URL:            http://www.nuclearelephant.com/projects/dspam/
17 BuildRequires:  db-static
18 %if %{with mysql}
19 BuildRequires:  mysql-devel
20 %else if %{with pgsql}
21 BuildRequires:  postgresql-devel
22 %else
23 BuildRequires:  db-devel
24 %endif
25 Buildroot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 DSPAM (as in De-Spam) is an open-source project to create a new kind
29 of anti-spam mechanism, and is currently effective as both a
30 server-side agent for UNIX email servers and a developer's library for
31 mail clients, other anti-spam tools, and similar projects requiring
32 drop-in spam filtering.
33
34 The DSPAM agent masquerades as the email server's local delivery agent
35 and filters/learns spams using an advanced Bayesian statistical
36 approach (based on Bayes's theorem of combined probabilities) which
37 provides an administratively maintenance-free, easy-learning Anti-Spam
38 service custom tailored to each individual user's behavior. Advanced
39 because on top of standard Bayesian filtering is also incorporated the
40 use of Chained Tokens, de-obfuscation, and other enhancements. DSPAM
41 works great with Sendmail and Exim, and should work well with any
42 other MTA that supports an external local delivery agent (postfix,
43 qmail, etc.)
44
45 %description -l pl
46 DSPAM (czyli De-Spam) to projekt o otwartych ¼ród³ach maj±cy na celu
47 stworzenie nowego rodzaju mechanizmu antyspamowego. Aktualnie jest
48 efektywny zarówno jako dzia³aj±cy po stronie serwera agent dla
49 uniksowych serwerów pocztowych jak i biblioteka dla programistów
50 klientów pocztowych, innych narzêdzi antyspamowych i innych projektów
51 wymagaj±cych filtrowania spamu w locie.
52
53 Agent DSPAM zachowuje siê jak lokalny agent dostarczania poczty (MDA)
54 i filtruje/uczy siê spamu przy u¿yciu zaawansowanego bayesowskiego
55 przybli¿enia statystycznego (opartego na twierdzeniu Bayesa o
56 po³±czonych prawdopodobieñstwach), daj±c nie wymagaj±c± obs³ugi
57 administracyjnej, ³atwo ucz±c± siê us³ugê antyspamow± dostosowan± do
58 zachowania ka¿dego u¿ytkownika. Metoda jest zaawansowana poniewa¿ na
59 podstawie standardowego filtrowania bayesowskiego wprowadzono u¿ycie
60 tokenów ³añcuchowych, eliminowanie ukrywanie i inne rozszerzenia.
61 DSPAM dzia³a wspaniale z Sendmailem i Eximem, powinien dzia³aæ dobrze
62 z ka¿dym innym MTA obs³uguj±cym zewnêtrznego agenta MDA (postfiksem,
63 qmailem itd.).
64
65 %package libs
66 Summary:        A library for Bayesian spam filtering
67 Summary(pl):    Biblioteka do bayesowskiego filtrowania spamu
68 Group:          Libraries
69
70 %description libs
71 DSPAM (as in De-Spam) is an open-source project to create a new kind
72 of anti-spam mechanism, and is currently effective as both a
73 server-side agent for UNIX email servers and a developer's library for
74 mail clients, other anti-spam tools, and similar projects requiring
75 drop-in spam filtering.
76
77 This package contains the library.
78
79 %description libs -l pl
80 DSPAM (czyli De-Spam) to projekt o otwartych ¼ród³ach maj±cy na celu
81 stworzenie nowego rodzaju mechanizmu antyspamowego. Aktualnie jest
82 efektywny zarówno jako dzia³aj±cy po stronie serwera agent dla
83 uniksowych serwerów pocztowych jak i biblioteka dla programistów
84 klientów pocztowych, innych narzêdzi antyspamowych i innych projektów
85 wymagaj±cych filtrowania spamu w locie.
86
87 Ten pakiet zawiera wspomnian± bibliotekê.
88
89 %package devel
90 Summary:        Header files for the DSPAM library
91 Summary(pl):    Pliki nag³ówkowe biblioteki DSPAM
92 Group:          Development/Libraries
93 Requires:       %{name}-libs = %{version}-%{release}
94
95 %description devel
96 DSPAM has had its core engine moved into a separate library, libdspam.
97 This library can be used by developers to provide 'drop-in' spam
98 filtering for their mail client applications, other anti-spam tools,
99 or similar projects.
100
101 %description devel -l pl
102 G³ówny silnik DSPAM zosta³ przeniesiony do oddzielnej biblioteki
103 libdspam, która mo¿e byæ u¿ywana przez programistów do zapewnienia
104 filtrowania spamu w locie dla aplikacji klientów pocztowych, innych
105 narzêdzi antyspamowych i podobnych projektów.
106
107 %package static
108 Summary:        Static DSPAM library
109 Summary(pl):    Statyczna biblioteka DSPAM
110 Group:          Development/Libraries
111 Requires:       %{name}-devel = %{version}-%{release}
112
113 %description static
114 Static DSPAM library.
115
116 %description static -l pl
117 Statyczna biblioteka DSPAM.
118
119 %prep
120 %setup -q
121 %patch0 -p1
122
123 %build
124 %configure \
125         --enable-trusted-user-security \
126         --enable-bayesian-dobly \
127         --enable-chained-tokens \
128         --enable-experimental \
129         --enable-bias \
130         --enable-large-scale \
131         --enable-delivery-to-stdout \
132         --enable-virtual-users \
133         --with-userdir=/var/lib/%{name} \
134         --with-dspam-home=/var/lib/%{name} \
135         --with-userdir-owner=none \
136         --with-userdir-group=none \
137         --with-dspam-owner=none \
138         --with-dspam-group=none \
139         --with-signature-life=14 \
140         --disable-dependency-tracking \
141 %if %{with mysql}
142         --enable-neural-networking \
143         --enable-virtual-users \
144         --with-storage-driver=mysql_drv \
145         --with-mysql-includes=%{_includedir}/mysql \
146         --with-mysql-libraries=%{_libdir}
147 %else
148 %if %{with pgsql}
149         --enable-neural-networking \
150         --enable-virtual-users \
151         --with-storage-driver=pgsql_drv \
152         --with-pgsql-includes=%{_includedir}/postgresql \
153         --with-pgsql-libraries=%{_libdir}
154 %else
155         --with-storage-driver=libdb4_drv \
156         --with-db4-includes=%{_includedir} \
157         --with-db4-libraries=%{_libdir}
158 %endif
159 %endif
160 %{__make}
161
162 %install
163 rm -rf $RPM_BUILD_ROOT
164
165 #%makeinstall_std
166 %{__make} install DESTDIR=$RPM_BUILD_ROOT
167
168 # install devel files
169 install -d $RPM_BUILD_ROOT{%{_includedir}/%{name},/var/lib/%{name}}
170 install -m0644 libdspam.h $RPM_BUILD_ROOT%{_includedir}/%{name}
171 install -m0644 libdspam_objects.h $RPM_BUILD_ROOT%{_includedir}/%{name}
172 install -m0644 lht.h $RPM_BUILD_ROOT%{_includedir}/%{name}
173 install -m0644 nodetree.h $RPM_BUILD_ROOT%{_includedir}/%{name}
174
175 # provide maintenance scripts
176 install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily
177 install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly
178
179 cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name} <<EOF
180 #!/bin/sh
181 exec %{_bindir}/%{name}_clean -s -p
182 EOF
183
184 chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name}
185
186 # fix prefix
187 perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" $RPM_BUILD_ROOT%{_bindir}/%{name}_corpus
188 perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" cgi/dspam.cgi
189
190 # fix purge stuff
191 #install -m0755 dspam-cron.weekly $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly/%{name}
192
193 %if %{with mysql}
194 cp tools.mysql_drv/README README.mysql
195
196 # fix missing file
197 install -d $RPM_BUILD_ROOT/var/lib/%{name}
198 cat > $RPM_BUILD_ROOT/var/lib/%{name}/mysql.data <<EOF
199 _UNCONFIGURED_
200
201 Note!
202
203 This file can only contain 5 lines with the following values:
204
205 HOSTNAME
206 PORT
207 USERNAME
208 PASSWORD
209 DATABASE
210 EOF
211 %endif
212
213 %if %{with pgsql}
214 cp tools.pgsql_drv/README README.pgsql
215
216 # fix missing file
217 install -d $RPM_BUILD_ROOT/var/lib/%{name}
218 cat > $RPM_BUILD_ROOT/var/lib/%{name}/pgsql.data <<EOF
219 _UNCONFIGURED_
220
221 Note!
222
223 This file can only contain 5 lines with the following values:
224
225 HOSTNAME
226 PORT
227 USERNAME
228 PASSWORD
229 DATABASE
230 EOF
231 %endif
232
233 %clean
234 rm -rf $RPM_BUILD_ROOT
235
236 %post   libs -p /sbin/ldconfig
237 %postun libs -p /sbin/ldconfig
238
239 %files
240 %defattr(644,root,root,755)
241 %doc README CHANGELOG RELEASE.NOTES
242 %doc cgi/base.css cgi/dspam.cgi
243 %if %{with mysql}
244 %doc README.mysql
245 %doc tools.mysql_drv/mysql_objects.sql.space.optimized
246 %doc tools.mysql_drv/mysql_objects.sql.speed.optimized
247 %doc tools.mysql_drv/purge.sql
248 %doc tools.mysql_drv/virtual_users.sql
249 %endif
250 %if %{with pgsql}
251 %doc README.pgsql
252 %doc tools.pgsql_drv/virtual_users.sql
253 %doc tools.pgsql_drv/pgsql_objects.sql
254 %doc tools.pgsql_drv/purge.sql
255 %endif
256 %dir %attr(0750,root,mail) /var/lib/%{name}
257 %{?with_mysql:%attr(640,root,mail) %config(noreplace) /var/lib/%{name}/mysql.data}
258 %{?with_pgsql:%attr(640,root,mail) %config(noreplace) /var/lib/%{name}/pgsql.data}
259 %attr(755,root,root) %config(noreplace) %{_sysconfdir}/cron.daily/%{name}
260 #%attr(755,root,root) %config(noreplace) %{_sysconfdir}/cron.weekly/%{name}
261 %attr(755,root,mail) %{_bindir}/%{name}
262 %attr(755,root,root) %{_bindir}/%{name}_clean
263 %attr(755,root,root) %{_bindir}/%{name}_corpus
264 %attr(755,root,root) %{_bindir}/%{name}_crc
265 %attr(755,root,root) %{_bindir}/%{name}_dump
266 %attr(755,root,root) %{_bindir}/%{name}_genaliases
267 %attr(755,root,root) %{_bindir}/%{name}_stats
268 %attr(755,root,root) %{_bindir}/%{name}_merge
269 %attr(755,root,root) %{_bindir}/%{name}_2sql
270 %attr(755,root,root) %{_bindir}/%{name}_stats
271 #%attr(755,root,root) %{_bindir}/libdb4_purge
272 %{_mandir}/man?/*
273
274 %files libs
275 %defattr(644,root,root,755)
276 %doc README CHANGELOG
277 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
278
279 %files devel
280 %defattr(644,root,root,755)
281 %attr(755,root,root) %{_libdir}/lib*.so
282 %{_libdir}/lib*.la
283 %{_includedir}/%{name}
284
285 %files static
286 %defattr(644,root,root,755)
287 %{_libdir}/lib*.a
This page took 0.074463 seconds and 4 git commands to generate.