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