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