Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37411220
en ru br
Репозитории ALT
5.1: 3.9.0-alt1.beta2
4.1: 3.8.0-alt1.8
4.0: 3.8.0-alt1.4
3.0: 3.4.8-alt1
www.altlinux.org/Changes

Другие репозитории
Upstream:3.8.0

Группа :: Сети/Почта
Пакет: dspam

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define priority 50

Name: dspam
Version: 3.4.8
Release: alt1
Summary: DSPAM is an open-source, freely available anti-spam solution
License: GPL
Group: Networking/Mail
Source: %name-%version.tar.gz
URL: http://dspam.nuclearelephant.com
Packager: Ivan Fedorov <ns at altlinux.ru>
Requires: %name-storage = %version-%release

Patch0: dspam-alt-charset-fix.patch

%def_with mysql
%def_with pgsql
%def_with sqlite

BuildPreReq: libalternatives-devel
BuildPreReq: zlib-devel

%{?_with_sqlite:BuildPreReq: libsqlite3-devel}
%{?_with_mysql:BuildPreReq: libMySQL-devel}
%{?_with_pgsql:BuildPreReq: libpq4-devel postgresql8.0-devel}

%description
DSPAM is an open-source, freely available anti-spam solution designed to combat
unsolicited commercial email using advanced statistical analysis. In short,
DSPAM filters spam by learning what spam is and isn't by learning
each user's individual mail behavior. This allows DSPAM to provide
highly-accurate, personalized filtering for each user on even a large system
and provides an administratively maintenance free solution capable of learning
each user's email behaviors with very few false positives.

You need to install one of storage package (%name-*).

%if_with sqlite
%package sqlite
Summary: DSPAM is an open-source, freely available anti-spam solution (SQLite storage)
Group: Networking/Mail
Requires: %name = %version-%release
PreReq: alternatives >= 0:0.2.0-alt0.12
Provides: %name-storage = %version-%release
%description sqlite
DSPAM is an open-source, freely available anti-spam solution designed to combat
unsolicited commercial email using advanced statistical analysis. In short,
DSPAM filters spam by learning what spam is and isn't by learning
each user's individual mail behavior. This allows DSPAM to provide
highly-accurate, personalized filtering for each user on even a large system
and provides an administratively maintenance free solution capable of learning
each user's email behaviors with very few false positives.

%package -n lib%name-sqlite
Summary: The DSPAM core processing engine (SQLite storage)
Group: System/Libraries
Provides: lib%name = %version-%release
Conflicts: lib%name-mysql
Conflicts: lib%name-pgsql
%description -n lib%name-sqlite
The DSPAM core processing engine, also known as libdspam, provides all primary
spam filtering functions.  The engine is linked to other dspam components (or
shells) to provide functionality. libdspam is capable of being linked
in with any other application as a "drop-in" to provide spam filtering to
mail clients, other anti-spam tools, and other such type projects that
would benefit from its use.  Both static and shared versions are built by
libtool and installed upon 'make install'.

%package -n lib%name-sqlite-devel-static
Summary: The DSPAM core processing engine (SQLite storage)
Group: Development/C
Requires: lib%name-devel = %version-%release
%description -n lib%name-sqlite-devel-static
The DSPAM core processing engine, also known as libdspam, provides all primary
spam filtering functions.  The engine is linked to other dspam components (or
shells) to provide functionality. libdspam is capable of being linked
in with any other application as a "drop-in" to provide spam filtering to
mail clients, other anti-spam tools, and other such type projects that
would benefit from its use.  Both static and shared versions are built by
libtool and installed upon 'make install'.
%endif #with sqlite

%if_with pgsql
%package pgsql
Summary: DSPAM is an open-source, freely available anti-spam solution (PostgreSQL storage)
Group: Networking/Mail
Requires: %name = %version-%release
PreReq: alternatives >= 0:0.2.0-alt0.12
Provides: %name-storage = %version-%release
%description pgsql
DSPAM is an open-source, freely available anti-spam solution designed to combat
unsolicited commercial email using advanced statistical analysis. In short,
DSPAM filters spam by learning what spam is and isn't by learning
each user's individual mail behavior. This allows DSPAM to provide
highly-accurate, personalized filtering for each user on even a large system
and provides an administratively maintenance free solution capable of learning
each user's email behaviors with very few false positives.

%package -n lib%name-pgsql
Summary: The DSPAM core processing engine (PostgreSQL storage)
Group: System/Libraries
Provides: lib%name = %version-%release
Conflicts: lib%name-mysql
Conflicts: lib%name-sqlite
%description -n lib%name-pgsql
The DSPAM core processing engine, also known as libdspam, provides all primary
spam filtering functions.  The engine is linked to other dspam components (or
shells) to provide functionality. libdspam is capable of being linked
in with any other application as a "drop-in" to provide spam filtering to
mail clients, other anti-spam tools, and other such type projects that
would benefit from its use.  Both static and shared versions are built by
libtool and installed upon 'make install'.

%package -n lib%name-pgsql-devel-static
Summary: The DSPAM core processing engine (PostgreSQL storage)
Group: Development/C
Requires: lib%name-devel = %version-%release
%description -n lib%name-pgsql-devel-static
The DSPAM core processing engine, also known as libdspam, provides all primary
spam filtering functions.  The engine is linked to other dspam components (or
shells) to provide functionality. libdspam is capable of being linked
in with any other application as a "drop-in" to provide spam filtering to
mail clients, other anti-spam tools, and other such type projects that
would benefit from its use.  Both static and shared versions are built by
libtool and installed upon 'make install'.
%endif #with pgsql

%if_with mysql
%package mysql
Summary: DSPAM is an open-source, freely available anti-spam solution (MySQL storage)
Group: Networking/Mail
Requires: %name = %version-%release
PreReq: alternatives >= 0:0.2.0-alt0.12
Provides: %name-storage = %version-%release
%description mysql
DSPAM is an open-source, freely available anti-spam solution designed to combat
unsolicited commercial email using advanced statistical analysis. In short,
DSPAM filters spam by learning what spam is and isn't by learning
each user's individual mail behavior. This allows DSPAM to provide
highly-accurate, personalized filtering for each user on even a large system
and provides an administratively maintenance free solution capable of learning
each user's email behaviors with very few false positives.

%package -n lib%name-mysql
Summary: The DSPAM core processing engine (MySQL storage)
Group: System/Libraries
Provides: lib%name = %version-%release
Conflicts: lib%name-pgsql
Conflicts: lib%name-sqlite
%description -n lib%name-mysql
The DSPAM core processing engine, also known as libdspam, provides all primary
spam filtering functions.  The engine is linked to other dspam components (or
shells) to provide functionality. libdspam is capable of being linked
in with any other application as a "drop-in" to provide spam filtering to
mail clients, other anti-spam tools, and other such type projects that
would benefit from its use.  Both static and shared versions are built by
libtool and installed upon 'make install'.

%package -n lib%name-mysql-devel-static
Summary: The DSPAM core processing engine (MySQL storage)
Group: Development/C
Requires: lib%name-devel = %version-%release
%description -n lib%name-mysql-devel-static
The DSPAM core processing engine, also known as libdspam, provides all primary
spam filtering functions.  The engine is linked to other dspam components (or
shells) to provide functionality. libdspam is capable of being linked
in with any other application as a "drop-in" to provide spam filtering to
mail clients, other anti-spam tools, and other such type projects that
would benefit from its use.  Both static and shared versions are built by
libtool and installed upon 'make install'.
%endif #with mysql

%package -n lib%name-devel
Summary: The DSPAM core processing engine
Group: Development/C
Requires: %name = %version-%release
%description -n lib%name-devel
The DSPAM core processing engine, also known as libdspam, provides all primary
spam filtering functions.  The engine is linked to other dspam components (or
shells) to provide functionality. libdspam is capable of being linked
in with any other application as a "drop-in" to provide spam filtering to
mail clients, other anti-spam tools, and other such type projects that
would benefit from its use.  Both static and shared versions are built by
libtool and installed upon 'make install'.

%prep
%setup -c -T -b0
%patch0 -p0

%build
pushd %name-%version
 %__autoconf
popd

%if_with sqlite
 %__cp -a %name-%version %name-sqlite
 pushd %name-sqlite
   %configure --with-storage-driver=sqlite3_drv
   %make_build OPT="-fPIC $RPM_OPT_FLAGS"
 popd
%endif #with sqlite

%if_with pgsql
 %__cp -a %name-%version %name-pgsql
 pushd %name-pgsql
   %configure --enable-daemon --with-storage-driver=pgsql_drv --with-pgsql-includes=%_includedir/pgsql
   %make_build OPT="-fPIC $RPM_OPT_FLAGS"
 popd
%endif #with pgsql

%if_with mysql
 %__cp -a %name-%version %name-mysql
 pushd %name-mysql
   %configure --enable-daemon --with-storage-driver=mysql_drv --with-mysql-includes=%_includedir/mysql
   %make_build OPT="-fPIC $RPM_OPT_FLAGS"
 popd
%endif #with mysql

%install
%__mkdir_p %buildroot{%_altdir,/var/lib/%name}

%if_with sqlite
 pushd %name-sqlite
   %make DESTDIR=%buildroot install
   %__mkdir_p %buildroot/%_libdir/%name-sqlite/{bin,lib}
   %__mv %buildroot/%_bindir/* %buildroot/%_libdir/%name-sqlite/bin/
   %__mv %buildroot/%_libdir/lib*so.* %buildroot/%_libdir/%name-sqlite/lib/
   %__mv %buildroot/%_libdir/lib*a %buildroot/%_libdir/%name-sqlite/lib/
 popd

 echo "%_bindir/%name %_libdir/%name-sqlite/bin/%name %priority" > %buildroot%_altdir/%name-sqlite
 for bin in `ls -1 %buildroot%_libdir/%name-sqlite/bin/ |egrep -v "^dspam$"`; do
   echo "%_bindir/$bin %_libdir/%name-sqlite/bin/$bin %_libdir/%name-sqlite/bin/%name" >> %buildroot%_altdir/%name-sqlite
 done
%endif #with sqlite

%if_with pgsql
 pushd %name-pgsql
   %make DESTDIR=%buildroot install
   %__mkdir_p %buildroot/%_libdir/%name-pgsql/{bin,lib}
   %__mv %buildroot/%_bindir/* %buildroot/%_libdir/%name-pgsql/bin/
   %__mv %buildroot/%_libdir/lib*so.* %buildroot/%_libdir/%name-pgsql/lib/
   %__mv %buildroot/%_libdir/lib*a %buildroot/%_libdir/%name-pgsql/lib/
 popd

 echo "%_bindir/%name %_libdir/%name-pgsql/bin/%name %priority" > %buildroot%_altdir/%name-pgsql
 for bin in `ls -1 %buildroot%_libdir/%name-pgsql/bin/ |egrep -v "^dspam$"`; do
   echo "%_bindir/$bin %_libdir/%name-pgsql/bin/$bin %_libdir/%name-pgsql/bin/%name" >> %buildroot%_altdir/%name-pgsql
 done
%endif #with pgsql

%if_with mysql
 pushd %name-mysql
   %make DESTDIR=%buildroot install
   %__mkdir_p %buildroot/%_libdir/%name-mysql/{bin,lib}
   %__mv %buildroot/%_bindir/* %buildroot/%_libdir/%name-mysql/bin/
   %__mv %buildroot/%_libdir/lib*so.* %buildroot/%_libdir/%name-mysql/lib/
   %__mv %buildroot/%_libdir/lib*a %buildroot/%_libdir/%name-mysql/lib/
 popd

 echo "%_bindir/%name %_libdir/%name-mysql/bin/%name %priority" > %buildroot%_altdir/%name-mysql
 for bin in `ls -1 %buildroot%_libdir/%name-mysql/bin/ |egrep -v "^dspam$"`; do
   echo "%_bindir/$bin %_libdir/%name-mysql/bin/$bin %_libdir/%name-mysql/bin/%name" >> %buildroot%_altdir/%name-mysql
 done
%endif #with mysql

%__subst s,/usr/var/dspam,/var/lib/%name, %buildroot%_sysconfdir/%name.conf

%if_with sqlite
%post sqlite
%register_alternatives %name-sqlite -- `ls -1 %_libdir/%name-sqlite/bin/ |xargs echo -n`

%preun sqlite
%unregister_alternatives %name-sqlite

%post -n lib%name-sqlite
for l in `ls %_libdir/%name-sqlite/lib/`; do
 ln -sf %_libdir/%name-sqlite/lib/$l %_libdir/$l
done

%preun -n lib%name-sqlite
for l in `ls %_libdir/%name-sqlite/lib/`; do
 rm -f %_libdir/$l
done
%endif #with sqlite

%if_with pgsql
%post pgsql
%register_alternatives %name-pgsql -- `ls -1 %_libdir/%name-pgsql/bin/ |xargs echo -n`

%preun pgsql
%unregister_alternatives %name-pgsql

%post -n lib%name-pgsql
for l in `ls %_libdir/%name-pgsql/lib/`; do
 ln -sf %_libdir/%name-pgsql/lib/$l %_libdir/$l
done

%preun -n lib%name-pgsql
for l in `ls %_libdir/%name-pgsql/lib/`; do
 rm -f %_libdir/$l
done
%endif #with pgsql

%if_with mysql
%post mysql
%register_alternatives %name-mysql -- `ls -1 %_libdir/%name-mysql/bin/ |xargs echo -n`

%preun mysql
%unregister_alternatives %name-mysql

%post -n lib%name-mysql
for l in `ls %_libdir/%name-mysql/lib/`; do
 ln -sf %_libdir/%name-mysql/lib/$l %_libdir/$l
done

%preun -n lib%name-mysql
for l in `ls %_libdir/%name-mysql/lib/`; do
 rm -f %_libdir/$l
done
%endif #with mysql

%files
%config(noreplace) %_sysconfdir/%name.conf
%_man1dir/*
/var/lib/%name

%files -n lib%name-devel
%dir %_includedir/%name
%_includedir/%name/*
%_man3dir/*
%_libdir/lib%name.so
%_libdir/pkgconfig/%name.pc

%if_with sqlite
%files sqlite
%dir %_libdir/%name-sqlite/
%dir %_libdir/%name-sqlite/bin
%_libdir/%name-sqlite/bin/*
%_altdir/%name-sqlite
%files -n lib%name-sqlite
%dir %_libdir/%name-sqlite/
%dir %_libdir/%name-sqlite/lib
%_libdir/%name-sqlite/lib/lib%name.so.*
%files -n lib%name-sqlite-devel-static
%_libdir/%name-sqlite/lib/lib%name.a
%endif #with sqlite

%if_with pgsql
%files pgsql
%dir %_libdir/%name-pgsql/
%dir %_libdir/%name-pgsql/bin
%_libdir/%name-pgsql/bin/*
%_altdir/%name-pgsql
%files -n lib%name-pgsql
%dir %_libdir/%name-pgsql/
%dir %_libdir/%name-pgsql/lib
%_libdir/%name-pgsql/lib/lib%name.so.*
%files -n lib%name-pgsql-devel-static
%_libdir/%name-pgsql/lib/lib%name.a
%endif #with pgsql

%if_with mysql
%files mysql
%dir %_libdir/%name-mysql/
%dir %_libdir/%name-mysql/bin
%_libdir/%name-mysql/bin/*
%_altdir/%name-mysql
%files -n lib%name-mysql
%dir %_libdir/%name-mysql/
%dir %_libdir/%name-mysql/lib
%_libdir/%name-mysql/lib/lib%name.so.*
%files -n lib%name-mysql-devel-static
%_libdir/%name-mysql/lib/lib%name.a
%endif #with mysql

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin