]>
Commit | Line | Data |
---|---|---|
229005d4 | 1 | # TODO: |
db5b0be0 | 2 | # - support for libdclassify |
526e9159 | 3 | # - oracle driver |
15cf3cba | 4 | # - messages from default install of cron with mysql driver Memory fault |
e087d69c ER |
5 | # - installing dspam and dspam-client on same host causes |
6 | # /etc/dspam.conf being owned by both packages and .rpmnew files being | |
7 | # created. move the config to -libs? -common? patch code to use | |
8 | # different config for client? | |
c66382e4 PS |
9 | # |
10 | # Conditional build: | |
f8aabeb4 JB |
11 | %bcond_without mysql # disable MySQL storage driver |
12 | %bcond_without pgsql # disable PostgreSQL storage driver | |
13 | %bcond_without sqlite # disable SQLite3 storage driver | |
5fe98dd6 | 14 | %bcond_with mysql40 # use with mysql 4.0 |
f8aabeb4 | 15 | # |
15cf3cba | 16 | %include /usr/lib/rpm/macros.perl |
782a8c09 | 17 | Summary: A library and Mail Delivery Agent for Bayesian spam filtering |
598ee430 | 18 | Summary(pl.UTF-8): Biblioteka i MDA do bayesowskiego filtrowania spamu |
782a8c09 | 19 | Name: dspam |
462e3076 | 20 | Version: 3.8.0 |
411ba1ca | 21 | Release: 0.1 |
782a8c09 AM |
22 | License: GPL |
23 | Group: Applications/Mail | |
4a7592fa | 24 | Source0: http://dspam.nuclearelephant.com/sources/%{name}-%{version}.tar.gz |
462e3076 | 25 | # Source0-md5: 056b8c8b3ad9415a52c01b22ff1e64cf |
15cf3cba | 26 | Patch0: %{name}-webui.patch |
e087d69c | 27 | Patch1: %{name}-config.patch |
3857584b | 28 | Patch2: %{name}-speedup.patch |
6d23db82 | 29 | Source1: %{name}.init |
15cf3cba | 30 | Source2: %{name}-apache.conf |
4a7592fa | 31 | URL: http://dspam.nuclearelephant.com/ |
6d23db82 AM |
32 | BuildRequires: autoconf |
33 | BuildRequires: automake | |
db5b0be0 | 34 | BuildRequires: clamav-devel |
786a7fbe | 35 | BuildRequires: libtool |
526e9159 | 36 | %{?with_mysql:BuildRequires: mysql-devel} |
f8aabeb4 | 37 | BuildRequires: openldap-devel |
526e9159 | 38 | %{?with_pgsql:BuildRequires: postgresql-devel} |
15cf3cba | 39 | BuildRequires: rpm-perlprov >= 4.1-13 |
cc754752 | 40 | BuildRequires: rpmbuild(macros) >= 1.268 |
f8aabeb4 | 41 | BuildRequires: sed >= 4.0 |
526e9159 | 42 | %{?with_sqlite:BuildRequires: sqlite3-devel} |
db5b0be0 | 43 | BuildRequires: zlib-devel |
786a7fbe | 44 | Requires(post,preun): /sbin/chkconfig |
8b918ab1 | 45 | Requires: %{name}-driver = %{version}-%{release} |
786a7fbe | 46 | Requires: rc-scripts |
782a8c09 AM |
47 | Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
48 | ||
15cf3cba ER |
49 | %define _webapps /etc/webapps |
50 | %define _webapp %{name} | |
51 | ||
782a8c09 AM |
52 | %description |
53 | DSPAM (as in De-Spam) is an open-source project to create a new kind | |
54 | of anti-spam mechanism, and is currently effective as both a | |
55 | server-side agent for UNIX email servers and a developer's library for | |
56 | mail clients, other anti-spam tools, and similar projects requiring | |
57 | drop-in spam filtering. | |
58 | ||
59 | The DSPAM agent masquerades as the email server's local delivery agent | |
60 | and filters/learns spams using an advanced Bayesian statistical | |
be22be94 | 61 | approach (based on Bayes's theorem of combined probabilities) which |
782a8c09 AM |
62 | provides an administratively maintenance-free, easy-learning Anti-Spam |
63 | service custom tailored to each individual user's behavior. Advanced | |
64 | because on top of standard Bayesian filtering is also incorporated the | |
65 | use of Chained Tokens, de-obfuscation, and other enhancements. DSPAM | |
66 | works great with Sendmail and Exim, and should work well with any | |
67 | other MTA that supports an external local delivery agent (postfix, | |
68 | qmail, etc.) | |
69 | ||
8e90da8a JR |
70 | %description -l pl.UTF-8 |
71 | DSPAM (czyli De-Spam) to projekt o otwartych źródłach mający na celu | |
be22be94 | 72 | stworzenie nowego rodzaju mechanizmu antyspamowego. Aktualnie jest |
8e90da8a JR |
73 | efektywny zarówno jako działający po stronie serwera agent dla |
74 | uniksowych serwerów pocztowych jak i biblioteka dla programistów | |
75 | klientów pocztowych, innych narzędzi antyspamowych i innych projektów | |
76 | wymagających filtrowania spamu w locie. | |
77 | ||
78 | Agent DSPAM zachowuje się jak lokalny agent dostarczania poczty (MDA) | |
79 | i filtruje/uczy się spamu przy użyciu zaawansowanego bayesowskiego | |
80 | przybliżenia statystycznego (opartego na twierdzeniu Bayesa o | |
81 | połączonych prawdopodobieństwach), dając nie wymagającą obsługi | |
82 | administracyjnej, łatwo uczącą się usługę antyspamową dostosowaną do | |
83 | zachowania każdego użytkownika. Metoda jest zaawansowana ponieważ na | |
84 | podstawie standardowego filtrowania bayesowskiego wprowadzono użycie | |
85 | tokenów łańcuchowych, eliminowanie ukrywanie i inne rozszerzenia. | |
86 | DSPAM działa wspaniale z Sendmailem i Eximem, powinien działać dobrze | |
87 | z każdym innym MTA obsługującym zewnętrznego agenta MDA (postfiksem, | |
be22be94 JB |
88 | qmailem itd.). |
89 | ||
6d23db82 | 90 | %package client |
a109c72f | 91 | Summary: dspam client |
598ee430 | 92 | Summary(pl.UTF-8): Klient dspam |
a109c72f | 93 | Group: Applications/Mail |
6d23db82 | 94 | # to get the same dspam.conf when both installed |
6d23db82 | 95 | Conflicts: dspam < %{version}-%{release} |
786a7fbe | 96 | Conflicts: dspam > %{version}-%{release} |
6d23db82 AM |
97 | |
98 | %description client | |
99 | dspam client. | |
100 | ||
8e90da8a | 101 | %description client -l pl.UTF-8 |
6d23db82 AM |
102 | Klient dspam. |
103 | ||
782a8c09 | 104 | %package libs |
be22be94 | 105 | Summary: A library for Bayesian spam filtering |
598ee430 | 106 | Summary(pl.UTF-8): Biblioteka do bayesowskiego filtrowania spamu |
782a8c09 | 107 | Group: Libraries |
bcb1bcd3 | 108 | Obsoletes: dspam-driver-db |
782a8c09 AM |
109 | |
110 | %description libs | |
111 | DSPAM (as in De-Spam) is an open-source project to create a new kind | |
112 | of anti-spam mechanism, and is currently effective as both a | |
113 | server-side agent for UNIX email servers and a developer's library for | |
114 | mail clients, other anti-spam tools, and similar projects requiring | |
115 | drop-in spam filtering. | |
116 | ||
be22be94 JB |
117 | This package contains the library. |
118 | ||
8e90da8a JR |
119 | %description libs -l pl.UTF-8 |
120 | DSPAM (czyli De-Spam) to projekt o otwartych źródłach mający na celu | |
be22be94 | 121 | stworzenie nowego rodzaju mechanizmu antyspamowego. Aktualnie jest |
8e90da8a JR |
122 | efektywny zarówno jako działający po stronie serwera agent dla |
123 | uniksowych serwerów pocztowych jak i biblioteka dla programistów | |
124 | klientów pocztowych, innych narzędzi antyspamowych i innych projektów | |
125 | wymagających filtrowania spamu w locie. | |
be22be94 | 126 | |
8e90da8a | 127 | Ten pakiet zawiera wspomnianą bibliotekę. |
782a8c09 AM |
128 | |
129 | %package devel | |
be22be94 | 130 | Summary: Header files for the DSPAM library |
598ee430 | 131 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki DSPAM |
782a8c09 AM |
132 | Group: Development/Libraries |
133 | Requires: %{name}-libs = %{version}-%{release} | |
134 | ||
135 | %description devel | |
136 | DSPAM has had its core engine moved into a separate library, libdspam. | |
137 | This library can be used by developers to provide 'drop-in' spam | |
138 | filtering for their mail client applications, other anti-spam tools, | |
139 | or similar projects. | |
140 | ||
8e90da8a JR |
141 | %description devel -l pl.UTF-8 |
142 | Główny silnik DSPAM został przeniesiony do oddzielnej biblioteki | |
143 | libdspam, która może być używana przez programistów do zapewnienia | |
144 | filtrowania spamu w locie dla aplikacji klientów pocztowych, innych | |
145 | narzędzi antyspamowych i podobnych projektów. | |
be22be94 JB |
146 | |
147 | %package static | |
148 | Summary: Static DSPAM library | |
598ee430 | 149 | Summary(pl.UTF-8): Statyczna biblioteka DSPAM |
be22be94 JB |
150 | Group: Development/Libraries |
151 | Requires: %{name}-devel = %{version}-%{release} | |
152 | ||
153 | %description static | |
154 | Static DSPAM library. | |
155 | ||
8e90da8a | 156 | %description static -l pl.UTF-8 |
be22be94 JB |
157 | Statyczna biblioteka DSPAM. |
158 | ||
db5b0be0 AM |
159 | %package driver-hash |
160 | Summary: HASH driver for DSPAM | |
598ee430 | 161 | Summary(pl.UTF-8): Sterownik HASH dla DSPAM-a |
db5b0be0 | 162 | Group: Libraries |
f0445c01 | 163 | Requires(post): sed >= 4.0 |
8b918ab1 | 164 | Requires: %{name} = %{version}-%{release} |
db5b0be0 AM |
165 | Provides: %{name}-driver = %{version}-%{release} |
166 | ||
167 | %description driver-hash | |
168 | HASH driver for DSPAM. | |
169 | ||
8e90da8a | 170 | %description driver-hash -l pl.UTF-8 |
f8aabeb4 JB |
171 | Sterownik HASH dla DSPAM-a. |
172 | ||
db5b0be0 AM |
173 | %package driver-mysql |
174 | Summary: MySQL driver for DSPAM | |
598ee430 | 175 | Summary(pl.UTF-8): Sterownik MySQL dla DSPAM-a |
db5b0be0 | 176 | Group: Libraries |
f0445c01 | 177 | Requires(post): sed >= 4.0 |
8b918ab1 | 178 | Requires: %{name} = %{version}-%{release} |
db5b0be0 AM |
179 | Provides: %{name}-driver = %{version}-%{release} |
180 | ||
181 | %description driver-mysql | |
182 | MySQL driver for DSPAM. | |
183 | ||
8e90da8a | 184 | %description driver-mysql -l pl.UTF-8 |
f8aabeb4 JB |
185 | Sterownik MySQL dla DSPAM-a. |
186 | ||
db5b0be0 AM |
187 | %package driver-pgsql |
188 | Summary: PostgreSQL driver for DSPAM | |
598ee430 | 189 | Summary(pl.UTF-8): Sterownik PostgreSQL dla DSPAM-a |
db5b0be0 | 190 | Group: Libraries |
f0445c01 | 191 | Requires(post): sed >= 4.0 |
8b918ab1 | 192 | Requires: %{name} = %{version}-%{release} |
db5b0be0 AM |
193 | Provides: %{name}-driver = %{version}-%{release} |
194 | ||
195 | %description driver-pgsql | |
196 | PostgreSQL driver for DSPAM. | |
197 | ||
8e90da8a | 198 | %description driver-pgsql -l pl.UTF-8 |
f8aabeb4 JB |
199 | Sterownik PostgreSQL dla DSPAM-a. |
200 | ||
db5b0be0 AM |
201 | %package driver-sqlite |
202 | Summary: SQLite driver for DSPAM | |
598ee430 | 203 | Summary(pl.UTF-8): Sterownik SQLite dla DSPAM-a |
db5b0be0 | 204 | Group: Libraries |
f0445c01 | 205 | Requires(post): sed >= 4.0 |
8b918ab1 | 206 | Requires: %{name} = %{version}-%{release} |
db5b0be0 AM |
207 | Provides: %{name}-driver = %{version}-%{release} |
208 | ||
209 | %description driver-sqlite | |
210 | SQLite driver for DSPAM. | |
211 | ||
8e90da8a | 212 | %description driver-sqlite -l pl.UTF-8 |
f8aabeb4 JB |
213 | Sterownik SQLite dla DSPAM-a. |
214 | ||
15cf3cba | 215 | %package webui |
0fdbb95f | 216 | Summary: DSPAM Web UI |
598ee430 | 217 | Summary(pl.UTF-8): Interfejs WWW do programu DSPAM |
15cf3cba ER |
218 | Group: Applications/WWW |
219 | Requires: webapps | |
0fdbb95f ER |
220 | # needs dspam binary |
221 | Requires: %{name} = %{version}-%{release} | |
15cf3cba ER |
222 | |
223 | %description webui | |
224 | The Web UI (CGI client) can be run from any executable location on a | |
225 | web server, and detects its user's identity from the REMOTE_USER | |
226 | environment variable. This means you'll need to use HTTP password | |
227 | authentication to access the CGI (Any type of authentication will | |
228 | work, so long as Apache supports the module). This is also convenient | |
229 | in that you can set up authentication using almost any existing system | |
230 | you have. The only catch is that you'll need the usernames to match | |
231 | the actual DSPAM usernames used the system. A copy of the shadow | |
232 | password file will suffice for most common installs. | |
233 | ||
8e90da8a JR |
234 | %description webui -l pl.UTF-8 |
235 | Interfejs użytkownika WWW (klient CGI) może być uruchamiany z | |
236 | dowolnego wykonywalnego miejsca na serwerze WWW i rozpoznaje tożsamość | |
237 | użytkownika ze zmiennej środowiskowej REMOTE_USER. Oznacza to, że | |
238 | trzeba użyć uwietrzytelnienia HTTP z hasłem do dostępu do CGI (działać | |
239 | będzie dowolny rodzaj uwierzytelnienia obsługiwany przez moduły | |
240 | Apache'a). Jest to o tyle wygodne, że można skonfigurować | |
241 | uwierzytelnianie dla prawie każdego istniejącego systemu. Jedynym | |
242 | wymogiem jest, żeby nazwy użytkowników pokrywały się z nazwami | |
243 | użytkowników DSPAM-a używanymi w systemie. Kopia pliku shadow | |
244 | wystarczy dla większości popularnych instalacji. | |
70a25296 | 245 | |
782a8c09 AM |
246 | %prep |
247 | %setup -q | |
15cf3cba | 248 | %patch0 -p1 |
e087d69c | 249 | %patch1 -p1 |
3857584b | 250 | %patch2 -p1 |
6d23db82 | 251 | sed -i -e 's#\-static##g' src/Makefile* src/*/Makefile* |
5fe98dd6 | 252 | %{?with_mysql40:sed -i -e 's#40100#99999#g' src/mysql_drv.c} |
1e8d0a98 | 253 | sed -i -e 's,/usr/local/dspam/bin,/usr/bin,' ./scripts/train.pl |
782a8c09 AM |
254 | |
255 | %build | |
6d23db82 AM |
256 | %{__libtoolize} |
257 | %{__aclocal} -I m4 | |
258 | %{__autoconf} | |
259 | %{__automake} | |
f0445c01 ER |
260 | |
261 | DRIVERS=" | |
262 | hash_drv | |
f0445c01 ER |
263 | %{?with_mysql:mysql_drv} |
264 | %{?with_pgsql:pgsql_drv} | |
265 | %{?with_sqlite:sqlite_drv} | |
266 | " | |
c66382e4 | 267 | %configure \ |
0fdbb95f | 268 | --disable-dependency-tracking \ |
994bfba1 | 269 | %{?debug: --enable-debug --enable-bnr-debug --enable-verbose-debug} \ |
be22be94 | 270 | --enable-trusted-user-security \ |
be22be94 JB |
271 | --enable-bias \ |
272 | --enable-large-scale \ | |
be22be94 JB |
273 | --with-userdir=/var/lib/%{name} \ |
274 | --with-userdir-owner=none \ | |
275 | --with-userdir-group=none \ | |
f0445c01 ER |
276 | --with-dspam-home=/var/lib/%{name} \ |
277 | --with-dspam-home-owner=none \ | |
278 | --with-dspam-home-group=none \ | |
be22be94 JB |
279 | --with-dspam-owner=none \ |
280 | --with-dspam-group=none \ | |
281 | --with-signature-life=14 \ | |
db5b0be0 AM |
282 | --enable-ldap \ |
283 | --enable-clamav \ | |
284 | --enable-preferences-extension \ | |
285 | --enable-long-usernames \ | |
994bfba1 | 286 | --enable-neural-networking \ |
f0445c01 ER |
287 | --enable-virtual-users \ |
288 | --with-storage-driver=$(echo $DRIVERS | tr ' ' ',') \ | |
db5b0be0 | 289 | %if %{with mysql} |
be22be94 | 290 | --with-mysql-includes=%{_includedir}/mysql \ |
db5b0be0 | 291 | --with-mysql-libraries=%{_libdir} \ |
526e9159 | 292 | %endif |
ad84258d | 293 | %if %{with pgsql} |
2dd25777 | 294 | --with-pgsql-includes=%{_includedir}/postgresql \ |
db5b0be0 | 295 | --with-pgsql-libraries=%{_libdir} \ |
526e9159 | 296 | %endif |
6d23db82 | 297 | %if %{with sqlite} |
6c5841c4 | 298 | --with-sqlite3-includes=%{_includedir} \ |
db5b0be0 | 299 | --with-sqlite3-libraries=%{_libdir} \ |
c66382e4 | 300 | %endif |
db5b0be0 AM |
301 | --enable-daemon |
302 | ||
303 | # --enable-dclassify-extension needs libdclassify | |
304 | ||
782a8c09 AM |
305 | %{__make} |
306 | ||
307 | %install | |
308 | rm -rf $RPM_BUILD_ROOT | |
1e8d0a98 | 309 | install -d $RPM_BUILD_ROOT{/var/run/dspam,/etc/{rc.d/init.d,sysconfig}} \ |
3857584b | 310 | $RPM_BUILD_ROOT/var/lib/%{name}/{txt,data} |
782a8c09 | 311 | |
b68e9706 AM |
312 | %{__make} install \ |
313 | DESTDIR=$RPM_BUILD_ROOT | |
782a8c09 | 314 | |
6d23db82 AM |
315 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dspam |
316 | ||
3857584b ER |
317 | cp -a txt/*.txt $RPM_BUILD_ROOT/var/lib/%{name}/txt |
318 | ||
782a8c09 | 319 | # install devel files |
3a63f112 | 320 | install -d $RPM_BUILD_ROOT{%{_includedir}/%{name},/var/{log,lib}/%{name}} |
c8020429 | 321 | install src/*.h $RPM_BUILD_ROOT%{_includedir}/%{name} |
782a8c09 AM |
322 | |
323 | # provide maintenance scripts | |
e087d69c | 324 | install -d $RPM_BUILD_ROOT/etc/cron.{daily,weekly} |
43a9bb3e | 325 | cat > $RPM_BUILD_ROOT/etc/cron.daily/%{name} <<EOF |
782a8c09 | 326 | #!/bin/sh |
db3f75b1 | 327 | exec %{_bindir}/%{name}_clean -s -p |
782a8c09 AM |
328 | EOF |
329 | ||
be22be94 | 330 | chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name} |
782a8c09 | 331 | |
782a8c09 | 332 | # fix purge stuff |
c8020429 | 333 | #install dspam-cron.weekly $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly/%{name} |
b266c73e PS |
334 | |
335 | %if %{with mysql} | |
be22be94 | 336 | cat > $RPM_BUILD_ROOT/var/lib/%{name}/mysql.data <<EOF |
782a8c09 AM |
337 | _UNCONFIGURED_ |
338 | ||
339 | Note! | |
340 | ||
341 | This file can only contain 5 lines with the following values: | |
342 | ||
343 | HOSTNAME | |
344 | PORT | |
345 | USERNAME | |
346 | PASSWORD | |
347 | DATABASE | |
348 | EOF | |
b266c73e | 349 | %endif |
782a8c09 | 350 | |
2dd25777 | 351 | %if %{with pgsql} |
2dd25777 SP |
352 | cat > $RPM_BUILD_ROOT/var/lib/%{name}/pgsql.data <<EOF |
353 | _UNCONFIGURED_ | |
354 | ||
355 | Note! | |
356 | ||
357 | This file can only contain 5 lines with the following values: | |
358 | ||
359 | HOSTNAME | |
360 | PORT | |
361 | USERNAME | |
362 | PASSWORD | |
363 | DATABASE | |
364 | EOF | |
365 | %endif | |
366 | ||
15cf3cba ER |
367 | install -d $RPM_BUILD_ROOT%{_webapps}/%{_webapp} |
368 | install %{SOURCE2} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf | |
369 | install %{SOURCE2} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf | |
370 | touch $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/htpasswd | |
371 | ||
6d23db82 AM |
372 | %post |
373 | /sbin/chkconfig --add dspam | |
cc754752 | 374 | %service dspam restart "dspam daemon" |
6d23db82 AM |
375 | |
376 | %preun | |
377 | if [ "$1" = "0" ]; then | |
cc754752 | 378 | %service dspam stop |
526e9159 | 379 | /sbin/chkconfig --del dspam |
6d23db82 AM |
380 | fi |
381 | ||
782a8c09 | 382 | %clean |
be22be94 JB |
383 | rm -rf $RPM_BUILD_ROOT |
384 | ||
385 | %post libs -p /sbin/ldconfig | |
386 | %postun libs -p /sbin/ldconfig | |
782a8c09 | 387 | |
f0445c01 | 388 | %post driver-hash |
462e3076 | 389 | %{__sed} -i -e '/^StorageDriver/s,/.*\.so,%{_libdir}/libhash_drv.so,' /etc/dspam.conf |
f0445c01 ER |
390 | |
391 | %post driver-mysql | |
462e3076 | 392 | %{__sed} -i -e '/^StorageDriver/s,/.*\.so,%{_libdir}/libmysql_drv.so,' /etc/dspam.conf |
f0445c01 ER |
393 | |
394 | %post driver-pgsql | |
462e3076 | 395 | %{__sed} -i -e '/^StorageDriver/s,/.*\.so,%{_libdir}/libpgsql_drv.so,' /etc/dspam.conf |
f0445c01 ER |
396 | |
397 | %post driver-sqlite | |
462e3076 | 398 | %{__sed} -i -e '/^StorageDriver/s,/.*\.so,%{_libdir}/libsqlite_drv.so,' /etc/dspam.conf |
f0445c01 | 399 | |
769bc997 | 400 | %triggerin webui -- apache1 < 1.3.37-3, apache1-base |
15cf3cba ER |
401 | %webapp_register apache %{_webapp} |
402 | ||
769bc997 | 403 | %triggerun webui -- apache1 < 1.3.37-3, apache1-base |
15cf3cba ER |
404 | %webapp_unregister apache %{_webapp} |
405 | ||
406 | %triggerin webui -- apache < 2.2.0, apache-base | |
407 | %webapp_register httpd %{_webapp} | |
408 | ||
409 | %triggerun webui -- apache < 2.2.0, apache-base | |
410 | %webapp_unregister httpd %{_webapp} | |
411 | ||
782a8c09 AM |
412 | %files |
413 | %defattr(644,root,root,755) | |
6c5841c4 | 414 | %doc README CHANGELOG RELEASE.NOTES UPGRADING |
db5b0be0 | 415 | %doc doc/{courier,exim,markov,pop3filter,postfix,qmail,relay,sendmail}.txt |
1e8d0a98 | 416 | %doc scripts/train.pl |
627b94f1 | 417 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dspam.conf |
e087d69c | 418 | %dir %attr(775,root,mail) /var/run/dspam |
1e8d0a98 ER |
419 | %dir %attr(750,root,mail) /var/lib/%{name} |
420 | %dir %attr(770,root,mail) /var/lib/%{name}/data | |
3857584b ER |
421 | %dir /var/lib/%{name}/txt |
422 | %config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/txt/*.txt | |
3a63f112 | 423 | %dir %attr(770,root,mail) /var/log/dspam |
e087d69c | 424 | %attr(754,root,root) /etc/rc.d/init.d/dspam |
43a9bb3e | 425 | %attr(755,root,root) %config(noreplace) /etc/cron.daily/%{name} |
9c99041b AM |
426 | %attr(755,root,root) %{_bindir}/%{name} |
427 | %attr(755,root,root) %{_bindir}/%{name}_logrotate | |
be22be94 | 428 | %attr(755,root,root) %{_bindir}/%{name}_clean |
be22be94 JB |
429 | %attr(755,root,root) %{_bindir}/%{name}_crc |
430 | %attr(755,root,root) %{_bindir}/%{name}_dump | |
be22be94 JB |
431 | %attr(755,root,root) %{_bindir}/%{name}_stats |
432 | %attr(755,root,root) %{_bindir}/%{name}_merge | |
ca8f3468 | 433 | %attr(755,root,root) %{_bindir}/%{name}_2sql |
6c5841c4 | 434 | %attr(755,root,root) %{_bindir}/%{name}_admin |
afb1dbdc | 435 | %attr(755,root,root) %{_bindir}/%{name}_train |
dcc5a193 | 436 | %{_mandir}/man?/%{name}* |
782a8c09 | 437 | |
6d23db82 AM |
438 | %files client |
439 | %defattr(644,root,root,755) | |
6d23db82 | 440 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dspam.conf |
9c99041b | 441 | %attr(755,root,root) %{_bindir}/%{name}c |
6d23db82 | 442 | |
782a8c09 AM |
443 | %files libs |
444 | %defattr(644,root,root,755) | |
ca8f3468 | 445 | %doc README CHANGELOG |
be22be94 | 446 | %attr(755,root,root) %{_libdir}/lib*.so.*.*.* |
db5b0be0 | 447 | %attr(755,root,root) %exclude %{_libdir}/lib*_drv*.so* |
782a8c09 AM |
448 | |
449 | %files devel | |
450 | %defattr(644,root,root,755) | |
be22be94 | 451 | %attr(755,root,root) %{_libdir}/lib*.so |
db5b0be0 | 452 | %attr(755,root,root) %exclude %{_libdir}/lib*_drv*.so* |
be22be94 JB |
453 | %{_libdir}/lib*.la |
454 | %{_includedir}/%{name} | |
dcc5a193 | 455 | %{_mandir}/man3/libdspam* |
b68e9706 | 456 | %{_pkgconfigdir}/*.pc |
be22be94 JB |
457 | |
458 | %files static | |
459 | %defattr(644,root,root,755) | |
460 | %{_libdir}/lib*.a | |
db5b0be0 AM |
461 | |
462 | %files driver-hash | |
463 | %defattr(644,root,root,755) | |
464 | %attr(755,root,root) %{_bindir}/css* | |
465 | %attr(755,root,root) %{_libdir}/libhash_drv*.so* | |
466 | ||
db5b0be0 AM |
467 | %if %{with mysql} |
468 | %files driver-mysql | |
469 | %defattr(644,root,root,755) | |
470 | %doc doc/mysql_drv.txt src/tools.mysql_drv/*.sql | |
471 | %attr(640,root,mail) %config(noreplace) /var/lib/%{name}/mysql.data | |
472 | %attr(755,root,root) %{_libdir}/libmysql_drv*.so* | |
473 | %endif | |
474 | ||
475 | %if %{with pgsql} | |
476 | %files driver-pgsql | |
477 | %defattr(644,root,root,755) | |
478 | %doc doc/pgsql_drv.txt src/tools.pgsql_drv/*.sql | |
479 | %attr(640,root,mail) %config(noreplace) /var/lib/%{name}/pgsql.data | |
480 | %attr(755,root,root) %{_bindir}/%{name}_pg2int8 | |
481 | %attr(755,root,root) %{_libdir}/libpgsql_drv*.so* | |
482 | %endif | |
483 | ||
484 | %if %{with sqlite} | |
485 | %files driver-sqlite | |
486 | %defattr(644,root,root,755) | |
487 | %doc doc/sqlite_drv.txt | |
488 | %attr(755,root,root) %{_libdir}/libsqlite_drv*.so* | |
489 | %endif | |
15cf3cba ER |
490 | |
491 | %files webui | |
492 | %defattr(644,root,root,755) | |
493 | %dir %attr(750,root,http) %{_webapps}/%{_webapp} | |
494 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf | |
495 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf | |
0fdbb95f ER |
496 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/htpasswd |
497 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/admins | |
498 | %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/default.prefs | |
499 | %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/configure.pl | |
15cf3cba ER |
500 | |
501 | %dir %{_datadir}/dspam | |
502 | %dir %{_datadir}/dspam/cgi | |
503 | %attr(755,root,root) %{_datadir}/dspam/cgi/*.cgi | |
504 | %{_datadir}/dspam/cgi/templates | |
505 | %{_datadir}/dspam/htdocs |