Author: glen                         Date: Tue Oct 25 06:47:47 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- sed to place driver to config for -driver- packages
- set dspam-home-{owner,group} to avoid install warnings
- create $DRIVERS variable to avoid messing with commas and avoiding possible 
errors

---- Files affected:
SPECS:
   dspam.spec (1.47 -> 1.48) 

---- Diffs:

================================================================
Index: SPECS/dspam.spec
diff -u SPECS/dspam.spec:1.47 SPECS/dspam.spec:1.48
--- SPECS/dspam.spec:1.47       Tue Oct 25 07:48:06 2005
+++ SPECS/dspam.spec    Tue Oct 25 08:47:42 2005
@@ -4,7 +4,6 @@
 # - support for libdclassify
 # - oracle driver
 # - messages from default install of cron with mysql driver
-# 3197: [10/25/2005 05:02:01] dlopen() failed: /usr/lib/libhash_drv.so: 
/usr/lib/libhash_drv.so: cannot open shared object file: No such file or 
directory
 # Memory fault
 #
 # Conditional build:
@@ -18,7 +17,7 @@
 Summary(pl):   Biblioteka i MDA do bayesowskiego filtrowania spamu
 Name:          dspam
 Version:       3.6.0
-Release:       0.3
+Release:       0.5
 License:       GPL
 Group:         Applications/Mail
 Source0:       
http://www.nuclearelephant.com/projects/dspam/sources/%{name}-%{version}.tar.gz
@@ -150,6 +149,7 @@
 Summary(pl):   Sterownik HASH dla DSPAM-a
 Group:         Libraries
 Requires:      %{name}-libs = %{version}-%{release}
+Requires(post):        sed >= 4.0
 Provides:      %{name}-driver = %{version}-%{release}
 
 %description driver-hash
@@ -163,6 +163,7 @@
 Summary(pl):   Sterownik DB dla DSPAM-a
 Group:         Libraries
 Requires:      %{name}-libs = %{version}-%{release}
+Requires(post):        sed >= 4.0
 Provides:      %{name}-driver = %{version}-%{release}
 
 %description driver-db
@@ -176,6 +177,7 @@
 Summary(pl):   Sterownik MySQL dla DSPAM-a
 Group:         Libraries
 Requires:      %{name}-libs = %{version}-%{release}
+Requires(post):        sed >= 4.0
 Provides:      %{name}-driver = %{version}-%{release}
 
 %description driver-mysql
@@ -189,6 +191,7 @@
 Summary(pl):   Sterownik PostgreSQL dla DSPAM-a
 Group:         Libraries
 Requires:      %{name}-libs = %{version}-%{release}
+Requires(post):        sed >= 4.0
 Provides:      %{name}-driver = %{version}-%{release}
 
 %description driver-pgsql
@@ -202,6 +205,7 @@
 Summary(pl):   Sterownik SQLite dla DSPAM-a
 Group:         Libraries
 Requires:      %{name}-libs = %{version}-%{release}
+Requires(post):        sed >= 4.0
 Provides:      %{name}-driver = %{version}-%{release}
 
 %description driver-sqlite
@@ -219,15 +223,25 @@
 %{__aclocal} -I m4
 %{__autoconf}
 %{__automake}
+
+DRIVERS="
+hash_drv
+%{?with_db:libdb4_drv}
+%{?with_mysql:mysql_drv}
+%{?with_pgsql:pgsql_drv}
+%{?with_sqlite:sqlite_drv}
+"
 %configure \
        %{?debug: --enable-debug --enable-bnr-debug --enable-verbose-debug} \
        --enable-trusted-user-security \
        --enable-bias \
        --enable-large-scale \
        --with-userdir=/var/lib/%{name} \
-       --with-dspam-home=/var/lib/%{name} \
        --with-userdir-owner=none \
        --with-userdir-group=none \
+       --with-dspam-home=/var/lib/%{name} \
+       --with-dspam-home-owner=none \
+       --with-dspam-home-group=none \
        --with-dspam-owner=none \
        --with-dspam-group=none \
        --with-signature-life=14 \
@@ -237,8 +251,8 @@
        --enable-preferences-extension \
        --enable-long-usernames \
        --enable-neural-networking \
-        --enable-virtual-users \
-        
--with-storage-driver=hash_drv%{?with_db:,libdb4_drv}%{?with_mysql:,mysql_drv}%{?with_pgsql:,pgsql_drv}%{?with_sqlite:,sqlite_drv}
 \
+       --enable-virtual-users \
+       --with-storage-driver=$(echo $DRIVERS | tr ' ' ',') \
 %if %{with mysql}
        --with-mysql-includes=%{_includedir}/mysql \
        --with-mysql-libraries=%{_libdir} \
@@ -346,6 +360,31 @@
 %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
+fi
+
+%post driver-mysql
+if [ "$1" = "1" ]; then
+       sed -i -e '/^StorageDriver/s,/.*\.so,%{_libdir}/libmysql_drv.so,' 
/etc/dspam.conf
+fi
+
+%post driver-pgsql
+if [ "$1" = "1" ]; then
+       sed -i -e '/^StorageDriver/s,/.*\.so,%{_libdir}/libpgsql_drv.so,' 
/etc/dspam.conf
+fi
+
+%post driver-sqlite
+if [ "$1" = "1" ]; then
+       sed -i -e '/^StorageDriver/s,/.*\.so,%{_libdir}/libsqlite_drv.so,' 
/etc/dspam.conf
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc README CHANGELOG RELEASE.NOTES UPGRADING
@@ -435,6 +474,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.48  2005/10/25 06:47:42  glen
+- sed to place driver to config for -driver- packages
+- set dspam-home-{owner,group} to avoid install warnings
+- create $DRIVERS variable to avoid messing with commas and avoiding possible 
errors
+
 Revision 1.47  2005/10/25 05:48:06  glen
 - update todo
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/dspam.spec?r1=1.47&r2=1.48&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to