Группа :: Сети/Почта
Пакет: dspam
Главная Изменения Спек Патчи Загрузить Bugs and FR
%define priority 50
Name: dspam
Version: 3.6.3
Release: alt0.M24
Summary: DSPAM is an open-source, freely available anti-spam solution
License: GPL
Group: Networking/Mail
Source0: %name-%version.tar.gz
Source1: %name.init
Source2: %name-clean
URL: http://dspam.nuclearelephant.com
Packager: Ivan Fedorov <ns at altlinux.ru>
Requires: %name-storage = %version-%release
#hash storage always enabled
%def_with hash
%def_with mysql
%def_with pgsql
%def_without sqlite3
%def_without libdb3
%def_without libdb4
%def_without sqlite
%def_without ora
BuildPreReq: zlib-devel
BuildPreReq: gcc-c++
BuildPreReq: libstdc++-devel
%{?_with_libdb3:BuildPreReq: libdb3-devel}
%{?_with_libdb4:BuildPreReq: libdb4-devel}
%{?_with_sqlite:BuildPreReq: libsqlite-devel}
%{?_with_sqlite3:BuildPreReq: libsqlite3-devel}
%{?_with_mysql:BuildPreReq: libMySQL-devel}
%{?_with_pgsql:BuildPreReq: postgresql-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 hash
%package hash
Summary: DSPAM is an open-source, freely available anti-spam solution (hash storage)
Group: Networking/Mail
Requires: %name = %version-%release
Provides: %name-storage = %version-%release
%description hash
DSPAM Hash storage driver
%endif #with hash
%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
Provides: %name-storage = %version-%release
%description sqlite
DSPAM SQLite driver
%endif #with sqlite
%if_with sqlite3
%package sqlite3
Summary: DSPAM is an open-source, freely available anti-spam solution (SQLite3 storage)
Group: Networking/Mail
Requires: %name = %version-%release
Provides: %name-storage = %version-%release
%description sqlite3
DSPAM SQLite3 driver
%endif #with sqlite3
%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
Provides: %name-storage = %version-%release
%description pgsql
DSPAM PostgreSQL driver
%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
Provides: %name-storage = %version-%release
%description mysql
DSPAM MySQL driver
%endif #with mysql
%package -n lib%name
Summary: The DSPAM core processing engine
Group: Development/C
%description -n lib%name
The DSPAM core processing engine, also known as libdspam, provides all primary
spam filtering functions.
%package -n lib%name-devel
Summary: The DSPAM core processing engine
Group: Development/C
Requires: lib%name = %version-%release
%description -n lib%name-devel
The DSPAM core processing engine development files. 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.
%prep
%setup
%build
STORAGES_LIST="hash_drv"
STORAGES_INCLUDE_LIST=""
%if_with pgsql
STORAGES_LIST="${STORAGES_LIST},pgsql_drv"
STORAGES_INCLUDE_LIST="${STORAGES_INCLUDE_LIST} --with-pgsql-includes=%_includedir/pgsql/"
%endif #with pgsql
%if_with mysql
STORAGES_LIST="${STORAGES_LIST},mysql_drv"
STORAGES_INCLUDE_LIST="${STORAGES_INCLUDE_LIST} --with-mysql-includes=%_includedir/mysql/"
%endif #with mysql
%if_with sqlite
STORAGES_LIST="${STORAGES_LIST},sqlite_drv"
%endif #with sqlite
%if_with sqlite3
STORAGES_LIST="${STORAGES_LIST},sqlite3_drv"
%endif #with sqlite3
%if_with libdb4
STORAGES_LIST="${STORAGES_LIST},libdb4_drv"
%endif #with libdb4
%__autoconf
%configure --with-storage-driver=${STORAGES_LIST} ${STORAGES_INCLUDE_LIST} \
--disable-dependency-tracking --enable-daemon --enable-homedir \
--enable-neural-networking --enable-preferences-extension \
--enable-virtual-users --with-gnu-ld --with-pic --enable-clamav \
--with-dspam-home=/var/lib/%name --with-logdir=%_logdir/%name
%make_build CFLAGS="%optflags %optflags_shared"
%install
%make DESTDIR=%buildroot install
%__mkdir_p %buildroot/var/lib/%name/txt
%__install -m644 txt/*.txt %buildroot/var/lib/%name/txt/
%__mkdir_p %buildroot/%_initdir
%__install -m 0755 %SOURCE1 %buildroot/%_initdir/%name
%__mkdir_p %buildroot/%_sysconfdir/cron.daily
%__install -m 0755 %SOURCE2 %buildroot/%_sysconfdir/cron.daily/
%__mkdir_p %buildroot/%_docdir/%name-%version
%__mkdir_p %buildroot/%_docdir/%name-%version/txt
%__mkdir_p %buildroot/%_docdir/%name-%version/doc
%__install -m644 CHANGELOG LICENSE README RELEASE.NOTES UPGRADING %buildroot/%_docdir/%name-%version
%__install -m644 doc/courier.txt doc/exim.txt doc/markov.txt doc/postfix.txt doc/relay.txt doc/sendmail.txt %buildroot/%_docdir/%name-%version/doc/
%__subst s,/usr/var/dspam,/var/lib/%name, %buildroot%_sysconfdir/%name.conf
%files
%_bindir/*
%exclude %_bindir/css*
%exclude %_bindir/dspam_pg2int8
%config(noreplace) %_sysconfdir/%name.conf
%_initdir/%name
%_sysconfdir/cron.daily/%name-clean
%_man1dir/*
%dir %attr(0770,root,mail) /var/lib/%name
/var/lib/%name/txt/*
%doc %_docdir/%name-%version/*
%files -n lib%name
%_libdir/lib%name.so.*
%files -n lib%name-devel
%dir %_includedir/%name
%_includedir/%name/*
%_man3dir/*
%_libdir/lib%name.so
%_libdir/pkgconfig/%name.pc
%if_with hash
%files hash
%_bindir/css*
%_libdir/libhash_drv.so*
%_libdir/libhash_drv.so.*
%endif #with hash
%if_with sqlite
%files sqlite
%_libdir/libsqlite_drv.so
%_libdir/libsqlite_drv.so.*
%doc %attr(0644,root,root) src/tools.sqlite_drv/purge-2.sql doc/sqlite_drv.txt
%endif #with sqlite
%if_with sqlite3
%files sqlite3
%_libdir/libsqlite3_drv.so
%_libdir/libsqlite3_drv.so.*
%doc %attr(0644,root,root) src/tools.sqlite_drv/purge-3.sql doc/sqlite_drv.txt
%endif #with sqlite3
%if_with pgsql
%files pgsql
%_bindir/dspam_pg2int8
%_libdir/libpgsql_drv.so
%_libdir/libpgsql_drv.so.*
%doc %attr(0644,root,root) src/tools.pgsql_drv/*.sql doc/pgsql_drv.txt
%endif #with pgsql
%if_with mysql
%files mysql
%_libdir/libmysql_drv.so
%_libdir/libmysql_drv.so.*
%doc src/tools.mysql_drv/*.sql doc/mysql_drv.txt
%endif #with mysql
%changelog
…
Полный changelog можно просмотреть здесь
Name: dspam
Version: 3.6.3
Release: alt0.M24
Summary: DSPAM is an open-source, freely available anti-spam solution
License: GPL
Group: Networking/Mail
Source0: %name-%version.tar.gz
Source1: %name.init
Source2: %name-clean
URL: http://dspam.nuclearelephant.com
Packager: Ivan Fedorov <ns at altlinux.ru>
Requires: %name-storage = %version-%release
#hash storage always enabled
%def_with hash
%def_with mysql
%def_with pgsql
%def_without sqlite3
%def_without libdb3
%def_without libdb4
%def_without sqlite
%def_without ora
BuildPreReq: zlib-devel
BuildPreReq: gcc-c++
BuildPreReq: libstdc++-devel
%{?_with_libdb3:BuildPreReq: libdb3-devel}
%{?_with_libdb4:BuildPreReq: libdb4-devel}
%{?_with_sqlite:BuildPreReq: libsqlite-devel}
%{?_with_sqlite3:BuildPreReq: libsqlite3-devel}
%{?_with_mysql:BuildPreReq: libMySQL-devel}
%{?_with_pgsql:BuildPreReq: postgresql-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 hash
%package hash
Summary: DSPAM is an open-source, freely available anti-spam solution (hash storage)
Group: Networking/Mail
Requires: %name = %version-%release
Provides: %name-storage = %version-%release
%description hash
DSPAM Hash storage driver
%endif #with hash
%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
Provides: %name-storage = %version-%release
%description sqlite
DSPAM SQLite driver
%endif #with sqlite
%if_with sqlite3
%package sqlite3
Summary: DSPAM is an open-source, freely available anti-spam solution (SQLite3 storage)
Group: Networking/Mail
Requires: %name = %version-%release
Provides: %name-storage = %version-%release
%description sqlite3
DSPAM SQLite3 driver
%endif #with sqlite3
%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
Provides: %name-storage = %version-%release
%description pgsql
DSPAM PostgreSQL driver
%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
Provides: %name-storage = %version-%release
%description mysql
DSPAM MySQL driver
%endif #with mysql
%package -n lib%name
Summary: The DSPAM core processing engine
Group: Development/C
%description -n lib%name
The DSPAM core processing engine, also known as libdspam, provides all primary
spam filtering functions.
%package -n lib%name-devel
Summary: The DSPAM core processing engine
Group: Development/C
Requires: lib%name = %version-%release
%description -n lib%name-devel
The DSPAM core processing engine development files. 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.
%prep
%setup
%build
STORAGES_LIST="hash_drv"
STORAGES_INCLUDE_LIST=""
%if_with pgsql
STORAGES_LIST="${STORAGES_LIST},pgsql_drv"
STORAGES_INCLUDE_LIST="${STORAGES_INCLUDE_LIST} --with-pgsql-includes=%_includedir/pgsql/"
%endif #with pgsql
%if_with mysql
STORAGES_LIST="${STORAGES_LIST},mysql_drv"
STORAGES_INCLUDE_LIST="${STORAGES_INCLUDE_LIST} --with-mysql-includes=%_includedir/mysql/"
%endif #with mysql
%if_with sqlite
STORAGES_LIST="${STORAGES_LIST},sqlite_drv"
%endif #with sqlite
%if_with sqlite3
STORAGES_LIST="${STORAGES_LIST},sqlite3_drv"
%endif #with sqlite3
%if_with libdb4
STORAGES_LIST="${STORAGES_LIST},libdb4_drv"
%endif #with libdb4
%__autoconf
%configure --with-storage-driver=${STORAGES_LIST} ${STORAGES_INCLUDE_LIST} \
--disable-dependency-tracking --enable-daemon --enable-homedir \
--enable-neural-networking --enable-preferences-extension \
--enable-virtual-users --with-gnu-ld --with-pic --enable-clamav \
--with-dspam-home=/var/lib/%name --with-logdir=%_logdir/%name
%make_build CFLAGS="%optflags %optflags_shared"
%install
%make DESTDIR=%buildroot install
%__mkdir_p %buildroot/var/lib/%name/txt
%__install -m644 txt/*.txt %buildroot/var/lib/%name/txt/
%__mkdir_p %buildroot/%_initdir
%__install -m 0755 %SOURCE1 %buildroot/%_initdir/%name
%__mkdir_p %buildroot/%_sysconfdir/cron.daily
%__install -m 0755 %SOURCE2 %buildroot/%_sysconfdir/cron.daily/
%__mkdir_p %buildroot/%_docdir/%name-%version
%__mkdir_p %buildroot/%_docdir/%name-%version/txt
%__mkdir_p %buildroot/%_docdir/%name-%version/doc
%__install -m644 CHANGELOG LICENSE README RELEASE.NOTES UPGRADING %buildroot/%_docdir/%name-%version
%__install -m644 doc/courier.txt doc/exim.txt doc/markov.txt doc/postfix.txt doc/relay.txt doc/sendmail.txt %buildroot/%_docdir/%name-%version/doc/
%__subst s,/usr/var/dspam,/var/lib/%name, %buildroot%_sysconfdir/%name.conf
%files
%_bindir/*
%exclude %_bindir/css*
%exclude %_bindir/dspam_pg2int8
%config(noreplace) %_sysconfdir/%name.conf
%_initdir/%name
%_sysconfdir/cron.daily/%name-clean
%_man1dir/*
%dir %attr(0770,root,mail) /var/lib/%name
/var/lib/%name/txt/*
%doc %_docdir/%name-%version/*
%files -n lib%name
%_libdir/lib%name.so.*
%files -n lib%name-devel
%dir %_includedir/%name
%_includedir/%name/*
%_man3dir/*
%_libdir/lib%name.so
%_libdir/pkgconfig/%name.pc
%if_with hash
%files hash
%_bindir/css*
%_libdir/libhash_drv.so*
%_libdir/libhash_drv.so.*
%endif #with hash
%if_with sqlite
%files sqlite
%_libdir/libsqlite_drv.so
%_libdir/libsqlite_drv.so.*
%doc %attr(0644,root,root) src/tools.sqlite_drv/purge-2.sql doc/sqlite_drv.txt
%endif #with sqlite
%if_with sqlite3
%files sqlite3
%_libdir/libsqlite3_drv.so
%_libdir/libsqlite3_drv.so.*
%doc %attr(0644,root,root) src/tools.sqlite_drv/purge-3.sql doc/sqlite_drv.txt
%endif #with sqlite3
%if_with pgsql
%files pgsql
%_bindir/dspam_pg2int8
%_libdir/libpgsql_drv.so
%_libdir/libpgsql_drv.so.*
%doc %attr(0644,root,root) src/tools.pgsql_drv/*.sql doc/pgsql_drv.txt
%endif #with pgsql
%if_with mysql
%files mysql
%_libdir/libmysql_drv.so
%_libdir/libmysql_drv.so.*
%doc src/tools.mysql_drv/*.sql doc/mysql_drv.txt
%endif #with mysql
%changelog
…
Полный changelog можно просмотреть здесь