Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1584650
 поиск   регистрация   авторизация 
 
Группа :: Система/Серверы
Пакет: dbmail

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

%def_with pgsql74

Name: dbmail
Version: 2.0.7
Release: alt5.M24.1

Summary: DBMail is a POP3/IMAP server that enables email to be stored in and retrieved from a database
License: GPL
Group: System/Servers
Url: http://dbmail.org

PreReq: chkconfig

###########################################

# Relations with other POP3/IMAP server pkgs (like dbmail)

# Provide the abstract service names (which are virtual pkg names),

# specify their origin (our pkg name as the epoch + version-release):
Provides: IMAPD = %name:%version-%release
Provides: POP3D = %name:%version-%release

# Conflict with all other real pkgs which provide the same services

# (they should specify the origin the same way, so the epoch-version-release
# of the virtual pkgs POP3D & IMAPD will always differ from that of ours if
# they are provided by a different real pkg):
Conflicts: IMAPD < %name:%version-%release
Conflicts: IMAPD > %name:%version-%release
Conflicts: POP3D < %name:%version-%release
Conflicts: POP3D > %name:%version-%release

# End of the statements to describe relations with other POP3/IMAP server pkgs

########################################

%if_with pgsql81
BuildRequires: gcc-c++ gcc-g77 hostinfo libstdc++-devel postgresql8.1-devel zlib-devel
Requires: postgresql8.1
Provides: libauthdbmail.so.0, libpgsqldbmail.so.0, libsortdbmail.so.0
%define configure_with --with-pgsql
%endif

%if_with pgsql80
BuildRequires: gcc-c++ gcc-g77 hostinfo libstdc++-devel postgresql8.0-devel zlib-devel
Requires: postgresql8.0
Provides: libauthdbmail.so.0, libpgsqldbmail.so.0, libsortdbmail.so.0
%define configure_with --with-pgsql
%endif

%if_with pgsql74
BuildRequires: gcc-c++ gcc-g77 hostinfo libstdc++-devel postgresql-devel zlib-devel
Requires: postgresql
Provides: libauthdbmail.so.0, libpgsqldbmail.so.0, libsortdbmail.so.0
%define configure_with --with-pgsql
%endif

%if_with mysql40
BuildRequires: gcc-c++ gcc-g77 hostinfo libMySQL-devel libstdc++-devel zlib-devel
Requires: MySQL-client
Provides: libauthdbmail.so.0, libmysqldbmail.so.0, libsortdbmail.so.0
%define configure_with --with-mysql
%endif

Source0: %name-%version.tar.gz
Source1: %name-pop3d.init
Source2: %name-imapd.init
Source3: %name-lmtpd.init
Source4: %name-clean
Source5: %name.conf

# Add support for mail filtering

Patch0: %name-%version-mailfilter.patch
Patch1: %name-2.0.5_0.6-folders.patch

%description
DBMail is a POP3/IMAP server that enables email to be stored in and retrieved from a database.

%prep
%setup
%patch0 -p1
%patch1 -p1

%build
%configure %configure_with
%make_build

%install
# adjust $RPM_BUILD for install
%__mkdir_p %buildroot/%_sbindir
%__mkdir_p %buildroot/%_libdir
%__mkdir_p %buildroot/%_man1dir
%__mkdir_p %buildroot/%_man8dir
%__mkdir_p %buildroot/%_sysconfdir
%__mkdir_p %buildroot/%_sysconfdir/cron.daily
%__mkdir_p %buildroot/%_initdir
%__mkdir_p %buildroot/%_docdir/%name-%version

%__make DESTDIR=%buildroot install

# package cron, config and init scripts

%__install -m 0755 %SOURCE4 %buildroot/%_sysconfdir/cron.daily/
%__install -m 0644 %SOURCE5 %buildroot/%_sysconfdir/%name.conf
%__install -m 0755 %SOURCE1 %buildroot/%_initdir/%name-pop3d
%__install -m 0755 %SOURCE2 %buildroot/%_initdir/%name-imapd
%__install -m 0755 %SOURCE3 %buildroot/%_initdir/%name-lmtpd

# package docs

%__install -m 0644 AUTHORS %buildroot/%_docdir/%name-%version
%__install -m 0644 BUGS %buildroot/%_docdir/%name-%version
%__install -m 0644 COPYING %buildroot/%_docdir/%name-%version
%__install -m 0644 ChangeLog %buildroot/%_docdir/%name-%version
%__install -m 0644 EXTRAS %buildroot/%_docdir/%name-%version
%__install -m 0644 INSTALL %buildroot/%_docdir/%name-%version
%__install -m 0644 INSTALL.exim %buildroot/%_docdir/%name-%version
%__install -m 0644 INSTALL.postfix %buildroot/%_docdir/%name-%version
%__install -m 0644 INSTALL.qmail %buildroot/%_docdir/%name-%version
%__install -m 0644 NEWS %buildroot/%_docdir/%name-%version
%__install -m 0644 README %buildroot/%_docdir/%name-%version
%__install -m 0644 THANKS %buildroot/%_docdir/%name-%version
%__install -m 0644 TODO %buildroot/%_docdir/%name-%version
%__install -m 0644 UPGRADING %buildroot/%_docdir/%name-%version
%__install -m 0644 VERSION %buildroot/%_docdir/%name-%version

cp -r contrib %buildroot/%_docdir/%name-%version
cp -r sql %buildroot/%_docdir/%name-%version

%post
%post_service %name-pop3d
%post_service %name-imapd
%post_service %name-lmtpd

%preun
%preun_service %name-pop3d
%preun_service %name-imapd
%preun_service %name-lmtpd

%files
%_sysconfdir/cron.daily/*
%_initdir/*
%config(noreplace) %_sysconfdir/%name.conf
%_sbindir/*
%_man8dir/*
%_man1dir/*
%_libdir/*
%dir %_docdir/%name-%version
%doc %_docdir/%name-%version/*

%changelog

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

 
design & coding: Vladimir Lettiev aka crux © 2004-2005