LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File dovecot21.spec of Package dovecot21 (Project server:mail)

#
# spec file for package dovecot21
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           dovecot21
Version:        2.1.17
Release:        0
%define pkg_name dovecot
%define dovecot_version 2.1.17
%define dovecot_pigeonhole_version 0.3.6
%define dovecot_branch 2.1
%define dovecot_pigeonhole_source_dir %{pkg_name}-%{dovecot_branch}-pigeonhole-%{dovecot_pigeonhole_version}
%define dovecot_pigeonhole_docdir     %{_docdir}/%{pkg_name}/dovecot-pigeonhole
%define restart_flag /var/run/%{pkg_name}/%{pkg_name}-restart-after-rpm-install
%if 0%{?suse_version} > 1230
%bcond_without systemd
%else
%bcond_with    systemd
%endif
%bcond_without solr
%if 0%{?suse_version} >= 1110
%bcond_without clucene
%else
%bcond_with    clucene
%endif
%bcond_without sqlite
%if 0%{?suse_version} >= 1110
%bcond_without lzma
%else
%bcond_with    lzma
%endif
%bcond_with    lz4
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  libtool
%if %{with lzma}
BuildRequires:  xz-devel
%endif
%if %{with lz4}
BuildRequires:  lz4-devel
%endif
BuildRequires:  mysql-devel
BuildRequires:  openldap2-devel
BuildRequires:  pam-devel
BuildRequires:  pkgconfig
BuildRequires:  postgresql-devel
BuildRequires:  tcpd-devel
%if %{with sqlite}
BuildRequires:  sqlite-devel > 3
%endif
%if %{with clucene}
BuildRequires:  clucene-core-devel
BuildRequires:  gcc-c++
%endif
%if 0%{?sles_version} == 9
BuildRequires:  heimdal-devel
BuildRequires:  libcap
%else
BuildRequires:  krb5-devel
BuildRequires:  libcap-devel
%endif
%if 0%{?suse_version} > 1020
BuildRequires:  libbz2-devel
%endif
%if %{with solr}
BuildRequires:  curl-devel
BuildRequires:  libexpat-devel
%endif
%if %{with systemd}
BuildRequires:  pkgconfig(systemd)
%{?systemd_requires}
%define has_systemd 1
%endif
PreReq:         pwdutils %insserv_prereq %fillup_prereq
Requires:       dovecot
Conflicts:      otherproviders(dovecot-implementation)
Conflicts:      dovecot20 dovecot22
Provides:       dovecot-implementation = %{version}-%{release}
%if 0%{?suse_version} >= 1010
Recommends:     %{name}-backend-mysql = %{version}
Recommends:     %{name}-backend-pgsql = %{version}
%if %{with sqlite}
Recommends:     %{name}-backend-sqlite = %{version}
%endif
%endif
Url:            http://www.dovecot.org
Source:         http://www.dovecot.org/releases/%{dovecot_branch}/%{pkg_name}-%{version}.tar.gz
Source1:        http://pigeonhole.dovecot.org/releases/%{dovecot_branch}/%{dovecot_pigeonhole_source_dir}.tar.gz
Source2:        dovecot-rpmlintrc
Source3:        dovecot-2.0.configfiles
Source4:        dovecot-2.1.configfiles
Source5:        dovecot-2.2.configfiles
Source6:        dovecot-2.1-pigeonhole.configfiles
Source7:        dovecot-2.2-pigeonhole.configfiles
Summary:        IMAP and POP3 Server Written Primarily with Security in Mind
License:        BSD-3-Clause and LGPL-2.1+ and MIT
Group:          Productivity/Networking/Email/Servers

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

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

%package backend-mysql
Requires:       %{name} = %{version}
Provides:       dovecot-backend-mysql = %{version}-%{release}
Provides:       dovecot_sql_backend = %{version}-%{release}
Conflicts:      otherproviders(dovecot-backend-mysql)
Summary:        MySQL support for Dovecot
Group:          Productivity/Networking/Email/Servers

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

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

This package holds the files needed for MySQL support.

%package backend-pgsql
Requires:       %{name} = %{version}
Provides:       dovecot-backend-pgsql = %{version}-%{release}
Provides:       dovecot_sql_backend = %{version}-%{release}
Conflicts:      otherproviders(dovecot-backend-pgsql)
Summary:        PostgreSQL support for Dovecot
Group:          Productivity/Networking/Email/Servers

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

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

This package holds the files needed for PostgreSQL support.

%if %{with sqlite}

%package backend-sqlite
Requires:       %{name} = %{version}
Provides:       dovecot-backend-sqlite = %{version}-%{release}
Provides:       dovecot_sql_backend = %{version}-%{release}
Conflicts:      otherproviders(dovecot-backend-sqlite)
Summary:        SQLite support for Dovecot
Group:          Productivity/Networking/Email/Servers

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

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

This package holds the files needed for SQLite support.

%endif

%if %{with clucene}

%package fts-lucene
Requires:       %{name} = %{version}
Provides:       dovecot-fts-clucene = %{version}-%{release}
Provides:       dovecot_fts_backend = %{version}-%{release}
Conflicts:      otherproviders(dovecot-fts-clucene)
Summary:        Fulltext search support via CLucene
Group:          Productivity/Networking/Email/Servers

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

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

This package holds the files needed for fulltext search support via CLucene.

%endif

%if %{with solr}

%package fts-solr
Requires:       %{name} = %{version}
Provides:       dovecot-fts-solr = %{version}-%{release}
Provides:       dovecot_fts_backend = %{version}-%{release}
Conflicts:      otherproviders(dovecot-fts-solr)
Summary:        Fulltext search support via solr
Group:          Productivity/Networking/Email/Servers

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

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

This package holds the files needed for fulltext search support via solr.

%endif

%package devel
Requires:       %{name} = %{version}
Provides:       dovecot-devel = %{version}-%{release}
Conflicts:      otherproviders(dovecot-devel)
Summary:        Development files for Dovecot plugins
Group:          Development/Libraries/C and C++

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

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

This package holds the file needed to compile plugins outside of the
dovecot tree.

%prep
%setup -q -n %{pkg_name}-%{dovecot_version} -a 1
%{__gzip} -9v ChangeLog
# Disable ssl per default.
%{__sed} -i 's|#ssl = yes|ssl = no|' doc/example-config/conf.d/10-ssl.conf
# Also do not include non-existant key and cert files for SSL bnc#696919.
%{__sed} -i 's|^ssl_cert = |#ssl_cert = |' doc/example-config/conf.d/10-ssl.conf
%{__sed} -i 's|^ssl_key = |#ssl_key = |' doc/example-config/conf.d/10-ssl.conf
# Fix plugins dir.
%{__sed} -i 's|#mail_plugin_dir = /usr/lib/dovecot|mail_plugin_dir = %{_libdir}/dovecot/modules|' doc/example-config/conf.d/10-mail.conf
# TODO: why this ? # Disable IPv6 listening.
# %{__sed} -i 's|#listen = \*, ::|listen = *|' doc/example-config/dovecot.conf

%build
export CFLAGS="%{optflags}"
#{__aclocal} -I .
#{__autoheader}
#{__libtoolize} --force
#{__automake} --add-missing
#{__autoconf}
%if %{with clucene}
export CFLAGS="$CFLAGS -I%{_libdir}"
export CXXFLAGS="$CFLAGS -I%{_libdir}"
%endif
export CFLAGS="$CFLAGS -fpic -DPIC"
export LIBS="-pie"
%configure                                          \
    --docdir=%{_docdir}/%{pkg_name}                 \
    --with-moduledir=%{_libdir}/%{pkg_name}/modules \
    --libexecdir=%{_prefix}/lib/                    \
    --with-ioloop=best                              \
    --with-ldap=plugin                              \
    --with-sql=plugin                               \
    --with-gssapi=plugin                            \
    --with-pgsql                                    \
    --with-mysql                                    \
%if %{with sqlite}
    --with-sqlite                                   \
%endif
%if %{with clucene}
    --with-lucene                                   \
%endif
%if %{with solr}
    --with-solr                                     \
%endif
    --with-ssl=openssl                              \
    --with-zlib                                     \
    --with-bzlib                                    \
%if %{with lzma}
    --with-lzma                                     \
%endif
%if %{with lz4}
    --with-lz4                                      \
%endif
    --with-libcap                                   \
    --with-libwrap                                  \
    --with-docs                                     \
%if %{with systemd}
    --with-systemdsystemunitdir=%{_unitdir}         \
%endif
    --disable-static
make %{?_smp_mflags}

pushd %{dovecot_pigeonhole_source_dir}
    #./autogen.sh
    #%{__aclocal}
    #%{__autoheader}
    #%{__libtoolize} --force
    #%{__automake} --add-missing
    #%{__autoconf}
    %configure --with-dovecot=../ \
      --docdir="%{dovecot_pigeonhole_docdir}"
    make %{?_smp_mflags}
popd

%check
make -C %{dovecot_pigeonhole_source_dir} test

%install
%makeinstall
%makeinstall -C %{dovecot_pigeonhole_source_dir} sieve_docdir=%{dovecot_pigeonhole_docdir}

# clean up unused files, as much as I would like to use -delete ... the old find on sles9 doesnt support it
find %{buildroot}%{_libdir}/%{pkg_name}/ -type f -name \*.la -print0 | xargs -r0 rm -fv
find %{buildroot}%{_libdir}/%{pkg_name}/ -type f -name \*.a  -print0 | xargs -r0 rm -fv

# create /var directories
%{__install} -m 0755 -Dd \
  %{buildroot}%{_var}/run/%{pkg_name}/login/ \
  %{buildroot}%{_var}/lib/%{pkg_name}/

# install the script to create dummy selfsigned certs
%{__install} -m 0755 doc/mkcert.sh %{buildroot}%{_docdir}/%{pkg_name}
%{__install} -m 0644 doc/*.cnf     %{buildroot}%{_docdir}/%{pkg_name}

# additional docs for the main package
%{__install} -m 0644 \
       AUTHORS ChangeLog* COPYING* NEWS TODO README* \
%if %{with solr}
    doc/*.xml \
%endif
    %{buildroot}%{_docdir}/%{pkg_name}/

# install sieve docs
%{__install} -m 0755 -Dd %{buildroot}%{dovecot_pigeonhole_docdir}
pushd %{dovecot_pigeonhole_source_dir}
%__sed -i 's/\r$//' doc/rfc/*
cp -av AUTHORS COPYING* INSTALL NEWS README TODO \
       examples/ doc/rfc/ doc/devel \
  %{buildroot}%{dovecot_pigeonhole_docdir}/
  rm %{buildroot}%{dovecot_pigeonhole_docdir}/rfc/Makefile*
popd

for i in $RPM_SOURCE_DIR/*.configfiles ; do
  echo "Creating ghost files for '$i'"
  for j in $(<$i) ; do
    install -D -m 0644 /dev/null %{buildroot}$j
  done
done

# clean up of things that are now in the unversioned package.
%if %{with systemd}
rm %{buildroot}%{_unitdir}/dovecot.{service,socket}
%endif
rm %{buildroot}%{_sysconfdir}/%{pkg_name}/README

%pre
test -n "$FIRST_ARG" || FIRST_ARG=$1
/usr/sbin/groupadd -r %{pkg_name} &>/dev/null || :
/usr/sbin/useradd -g %{pkg_name} -s /bin/false -r -c "User for Dovecot imapd" -d %{_var}/run/%{pkg_name} %{pkg_name} &>/dev/null || :
/usr/sbin/useradd -g %{pkg_name} -s /bin/false -r -c "User for Dovecot login" -d %{_var}/run/%{pkg_name} dovenull &>/dev/null || :
# do not let dovecot run during upgrade rhbz#134325
if [ "$FIRST_ARG" -ge "1" ]; then
  rm -f %restart_flag
  %if %{with systemd}
    # we get installed before the unversioned dovecot package is installed
    # in that case we dont need to restart as there was no file to start us before
    if [ -x /bin/systemctl -a -e %{_unitdir}/%{pkg_name}.service ] ; then
      /bin/systemctl is-active %{pkg_name}.service >/dev/null 2>&1 && touch %restart_flag ||:
      /bin/systemctl stop      %{pkg_name}.service >/dev/null 2>&1
    fi
  %else
    # we get installed before the unversioned dovecot package is installed
    # in that case we dont need to restart as there was no file to start us before
    if [ -x /etc/init.d/%{pkg_name} ] ; then
      /etc/init.d/%{pkg_name} status >/dev/null 2>&1 && touch %restart_flag ||:
      /etc/init.d/%{pkg_name} stop >/dev/null 2>&1
    fi
  %endif
fi

%post
/sbin/ldconfig

%postun
test -n "$FIRST_ARG" || FIRST_ARG=$1
/sbin/ldconfig
# do not let dovecot run during upgrade rhbz#134325
if [ "$FIRST_ARG" -ge "1" -a -e %restart_flag ]; then
  %if %{with systemd}
    # we get installed before the unversioned dovecot package is installed
    # in that case we dont need to restart as there was no file to start us before
    if [ -x /bin/systemctl -a -e %{_unitdir}/%{pkg_name}.service ] ; then
      /bin/systemctl start %{pkg_name}.service >/dev/null 2>&1 || :
    fi
  %else
    # we get installed before the unversioned dovecot package is installed
    # in that case we dont need to restart as there was no file to start us before
    if [ -x /etc/init.d/%{pkg_name} ] ; then
      /etc/init.d/%{pkg_name} start >/dev/null 2>&1 || :
    fi
  %endif
  rm -f %restart_flag
fi

# do not let dovecot run during upgrade rhbz#134325
# dovecot should be started again in %%postun, but it's not executed on reinstall
# if it was already started, restart_flag won't be here, so it's ok to test it again
%posttrans
if [ -e %restart_flag ]; then
  %if %{with systemd}
    # we get installed before the unversioned dovecot package is installed
    # in that case we dont need to restart as there was no file to start us before
    if [ -x /bin/systemctl -a -e %{_unitdir}/%{pkg_name}.service ] ; then
      /bin/systemctl start %{pkg_name}.service >/dev/null 2>&1 || :
    fi
  %else
    # we get installed before the unversioned dovecot package is installed
    # in that case we dont need to restart as there was no file to start us before
    if [ -x /etc/init.d/%{pkg_name} ] ; then
      /etc/init.d/%{pkg_name} start >/dev/null 2>&1 || :
    fi
  %endif
  rm -f %restart_flag
fi

%files
%defattr(-,root,root)
%dir %{_sysconfdir}/%{pkg_name}/
%ghost %config(noreplace) /etc/dovecot/*
%{_sbindir}/%{pkg_name}
%{_bindir}/doveadm
%{_bindir}/doveconf
%{_bindir}/dsync
%{_bindir}/sieve-test
%{_bindir}/sievec
%{_bindir}/sieve-dump
# subprocesses
%dir %{_prefix}/lib/%{pkg_name}
%{_prefix}/lib/%{pkg_name}/aggregator
%{_prefix}/lib/%{pkg_name}/anvil
%{_prefix}/lib/%{pkg_name}/auth
%{_prefix}/lib/%{pkg_name}/checkpassword-reply
%{_prefix}/lib/%{pkg_name}/config
%{_prefix}/lib/%{pkg_name}/decode2text.sh
%{_prefix}/lib/%{pkg_name}/deliver
%{_prefix}/lib/%{pkg_name}/dict
%{_prefix}/lib/%{pkg_name}/director
%{_prefix}/lib/%{pkg_name}/dns-client
%{_prefix}/lib/%{pkg_name}/doveadm-server
%{_prefix}/lib/%{pkg_name}/dovecot-lda
%{_prefix}/lib/%{pkg_name}/gdbhelper
%{_prefix}/lib/%{pkg_name}/imap
%{_prefix}/lib/%{pkg_name}/imap-login
%{_prefix}/lib/%{pkg_name}/indexer
%{_prefix}/lib/%{pkg_name}/indexer-worker
%{_prefix}/lib/%{pkg_name}/ipc
%{_prefix}/lib/%{pkg_name}/lmtp
%{_prefix}/lib/%{pkg_name}/log
%{_prefix}/lib/%{pkg_name}/maildirlock
%{_prefix}/lib/%{pkg_name}/managesieve
%{_prefix}/lib/%{pkg_name}/managesieve-login
%{_prefix}/lib/%{pkg_name}/pop3
%{_prefix}/lib/%{pkg_name}/pop3-login
%{_prefix}/lib/%{pkg_name}/quota-status
%{_prefix}/lib/%{pkg_name}/rawlog
%{_prefix}/lib/%{pkg_name}/replicator
%{_prefix}/lib/%{pkg_name}/script
%{_prefix}/lib/%{pkg_name}/script-login
%{_prefix}/lib/%{pkg_name}/ssl-params
%{_prefix}/lib/%{pkg_name}/stats
%{_prefix}/lib/%{pkg_name}/tcpwrap
%{_prefix}/lib/%{pkg_name}/xml2text
%{_libdir}/%{pkg_name}/libdovecot.so.*
%{_libdir}/%{pkg_name}/libdovecot-lda.so.*
%{_libdir}/%{pkg_name}/libdovecot-login.so.*
%{_libdir}/%{pkg_name}/libdovecot-sieve.so.*
%{_libdir}/%{pkg_name}/libdovecot-sql.so.*
%{_libdir}/%{pkg_name}/libdovecot-ssl.so*
%{_libdir}/%{pkg_name}/libdovecot-storage.so.*
# plugins
%dir %{_libdir}/%{pkg_name}
%dir %{_libdir}/%{pkg_name}/modules/
%{_libdir}/%{pkg_name}/modules/lib01_acl_plugin.so
%{_libdir}/%{pkg_name}/modules/lib02_lazy_expunge_plugin.so
%{_libdir}/%{pkg_name}/modules/lib05_pop3_migration_plugin.so
%{_libdir}/%{pkg_name}/modules/lib05_snarf_plugin.so
%{_libdir}/%{pkg_name}/modules/lib10_quota_plugin.so
%{_libdir}/%{pkg_name}/modules/lib11_trash_plugin.so
%{_libdir}/%{pkg_name}/modules/lib15_notify_plugin.so
%{_libdir}/%{pkg_name}/modules/lib20_mail_log_plugin.so
%{_libdir}/%{pkg_name}/modules/lib20_mailbox_alias_plugin.so
%{_libdir}/%{pkg_name}/modules/lib20_expire_plugin.so
%{_libdir}/%{pkg_name}/modules/lib20_fts_plugin.so
%{_libdir}/%{pkg_name}/modules/lib20_zlib_plugin.so
%{_libdir}/%{pkg_name}/modules/lib20_autocreate_plugin.so
%{_libdir}/%{pkg_name}/modules/lib20_listescape_plugin.so
%{_libdir}/%{pkg_name}/modules/lib20_replication_plugin.so
%{_libdir}/%{pkg_name}/modules/lib20_virtual_plugin.so
%{_libdir}/%{pkg_name}/modules/lib21_fts_squat_plugin.so
%{_libdir}/%{pkg_name}/modules/lib30_imap_zlib_plugin.so
%{_libdir}/%{pkg_name}/modules/lib02_imap_acl_plugin.so
%{_libdir}/%{pkg_name}/modules/lib11_imap_quota_plugin.so
%{_libdir}/%{pkg_name}/modules/lib90_sieve_plugin.so
%{_libdir}/%{pkg_name}/modules/lib90_stats_plugin.so
%{_libdir}/%{pkg_name}/modules/lib95_imap_stats_plugin.so
%dir %{_libdir}/%{pkg_name}/modules/doveadm
%{_libdir}/%{pkg_name}/modules/doveadm/lib10_doveadm_acl_plugin.so
%{_libdir}/%{pkg_name}/modules/doveadm/lib10_doveadm_expire_plugin.so
%{_libdir}/%{pkg_name}/modules/doveadm/lib10_doveadm_quota_plugin.so*
%{_libdir}/%{pkg_name}/modules/doveadm/lib10_doveadm_zlib_plugin.so
%{_libdir}/%{pkg_name}/modules/doveadm/lib20_doveadm_fts_plugin.so
%dir %{_libdir}/%{pkg_name}/modules/auth/
%dir %{_libdir}/%{pkg_name}/modules/dict/
%{_libdir}/%{pkg_name}/modules/auth/libauthdb_imap.so
%{_libdir}/%{pkg_name}/modules/auth/libauthdb_ldap.so
%{_libdir}/%{pkg_name}/modules/auth/libmech_gssapi.so
%dir %{_libdir}/%{pkg_name}/modules/settings/
%{_libdir}/%{pkg_name}/modules/settings/libmanagesieve_login_settings.so
%{_libdir}/%{pkg_name}/modules/settings/libmanagesieve_settings.so
# doc
%{_mandir}/man1/deliver.1*
%{_mandir}/man1/doveadm*.1*
%{_mandir}/man1/doveconf.1*
%{_mandir}/man1/dovecot*.1*
%{_mandir}/man1/dsync.1*
%{_mandir}/man7/doveadm*.7*
%{_mandir}/man1/sieve-test.1*
%{_mandir}/man1/sieve-dump.1*
%{_mandir}/man1/sievec.1*
%{_mandir}/man1/sieved.1*
%{_mandir}/man7/pigeonhole.7*
%doc %{_docdir}/%{pkg_name}
%if %{with solr}
%exclude %{_docdir}/%{pkg_name}/solr-schema.xml
%endif
# setting up permissions
%if ! %{with systemd}
%dir %attr(0755,root,root)        %ghost %{_var}/run/%{pkg_name}/
%dir %attr(0750,root,%{pkg_name}) %ghost %{_var}/run/%{pkg_name}/login/
%endif
%dir %attr(0750,root,root)        %{_var}/lib/%{pkg_name}/
%{_bindir}/sieve-filter
%{_mandir}/man1/sieve-filter.1*

%files backend-mysql
%defattr(-,root,root,-)
%{_libdir}/%{pkg_name}/modules/libdriver_mysql.so
%{_libdir}/%{pkg_name}/modules/auth/libdriver_mysql.so
%{_libdir}/%{pkg_name}/modules/dict/libdriver_mysql.so

%files backend-pgsql
%defattr(-,root,root,-)
%{_libdir}/%{pkg_name}/modules/libdriver_pgsql.so
%{_libdir}/%{pkg_name}/modules/auth/libdriver_pgsql.so
%{_libdir}/%{pkg_name}/modules/dict/libdriver_pgsql.so

%if %{with sqlite}
%files backend-sqlite
%defattr(-,root,root,-)
%{_libdir}/%{pkg_name}/modules/libdriver_sqlite.so
%{_libdir}/%{pkg_name}/modules/auth/libdriver_sqlite.so
%{_libdir}/%{pkg_name}/modules/dict/libdriver_sqlite.so
%endif

%if %{with clucene}
%files fts-lucene
%defattr(-,root,root,-)
%{_libdir}/%{pkg_name}/modules/lib21_fts_lucene_plugin.so
%{_libdir}/%{pkg_name}/modules/doveadm/lib20_doveadm_fts_lucene_plugin.so
%endif

%if %{with solr}
%files fts-solr
%defattr(-,root,root,-)
%{_libdir}/%{pkg_name}/modules/lib21_fts_solr_plugin.so
%{_docdir}/%{pkg_name}/solr-schema.xml
%endif

%files devel
%defattr(-,root,root,-)
%{_datadir}/aclocal/%{pkg_name}.m4
%{_includedir}/%{pkg_name}/
%{_libdir}/%{pkg_name}/dovecot-config
%{_libdir}/%{pkg_name}/libdovecot.so
%{_libdir}/%{pkg_name}/libdovecot-lda.so
%{_libdir}/%{pkg_name}/libdovecot-login.so
%{_libdir}/%{pkg_name}/libdovecot-sieve.so
%{_libdir}/%{pkg_name}/libdovecot-sql.so
%{_libdir}/%{pkg_name}/libdovecot-storage.so

%changelog