]> git.pld-linux.org Git - packages/dspam.git/blobdiff - dspam.spec
- fix %%files
[packages/dspam.git] / dspam.spec
index d0c0d7172d67dc57fe33cae3db3c2398a1bf68d7..48199327c5685a01089533d1c1538e3382ade86b 100644 (file)
@@ -1,29 +1,35 @@
 # TODO: everything
 #
 # Conditional build:
-%bcond_with    mysql   # enable MySQL storage driver (disable db4 driver)
-%bcond_with    pgsql   # enable PostgreSQL storage driver (disable db4 driver)
+%bcond_with    mysql   # enable MySQL storage driver (disable sqlite driver)
+%bcond_with    pgsql   # enable PostgreSQL storage driver (disable sqlite driver)
+%bcond_with    sqlite3 # enable SQLite3 storage driver (disable sqlite2 driver)
 #
 Summary:       A library and Mail Delivery Agent for Bayesian spam filtering
 Summary(pl):   Biblioteka i MDA do bayesowskiego filtrowania spamu
 Name:          dspam
-Version:       3.2.6
-Release:       0.1
+Version:       3.4.3
+Release:       0.2
 License:       GPL
 Group:         Applications/Mail
 Source0:       http://www.nuclearelephant.com/projects/dspam/sources/%{name}-%{version}.tar.gz
-# Source0-md5: aad53b4542076840e2a0e1fd43e48ebb
-Patch0:                %{name}-Makefile.patch
+# Source0-md5: befcaee35a69efe559471367b2249ea3
 URL:           http://www.nuclearelephant.com/projects/dspam/
 %if %{with mysql}
 BuildRequires: mysql-devel
-%else 
+%else
 %if %{with pgsql}
 BuildRequires: postgresql-devel
 %else
+%if %{with sqlite3}
+BuildRequires: sqlite3-devel
+%else
 BuildRequires: sqlite-devel
+BuildRequires: sqlite-static
+%endif
 %endif
 %endif
+BuildRequires: sed >= 4.0
 Buildroot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -120,8 +126,7 @@ Statyczna biblioteka DSPAM.
 
 %prep
 %setup -q
-%patch0 -p1
-sed -i -e 's#-static##g' tools/Makefile*
+sed -i -e 's#-static##g' src/tools/Makefile*
 
 %build
 %configure \
@@ -132,7 +137,6 @@ sed -i -e 's#-static##g' tools/Makefile*
        --enable-bias \
        --enable-large-scale \
        --enable-delivery-to-stdout \
-       --enable-virtual-users \
        --with-userdir=/var/lib/%{name} \
        --with-dspam-home=/var/lib/%{name} \
        --with-userdir-owner=none \
@@ -152,12 +156,18 @@ sed -i -e 's#-static##g' tools/Makefile*
        --with-storage-driver=pgsql_drv \
        --with-pgsql-includes=%{_includedir}/postgresql \
        --with-pgsql-libraries=%{_libdir}
+%else
+%if %{with sqlite3}
+       --with-storage-driver=sqlite3_drv \
+       --with-sqlite3-includes=%{_includedir} \
+       --with-sqlite3-libraries=%{_libdir}
 %else
        --with-storage-driver=sqlite_drv \
        --with-sqlite-includes=%{_includedir} \
        --with-sqlite-libraries=%{_libdir}
 %endif
 %endif
+%endif
 %{__make}
 
 %install
@@ -168,16 +178,13 @@ rm -rf $RPM_BUILD_ROOT
 
 # install devel files
 install -d $RPM_BUILD_ROOT{%{_includedir}/%{name},/var/lib/%{name}}
-install -m0644 libdspam.h $RPM_BUILD_ROOT%{_includedir}/%{name}
-install -m0644 libdspam_objects.h $RPM_BUILD_ROOT%{_includedir}/%{name}
-install -m0644 lht.h $RPM_BUILD_ROOT%{_includedir}/%{name}
-install -m0644 nodetree.h $RPM_BUILD_ROOT%{_includedir}/%{name}
+install src/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}
 
 # provide maintenance scripts
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly
+install -d $RPM_BUILD_ROOT/etc/cron.daily
+install -d $RPM_BUILD_ROOT/etc/cron.weekly
 
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name} <<EOF
+cat > $RPM_BUILD_ROOT/etc/cron.daily/%{name} <<EOF
 #!/bin/sh
 exec %{_bindir}/%{name}_clean -s -p
 EOF
@@ -185,15 +192,13 @@ EOF
 chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name}
 
 # fix prefix
-perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" $RPM_BUILD_ROOT%{_bindir}/%{name}_corpus
-perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" cgi/dspam.cgi
+sed -i -e "s|%{_prefix}/local|%{_prefix}|g" $RPM_BUILD_ROOT%{_bindir}/%{name}_corpus
+sed -i -e "s|%{_prefix}/local|%{_prefix}|g" cgi/dspam.cgi
 
 # fix purge stuff
-#install -m0755 dspam-cron.weekly $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly/%{name}
+#install dspam-cron.weekly $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly/%{name}
 
 %if %{with mysql}
-cp tools.mysql_drv/README README.mysql
-
 # fix missing file
 install -d $RPM_BUILD_ROOT/var/lib/%{name}
 cat > $RPM_BUILD_ROOT/var/lib/%{name}/mysql.data <<EOF
@@ -212,8 +217,6 @@ EOF
 %endif
 
 %if %{with pgsql}
-cp tools.pgsql_drv/README README.pgsql
-
 # fix missing file
 install -d $RPM_BUILD_ROOT/var/lib/%{name}
 cat > $RPM_BUILD_ROOT/var/lib/%{name}/pgsql.data <<EOF
@@ -239,28 +242,27 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc README CHANGELOG RELEASE.NOTES
+%doc README CHANGELOG RELEASE.NOTES UPGRADING
 %doc cgi/base.css cgi/dspam.cgi
 %if %{with mysql}
-%doc README.mysql
-%doc tools.mysql_drv/mysql_objects.sql.space.optimized
-%doc tools.mysql_drv/mysql_objects.sql.speed.optimized
-%doc tools.mysql_drv/purge.sql
-%doc tools.mysql_drv/virtual_users.sql
+%doc doc/mysql_drv.txt
+%doc src/tools.mysql_drv/*.sql
 %endif
 %if %{with pgsql}
-%doc README.pgsql
-%doc tools.pgsql_drv/virtual_users.sql
-%doc tools.pgsql_drv/pgsql_objects.sql
-%doc tools.pgsql_drv/purge.sql
+%doc doc/pgsql_drv.txt
+%doc src/tools.pgsql_drv/*.sql
+%endif
+%if %{!with mysql} && %{!with pgsql}
+%doc doc/sqlite_drv.txt
 %endif
-%config(noreplace) %verify(not size mtime md5) /etc/dspam.conf
-%dir %attr(0750,root,mail) /var/lib/%{name}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dspam.conf
+%dir %attr(750,root,mail) /var/lib/%{name}
 %{?with_mysql:%attr(640,root,mail) %config(noreplace) /var/lib/%{name}/mysql.data}
 %{?with_pgsql:%attr(640,root,mail) %config(noreplace) /var/lib/%{name}/pgsql.data}
-%attr(755,root,root) %config(noreplace) %{_sysconfdir}/cron.daily/%{name}
+%attr(755,root,root) %config(noreplace) /etc/cron.daily/%{name}
 %attr(755,root,mail) %{_bindir}/%{name}
-%attr(755,root,root) %{_bindir}/%{name}_admin
+%attr(755,root,mail) %{_bindir}/%{name}c
+%attr(755,root,mail) %{_bindir}/%{name}_logrotate
 %attr(755,root,root) %{_bindir}/%{name}_clean
 %attr(755,root,root) %{_bindir}/%{name}_corpus
 %attr(755,root,root) %{_bindir}/%{name}_crc
@@ -269,8 +271,9 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/%{name}_stats
 %attr(755,root,root) %{_bindir}/%{name}_merge
 %attr(755,root,root) %{_bindir}/%{name}_2sql
-%attr(755,root,root) %{_bindir}/%{name}_stats
-%{_mandir}/man?/*
+%attr(755,root,root) %{_bindir}/%{name}_admin
+%{?with_pgsql:%attr(755,root,root) %{_bindir}/%{name}_pg2int8}
+%{_mandir}/man?/%{name}*
 
 %files libs
 %defattr(644,root,root,755)
@@ -282,6 +285,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/lib*.so
 %{_libdir}/lib*.la
 %{_includedir}/%{name}
+%{_mandir}/man3/libdspam*
 %{_pkgconfigdir}/*.pc
 
 %files static
This page took 0.063378 seconds and 4 git commands to generate.