Sisyphus repository
Last update: 19 january 2018 | SRPMs: 18249 | Visits: 10804658
en ru br
ALT Linux repos
5.0: 1.1.6-alt2
4.1: 1.0.13-alt1
4.0: 1.0.3.hg20070801-alt1
3.0: 0.99.14-alt2

Other repositories

Group :: System/Servers
RPM: dovecot

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define _libexecdir /usr/libexec
%define _ssldir %(openssl-config --openssldir)
%define _unpackaged_files_terminate_build 1

%def_disable debug

Name: dovecot
Release: alt1
Summary: Dovecot secure IMAP/POP3 server
License: MIT
Group: System/Servers

Obsoletes: dovecot1.0
Obsoletes: dovecot1.2

Source0: %name-%version.tar.gz
Source1: dovecot.pam
Source2: dovecot.init
# XXX doesn't work for now
Source3: dovecot-auth.control

Patch1: fix-mail_plugin_dir-default.patch
Patch2: dovecot-2.0-defaultconfig.patch
#Patch3: dovecot-2.1-privatetmp.patch
Patch4: dovecot-2.1.4-postreleasefix.patch
Patch5: dovecot-2.2-systemd_firsttime.patch

PreReq: mailboxes-control

# TODO remove this when splitting into modules

%add_findreq_skiplist %_libexecdir/dovecot/

# Automatically added by buildreq on Tue Apr 24 2012

# optimized out: libcom_err-devel libkrb5-devel libpq-devel libstdc++-devel pkg-config
BuildRequires: bzlib-devel gcc-c++ libldap-devel libmysqlclient-devel libpam-devel libsasl2-devel libsqlite3-devel libssl-devel openssl postgresql-devel zlib-devel

Dovecot is an IMAP/POP3 server for Linux/UNIX-like systems, written with
security primarily in mind. Although it's written with C, it uses
several coding techniques to avoid most of the common pitfalls.

Dovecot can work with standard mbox and maildir formats and it's fully
compatible with UW-IMAP and Courier IMAP servers as well as mail clients
accessing the mailboxes directly.

%package -n %name-devel
Summary: Libraries and headers for Dovecot
Group: Development/Other

Requires: %name = %version-%release
Obsoletes: dovecot1.0-devel
Obsoletes: dovecot1.2-devel

%description -n %name-devel
Libraries and headers for Dovecot


%patch1 -p1
%patch2 -p1
#patch3 -p1
%patch4 -p1
%patch5 -p1

sed -i 's at /usr/local at /usr at g' src/plugins/fts/
sed -i 's at /usr/local at /usr at g' doc/example-config/conf.d/90-quota.conf

export ACLOCAL='aclocal -I .'
mkdir m4
%configure \
   --localstatedir=%_var                   \
   --with-moduledir=%_libdir/%name/modules \
   --with-systemdsystemunitdir=%_unitdir   \
   --disable-static                        \
   --with-ssl=openssl                      \
   --with-ssldir=%_ssldir                  \
   --with-pgsql                            \
   --with-mysql                            \
   --with-sqlite                           \
   --with-ldap                             \
   --with-gssapi                           \

# setup right ssl directory

sed -i 's|/etc/ssl|%_ssldir|' doc/ doc/example-config/conf.d/10-ssl.conf

cp %SOURCE4 src/lib


install -D -m 0600 %SOURCE1 %buildroot%_sysconfdir/pam.d/dovecot
install -D -m 0755 %SOURCE2 %buildroot%_initdir/%name

# generate ghost .pem files

touch empty
install -D -m600 empty %buildroot%_ssldir/certs/dovecot.pem
install -D -m600 empty %buildroot%_ssldir/private/dovecot.pem

mkdir -p %buildroot/var/run/dovecot/{login,empty}
chmod 755 %buildroot/var/run/dovecot
chmod 700 %buildroot/var/run/dovecot/login
mkdir -p %buildroot/var/cache/dovecot/indexes

# Install dovecot configuration and dovecot-openssl.cnf

mkdir -p %buildroot%_sysconfdir/dovecot/conf.d
install -Dp -m 644 doc/example-config/dovecot.conf %buildroot%_sysconfdir/dovecot
install -p -m 644 doc/example-config/conf.d/*.conf %buildroot%_sysconfdir/dovecot/conf.d
install -p -m 644 doc/example-config/conf.d/*.conf.ext %buildroot%_sysconfdir/dovecot/conf.d
install -Dp -m 644 doc/dovecot-openssl.cnf %buildroot%_ssldir/dovecot-openssl.cnf

install -Dp -m755 doc/ %buildroot%_libexecdir/%name/

mkdir -p %buildroot%_localstatedir/%name

# remove the libtool archives

find %buildroot%_libdir/%name/ -name '*.la' | xargs rm -f

# remove what we don't want

rm -f %buildroot%_sysconfdir/dovecot/README

# hi buildreq!

( cd %buildroot%_libdir; ln -s %name/lib*.so.* . )

%pre_control mailboxes
groupadd -r -f dovecot 2>/dev/null ||:
useradd -r -n -g dovecot -c 'Dovecot internal processes' \
-d %_var/run/%name -s /dev/null dovecot 2>/dev/null ||:
groupadd -r -f dovenull 2>/dev/null ||:
useradd -r -n -g dovenull -c 'Dovecot untrusted login processes' \
-d %_var/run/%name -s /dev/null dovenull 2>/dev/null ||:
%post_control -s private mailboxes
%post_service %name

# TODO postun old mailboxes access?

%dir %_datadir/dovecot

%dir %_cachedir/dovecot
%dir %_cachedir/dovecot/indexes
%dir %_runtimedir/dovecot
%dir %_runtimedir/dovecot/empty
%dir %_runtimedir/dovecot/login
%dir %_localstatedir/dovecot


%dir %_sysconfdir/dovecot
%dir %_sysconfdir/dovecot/conf.d
%config(noreplace) %_sysconfdir/dovecot/dovecot.conf
%config(noreplace) %_sysconfdir/dovecot/conf.d/*
%config(noreplace) %_sysconfdir/pam.d/dovecot
%config(noreplace) %_ssldir/dovecot-openssl.cnf
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %_ssldir/certs/dovecot.pem
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %_ssldir/private/dovecot.pem




# hi buildreq

%exclude %_libdir/dovecot/libdovecot*.so
%exclude %_libdir/dovecot/dovecot-config

%files -n %name-devel


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin