X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=dspam.spec;h=5da01f4241d3ea69fd683eb9cd8e7505f2a5ed77;hb=4a7592fa588081b6ad2cc6c118b696c78cad452d;hp=a26e0b5f4b7bc291b988d1cf59fc81ac5b113507;hpb=1e8d0a987af49043aea4b896f8944323d590d9f3;p=packages%2Fdspam.git diff --git a/dspam.spec b/dspam.spec index a26e0b5..5da01f4 100644 --- a/dspam.spec +++ b/dspam.spec @@ -11,28 +11,27 @@ %bcond_without mysql # disable MySQL storage driver %bcond_without pgsql # disable PostgreSQL storage driver %bcond_without sqlite # disable SQLite3 storage driver -%bcond_without db # disable BerkeleyDB storage driver %bcond_with mysql40 # use with mysql 4.0 # %include /usr/lib/rpm/macros.perl Summary: A library and Mail Delivery Agent for Bayesian spam filtering Summary(pl): Biblioteka i MDA do bayesowskiego filtrowania spamu Name: dspam -Version: 3.6.5 -Release: 0.25 +Version: 3.6.8 +Release: 0.1 License: GPL Group: Applications/Mail -Source0: http://www.nuclearelephant.com/projects/dspam/sources/%{name}-%{version}.tar.gz -# Source0-md5: da4f0e00633bff49d71fde418caaf14b +Source0: http://dspam.nuclearelephant.com/sources/%{name}-%{version}.tar.gz +# Source0-md5: c4b1a7079690ee16d8b0f36b2a2a90a4 Patch0: %{name}-webui.patch Patch1: %{name}-config.patch +Patch2: %{name}-speedup.patch Source1: %{name}.init Source2: %{name}-apache.conf -URL: http://www.nuclearelephant.com/projects/dspam/ +URL: http://dspam.nuclearelephant.com/ BuildRequires: autoconf BuildRequires: automake BuildRequires: clamav-devel -%{?with_db:BuildRequires: db-devel} BuildRequires: libtool %{?with_mysql:BuildRequires: mysql-devel} BuildRequires: openldap-devel @@ -170,20 +169,6 @@ HASH driver for DSPAM. %description driver-hash -l pl Sterownik HASH dla DSPAM-a. -%package driver-db -Summary: DB driver for DSPAM -Summary(pl): Sterownik DB dla DSPAM-a -Group: Libraries -Requires(post): sed >= 4.0 -Requires: %{name}-libs = %{version}-%{release} -Provides: %{name}-driver = %{version}-%{release} - -%description driver-db -DB driver for DSPAM. - -%description driver-db -l pl -Sterownik DB dla DSPAM-a. - %package driver-mysql Summary: MySQL driver for DSPAM Summary(pl): Sterownik MySQL dla DSPAM-a @@ -228,6 +213,7 @@ Sterownik SQLite dla DSPAM-a. %package webui Summary: DSPAM Web UI +Summary(pl): Interfejs WWW do programu DSPAM Group: Applications/WWW Requires: webapps # needs dspam binary @@ -244,10 +230,23 @@ you have. The only catch is that you'll need the usernames to match the actual DSPAM usernames used the system. A copy of the shadow password file will suffice for most common installs. +%description webui -l pl +Interfejs u¿ytkownika WWW (klient CGI) mo¿e byæ uruchamiany z +dowolnego wykonywalnego miejsca na serwerze WWW i rozpoznaje to¿samo¶æ +u¿ytkownika ze zmiennej ¶rodowiskowej REMOTE_USER. Oznacza to, ¿e +trzeba u¿yæ uwietrzytelnienia HTTP z has³em do dostêpu do CGI (dzia³aæ +bêdzie dowolny rodzaj uwierzytelnienia obs³ugiwany przez modu³y +Apache'a). Jest to o tyle wygodne, ¿e mo¿na skonfigurowaæ +uwierzytelnianie dla prawie ka¿dego istniej±cego systemu. Jedynym +wymogiem jest, ¿eby nazwy u¿ytkowników pokrywa³y siê z nazwami +u¿ytkowników DSPAM-a u¿ywanymi w systemie. Kopia pliku shadow +wystarczy dla wiêkszo¶ci popularnych instalacji. + %prep %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 sed -i -e 's#\-static##g' src/Makefile* src/*/Makefile* %{?with_mysql40:sed -i -e 's#40100#99999#g' src/mysql_drv.c} sed -i -e 's,/usr/local/dspam/bin,/usr/bin,' ./scripts/train.pl @@ -260,7 +259,6 @@ sed -i -e 's,/usr/local/dspam/bin,/usr/bin,' ./scripts/train.pl DRIVERS=" hash_drv -%{?with_db:libdb4_drv} %{?with_mysql:mysql_drv} %{?with_pgsql:pgsql_drv} %{?with_sqlite:sqlite_drv} @@ -308,13 +306,15 @@ hash_drv %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{/var/run/dspam,/etc/{rc.d/init.d,sysconfig}} \ - $RPM_BUILD_ROOT/var/lib/%{name}/data + $RPM_BUILD_ROOT/var/lib/%{name}/{txt,data} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dspam +cp -a txt/*.txt $RPM_BUILD_ROOT/var/lib/%{name}/txt + # install devel files install -d $RPM_BUILD_ROOT{%{_includedir}/%{name},/var/{log,lib}/%{name}} install src/*.h $RPM_BUILD_ROOT%{_includedir}/%{name} @@ -328,9 +328,6 @@ EOF chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name} -# fix prefix -sed -i -e "s|%{_prefix}/local|%{_prefix}|g" $RPM_BUILD_ROOT%{_bindir}/%{name}_corpus - # fix purge stuff #install dspam-cron.weekly $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly/%{name} @@ -387,11 +384,6 @@ rm -rf $RPM_BUILD_ROOT %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig -%post driver-db -if [ "$1" = "1" ]; then - sed -i -e '/^StorageDriver/s,/.*.so,%{_libdir}/libdb4_drv.so,' /etc/dspam.conf -fi - %post driver-hash if [ "$1" = "1" ]; then sed -i -e '/^StorageDriver/s,/.*\.so,%{_libdir}/libhash_drv.so,' /etc/dspam.conf @@ -412,10 +404,10 @@ if [ "$1" = "1" ]; then sed -i -e '/^StorageDriver/s,/.*\.so,%{_libdir}/libsqlite_drv.so,' /etc/dspam.conf fi -%triggerin webui -- apache1 +%triggerin webui -- apache1 < 1.3.37-3, apache1-base %webapp_register apache %{_webapp} -%triggerun webui -- apache1 +%triggerun webui -- apache1 < 1.3.37-3, apache1-base %webapp_unregister apache %{_webapp} %triggerin webui -- apache < 2.2.0, apache-base @@ -433,16 +425,16 @@ fi %dir %attr(775,root,mail) /var/run/dspam %dir %attr(750,root,mail) /var/lib/%{name} %dir %attr(770,root,mail) /var/lib/%{name}/data +%dir /var/lib/%{name}/txt +%config(noreplace) %verify(not md5 mtime size) /var/lib/%{name}/txt/*.txt %dir %attr(770,root,mail) /var/log/dspam %attr(754,root,root) /etc/rc.d/init.d/dspam %attr(755,root,root) %config(noreplace) /etc/cron.daily/%{name} %attr(755,root,root) %{_bindir}/%{name} %attr(755,root,root) %{_bindir}/%{name}_logrotate %attr(755,root,root) %{_bindir}/%{name}_clean -%attr(755,root,root) %{_bindir}/%{name}_corpus %attr(755,root,root) %{_bindir}/%{name}_crc %attr(755,root,root) %{_bindir}/%{name}_dump -%attr(755,root,root) %{_bindir}/%{name}_genaliases %attr(755,root,root) %{_bindir}/%{name}_stats %attr(755,root,root) %{_bindir}/%{name}_merge %attr(755,root,root) %{_bindir}/%{name}_2sql @@ -479,12 +471,6 @@ fi %attr(755,root,root) %{_bindir}/css* %attr(755,root,root) %{_libdir}/libhash_drv*.so* -%if %{with db} -%files driver-db -%defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/libdb4_drv*.so* -%endif - %if %{with mysql} %files driver-mysql %defattr(644,root,root,755)