]> git.pld-linux.org Git - packages/dspam.git/blob - dspam.spec
- more fixes...
[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-experimental \
124         --enable-signature-attachments \
125         --enable-bias \
126         --enable-large-scale \
127         --enable-delivery-to-stdout \
128         --enable-virtual-users \
129         --with-userdir=/var/lib/%{name} \
130         --with-userdir-owner=none \
131         --with-userdir-group=none \
132         --with-dspam-owner=none \
133         --with-dspam-group=none \
134         --with-signature-life=14 \
135         --disable-dependency-tracking \
136 %if %{with mysql}
137         --enable-neural-networking \
138         --enable-virtual-users \
139         --with-storage-driver=mysql_drv \
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 # fix purge stuff
178 #install -m0755 dspam-cron.weekly $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly/%{name}
179
180 %if %{with mysql}
181 cp tools.mysql_drv/README README.mysql
182
183 # fix missing file
184 install -d $RPM_BUILD_ROOT/var/lib/%{name}
185 cat > $RPM_BUILD_ROOT/var/lib/%{name}/mysql.data <<EOF
186 _UNCONFIGURED_
187
188 Note!
189
190 This file can only contain 5 lines with the following values:
191
192 HOSTNAME
193 PORT
194 USERNAME
195 PASSWORD
196 DATABASE
197 EOF
198 %endif
199
200 %clean
201 rm -rf $RPM_BUILD_ROOT
202
203 %post   libs -p /sbin/ldconfig
204 %postun libs -p /sbin/ldconfig
205
206 %files
207 %defattr(644,root,root,755)
208 %doc README CHANGE
209 %doc cgi/base.css cgi/dspam.cgi cgi/logo.gif cgi/template.html
210 %if %{with mysql}
211 %doc README.mysql
212 %doc tools.mysql_drv/mysql_objects.sql.space.optimized
213 %doc tools.mysql_drv/mysql_objects.sql.speed.optimized
214 %doc tools.mysql_drv/purge.sql
215 %doc tools.mysql_drv/virtual_users.sql
216 %endif
217 %dir %attr(0750,root,mail) /var/lib/%{name}
218 %{?with_mysql:%attr(640,root,mail) %config(noreplace) /var/lib/%{name}/mysql.data}
219 %attr(755,root,root) %config(noreplace) %{_sysconfdir}/cron.daily/%{name}
220 #%attr(755,root,root) %config(noreplace) %{_sysconfdir}/cron.weekly/%{name}
221 %attr(755,root,mail) %{_bindir}/%{name}
222 %attr(755,root,root) %{_bindir}/%{name}_clean
223 %attr(755,root,root) %{_bindir}/%{name}_corpus
224 %attr(755,root,root) %{_bindir}/%{name}_crc
225 %attr(755,root,root) %{_bindir}/%{name}_dump
226 %attr(755,root,root) %{_bindir}/%{name}_genaliases
227 %attr(755,root,root) %{_bindir}/%{name}_stats
228 %attr(755,root,root) %{_bindir}/%{name}_merge
229 %attr(755,root,root) %{_bindir}/%{name}_2mysql
230 %attr(755,root,root) %{_bindir}/%{name}_ngstats
231 %attr(755,root,root) %{_bindir}/libdb4_purge
232
233 %files libs
234 %defattr(644,root,root,755)
235 %doc README CHANGE
236 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
237
238 %files devel
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/lib*.so
241 %{_libdir}/lib*.la
242 %{_includedir}/%{name}
243
244 %files static
245 %defattr(644,root,root,755)
246 %{_libdir}/lib*.a
This page took 0.151148 seconds and 4 git commands to generate.