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