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