Репозитории ALT
S: | 2.3.21-alt1 |
D: | 1.1-alt0.hg20070530 |
5.1: | 1.2.4-alt5 |
4.1: | 1.0.13-alt1 |
4.0: | 1.0.3.hg20070801-alt1 |
+updates: | 1.0.3.hg20070801-alt1 |
3.0: | 0.99.14-alt2 |
Другие репозитории
Upstream: | 1.0.13 |
Группа :: Система/Серверы
Пакет: dovecot
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
%define _ssldir %(openssl-config --openssldir)
%define _unpackaged_files_terminate_build 1
%define oname dovecot
%def_disable debug
Name: dovecot
Version: 1.2.4
Release: alt5
Summary: Dovecot secure IMAP/POP3 server
License: GPL
Group: System/Servers
Url: http://dovecot.org/
Packager: Maxim Ivanov <redbaron at altlinux.org>
PreReq: openssl >= 0.9.6g-alt2
Requires(pre): cert-sh-functions shadow-utils
Requires(post,preun): service
Conflicts: dovecot1.0
Obsoletes: dovecot1.2
Source0: %name-%version.tar
Source2: %oname.init
Source3: dovecot.pam
Source4: %oname-auth.control
Source5: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
BuildRequires: gcc-c++ libldap-devel libMySQL-devel libpam-devel
BuildRequires: libsqlite3-devel openssl postgresql-devel zlib-devel
BuildRequires: libkrb5-devel
%description
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
Conflicts: dovecot1.0-devel
Obsoletes: dovecot1.2-devel
%description -n %name-devel
Headers and static libraries for Dovecot
%package -n %name-libsieve
Summary: Sieve plugin for dovecot by Stephan Bosch <stephan at rename-it dot nl>
Group: System/Servers
Conflicts: dovecot1.0-sieve
Obsoletes: dovecot1.2-libsieve
%description -n %name-libsieve
Sieve is a machine language specifically tailored for internet message
filtering. This package compiles into a Sieve plugin for the Dovecot local
delivery agent called Deliver. The plugin adds Sieve filtering support to the
delivery process.
%package -n %name-managesieve
Summary: MANAGESIEVE implementation for Dovecot (1.2) by Stephan Bosch
Group: System/Servers
Obsoletes: dovecot1.2-managesieve
%description -n %name-managesieve
The daemon currently implements all existing MANAGESIEVE commands except the
HAVESPACE command which always says 'ok'. It also implements the required
support for UTF-8 strings.
%define _libexecdir /usr/libexec
%prep
%setup
%build
cd %oname
%__cp %SOURCE5 src/lib/
%autoreconf
%configure \
--localstatedir=%_var \
--with-moduledir=%_libdir/%name/modules \
--sysconfdir=%_sysconfdir/%name \
--enable-ipv6 \
--enable-header-install \
--with-ssl=openssl \
--with-pop3d \
--with-pgsql \
--with-mysql \
--with-sqlite \
--with-ldap \
--with-gssapi \
--with-deliver
%make_build
cd ../%oname-sieve
%autoreconf
%configure --with-dovecot=../%oname
%make_build
cd ../%oname-managesieve
%autoreconf
%configure --with-dovecot=../%oname --with-dovecot-sieve=../%oname-sieve
%make_build
%install
cd %oname
%make_install DESTDIR=%buildroot install
## Cleanup
%__mkdir_p -m 0755 %buildroot%_sysconfdir/pam.d
%__mkdir_p -m 0755 %buildroot%_initdir
%__mkdir_p -m 0755 %buildroot%_sysconfdir/%name
#%__mkdir_p -m 0755 %buildroot%_datadir/%name
%__mkdir_p -m 0755 %buildroot%_docdir/%name-%version
%__mkdir_p -m 0755 %buildroot%_ssldir/{certs,private}
# Base directory
%__mkdir_p -m 0700 %buildroot%_var/run/%oname
# Chroot for imap-login
%__mkdir_p -m 0750 %buildroot%_var/run/%oname/login
# Init script
subst 's, at name at ,%name,g' %SOURCE2
subst 's, at version at ,%version,g' %SOURCE2
%__install -m 0755 %SOURCE2 %buildroot%_initdir/%name
# PAM config
%__install -m 0600 %SOURCE3 %buildroot%_sysconfdir/pam.d/dovecot
# Default config
#TODO: separate sockets paths
%__mv -f %buildroot%_sysconfdir/%name/dovecot{-example,}.conf
# OpenSSL stuff
# Need more working on it.
%__mv doc/dovecot-openssl.cnf %buildroot%_sysconfdir/%name
# Ghosts. How to include it in package and remove on
# package remove without checking of size mismatch?
touch %buildroot%_ssldir/certs/%oname.pem
touch %buildroot%_ssldir/private/%oname.pem
touch %buildroot%_var/run/%oname/ssl-parameters.dat
# devel files
%__mkdir -p %buildroot%_libdir/%name/modules/{lib,lib-mail,lib-storage}
%__mkdir -p %buildroot%_libdir/%name/{lib,lib-mail,lib-imap,lib-charset}
%__install -p -m644 dovecot-config %buildroot%_includedir/%oname
for folder in deliver lib lib-mail lib-storage
do
if [ -d %buildroot%_libdir/%name/modules/$folder/ ]; then
%__install -p -m644 src/$folder/*.a %buildroot%{_libdir}/%name/modules/$folder/
fi
done
for folder in lib lib-mail lib-imap lib-charset
do
if [ -d %buildroot%_libdir/%name/$folder/ ]; then
%__install -p -m644 src/$folder/*.a %buildroot%_libdir/%name/$folder/
fi
done
#control file
subst 's, at name at ,%name,g' %SOURCE4
subst 's, at version at ,%version,g' %SOURCE4
%__install -pD -m755 %SOURCE4 %buildroot%_controldir/%name-auth
#docs installed
%__mv %buildroot%_docdir/dovecot/* %buildroot%_docdir/%name-%version/
#compatibility symlink
#ln -s %name %buildroot%_libexecdir/dovecot
cd ../%oname-sieve
%make_install DESTDIR=%buildroot install
cd ../%oname-managesieve
%make_install DESTDIR=%buildroot install
cd ..
# Done
#disable strip on debug
%if_enabled debug
%add_strip_skiplist %_bindir/*
%add_strip_skiplist %_libexecdir/%name/*
%add_strip_skiplist %_libdir/%name/*
%add_strip_skiplist %_libdir/%name/modules/*
%add_strip_skiplist %_libdir/%name/modules/lda/*
%add_strip_skiplist %_libdir/%name/modules/pop3/*
%add_strip_skiplist %_libdir/%name/modules/imap/*
%add_strip_skiplist %_libdir/%name/modules/auth/*
%endif
%pre
%_sbindir/groupadd -r -f dovecot 2>/dev/null ||:
%_sbindir/useradd -r -n -g dovecot -d %_var/run/%oname \
-s /dev/null -c 'Dovecot secure IMAP server' dovecot 2>/dev/null ||:
%pre_control %name-auth
%post
%post_control %name-auth -s none
%post_service %name
%preun
%preun_service %name
%triggerun -- dovecot1.2
if [ $2 -eq 0 ]; then
#dovecot1.2 is replaced with current version
echo " ================= Dovecot 1.2 upgrade notice ==================="
echo " Old dovecot1.2 package is obsoleted by new \`dovecot\` package"
echo " libexec binaries ( i.e. \`deliver\` )are moved to new location:"
echo " %_libexecdir/dovecot1.2 => %_libexecdir/dovecot"
echo ""
echo "Please move your configuration files to new location manually:"
echo " %_sysconfdir/dovecot1.2 => %_sysconfdir/dovecot"
echo ""
echo "================================================================="
fi
%triggerun -- dovecot < 1.2
if [ $2 -gt 0 ]; then
#upgrade of dovecot, old one was 1.1 version
echo " Please read Dovecot 1.2 upgrade guide: %_docdir/wiki/Upgrading.1.2.txt"
fi
%files
%_controldir/%name-auth
%config(noreplace) %_sysconfdir/%name/dovecot.conf
%config(noreplace) %_sysconfdir/%name/dovecot-openssl.cnf
%config(noreplace) %_sysconfdir/pam.d/dovecot
%config %_sysconfdir/%name/dovecot-ldap-example.conf
%config %_sysconfdir/%name/dovecot-sql-example.conf
%config %_sysconfdir/%name/dovecot-dict-sql-example.conf
%config %_sysconfdir/%name/dovecot-db-example.conf
%config %_initdir/%name
%dir %attr(0755,root,root) %_var/run/%oname
%dir %attr(0750,root,dovecot) %_var/run/%oname/login
%dir %_sysconfdir/%name
%_libexecdir/%name
%exclude %_libexecdir/%name/managesieve*
%_libdir/%name
%exclude %_libdir/%name/modules/lda/*.la
%exclude %_libdir/%name/modules/lda/*.a
%exclude %_libdir/%name/modules/imap/*.la
%exclude %_libdir/%name/modules/imap/*.a
%exclude %_libdir/%name/modules/*.la
%exclude %_libdir/%name/modules/*.a
%exclude %_libdir/%name/dovecot-config
%exclude %_libdir/%name/lib*
%exclude %_libdir/%name/modules/lib
%exclude %_libdir/%name/modules/lib-*
%exclude %_libdir/%name/modules/lib/*
%_sbindir/*
%_bindir/sievec
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %_var/run/%oname/ssl-parameters.dat
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %_ssldir/certs/%oname.pem
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %_ssldir/private/%oname.pem
%doc %oname/COPYING* %oname/{TODO,README,NEWS,ChangeLog,AUTHORS,INSTALL}
%doc %oname/doc/*.txt
%doc %oname/doc/wiki
%files -n %name-devel
%dir %_libdir/%name
%dir %_libdir/%name/*
%dir %_libdir/%name/modules/lib
%dir %_libdir/%name/modules/imap
%dir %_libdir/%name/modules/lib-mail
%dir %_libdir/%name/modules/lib-storage
%_libdir/%name/dovecot-config
%_libdir/%name/modules/*.a
%_libdir/%name/modules/*.la
%_libdir/%name/modules/*/*.a
%_libdir/%name/modules/*/*.la
%exclude %_libdir/%name/modules/lda/lib90*.a
%exclude %_libdir/%name/modules/lda/lib90*.la
%_libdir/%name/lib*/*.a
%_includedir/%oname
%files -n %name-libsieve
%_bindir/sieve-test
%_bindir/sieved
%_libdir/%name/modules/lda/lib90_sieve_plugin.a
%_libdir/%name/modules/lda/lib90_sieve_plugin.la
%doc %_man1dir/*
%files -n %name-managesieve
%_libexecdir/%name/managesieve
%_libexecdir/%name/managesieve-login
%changelog
…
Полный changelog можно просмотреть здесь
%define _unpackaged_files_terminate_build 1
%define oname dovecot
%def_disable debug
Name: dovecot
Version: 1.2.4
Release: alt5
Summary: Dovecot secure IMAP/POP3 server
License: GPL
Group: System/Servers
Url: http://dovecot.org/
Packager: Maxim Ivanov <redbaron at altlinux.org>
PreReq: openssl >= 0.9.6g-alt2
Requires(pre): cert-sh-functions shadow-utils
Requires(post,preun): service
Conflicts: dovecot1.0
Obsoletes: dovecot1.2
Source0: %name-%version.tar
Source2: %oname.init
Source3: dovecot.pam
Source4: %oname-auth.control
Source5: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
BuildRequires: gcc-c++ libldap-devel libMySQL-devel libpam-devel
BuildRequires: libsqlite3-devel openssl postgresql-devel zlib-devel
BuildRequires: libkrb5-devel
%description
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
Conflicts: dovecot1.0-devel
Obsoletes: dovecot1.2-devel
%description -n %name-devel
Headers and static libraries for Dovecot
%package -n %name-libsieve
Summary: Sieve plugin for dovecot by Stephan Bosch <stephan at rename-it dot nl>
Group: System/Servers
Conflicts: dovecot1.0-sieve
Obsoletes: dovecot1.2-libsieve
%description -n %name-libsieve
Sieve is a machine language specifically tailored for internet message
filtering. This package compiles into a Sieve plugin for the Dovecot local
delivery agent called Deliver. The plugin adds Sieve filtering support to the
delivery process.
%package -n %name-managesieve
Summary: MANAGESIEVE implementation for Dovecot (1.2) by Stephan Bosch
Group: System/Servers
Obsoletes: dovecot1.2-managesieve
%description -n %name-managesieve
The daemon currently implements all existing MANAGESIEVE commands except the
HAVESPACE command which always says 'ok'. It also implements the required
support for UTF-8 strings.
%define _libexecdir /usr/libexec
%prep
%setup
%build
cd %oname
%__cp %SOURCE5 src/lib/
%autoreconf
%configure \
--localstatedir=%_var \
--with-moduledir=%_libdir/%name/modules \
--sysconfdir=%_sysconfdir/%name \
--enable-ipv6 \
--enable-header-install \
--with-ssl=openssl \
--with-pop3d \
--with-pgsql \
--with-mysql \
--with-sqlite \
--with-ldap \
--with-gssapi \
--with-deliver
%make_build
cd ../%oname-sieve
%autoreconf
%configure --with-dovecot=../%oname
%make_build
cd ../%oname-managesieve
%autoreconf
%configure --with-dovecot=../%oname --with-dovecot-sieve=../%oname-sieve
%make_build
%install
cd %oname
%make_install DESTDIR=%buildroot install
## Cleanup
%__mkdir_p -m 0755 %buildroot%_sysconfdir/pam.d
%__mkdir_p -m 0755 %buildroot%_initdir
%__mkdir_p -m 0755 %buildroot%_sysconfdir/%name
#%__mkdir_p -m 0755 %buildroot%_datadir/%name
%__mkdir_p -m 0755 %buildroot%_docdir/%name-%version
%__mkdir_p -m 0755 %buildroot%_ssldir/{certs,private}
# Base directory
%__mkdir_p -m 0700 %buildroot%_var/run/%oname
# Chroot for imap-login
%__mkdir_p -m 0750 %buildroot%_var/run/%oname/login
# Init script
subst 's, at name at ,%name,g' %SOURCE2
subst 's, at version at ,%version,g' %SOURCE2
%__install -m 0755 %SOURCE2 %buildroot%_initdir/%name
# PAM config
%__install -m 0600 %SOURCE3 %buildroot%_sysconfdir/pam.d/dovecot
# Default config
#TODO: separate sockets paths
%__mv -f %buildroot%_sysconfdir/%name/dovecot{-example,}.conf
# OpenSSL stuff
# Need more working on it.
%__mv doc/dovecot-openssl.cnf %buildroot%_sysconfdir/%name
# Ghosts. How to include it in package and remove on
# package remove without checking of size mismatch?
touch %buildroot%_ssldir/certs/%oname.pem
touch %buildroot%_ssldir/private/%oname.pem
touch %buildroot%_var/run/%oname/ssl-parameters.dat
# devel files
%__mkdir -p %buildroot%_libdir/%name/modules/{lib,lib-mail,lib-storage}
%__mkdir -p %buildroot%_libdir/%name/{lib,lib-mail,lib-imap,lib-charset}
%__install -p -m644 dovecot-config %buildroot%_includedir/%oname
for folder in deliver lib lib-mail lib-storage
do
if [ -d %buildroot%_libdir/%name/modules/$folder/ ]; then
%__install -p -m644 src/$folder/*.a %buildroot%{_libdir}/%name/modules/$folder/
fi
done
for folder in lib lib-mail lib-imap lib-charset
do
if [ -d %buildroot%_libdir/%name/$folder/ ]; then
%__install -p -m644 src/$folder/*.a %buildroot%_libdir/%name/$folder/
fi
done
#control file
subst 's, at name at ,%name,g' %SOURCE4
subst 's, at version at ,%version,g' %SOURCE4
%__install -pD -m755 %SOURCE4 %buildroot%_controldir/%name-auth
#docs installed
%__mv %buildroot%_docdir/dovecot/* %buildroot%_docdir/%name-%version/
#compatibility symlink
#ln -s %name %buildroot%_libexecdir/dovecot
cd ../%oname-sieve
%make_install DESTDIR=%buildroot install
cd ../%oname-managesieve
%make_install DESTDIR=%buildroot install
cd ..
# Done
#disable strip on debug
%if_enabled debug
%add_strip_skiplist %_bindir/*
%add_strip_skiplist %_libexecdir/%name/*
%add_strip_skiplist %_libdir/%name/*
%add_strip_skiplist %_libdir/%name/modules/*
%add_strip_skiplist %_libdir/%name/modules/lda/*
%add_strip_skiplist %_libdir/%name/modules/pop3/*
%add_strip_skiplist %_libdir/%name/modules/imap/*
%add_strip_skiplist %_libdir/%name/modules/auth/*
%endif
%pre
%_sbindir/groupadd -r -f dovecot 2>/dev/null ||:
%_sbindir/useradd -r -n -g dovecot -d %_var/run/%oname \
-s /dev/null -c 'Dovecot secure IMAP server' dovecot 2>/dev/null ||:
%pre_control %name-auth
%post
%post_control %name-auth -s none
%post_service %name
%preun
%preun_service %name
%triggerun -- dovecot1.2
if [ $2 -eq 0 ]; then
#dovecot1.2 is replaced with current version
echo " ================= Dovecot 1.2 upgrade notice ==================="
echo " Old dovecot1.2 package is obsoleted by new \`dovecot\` package"
echo " libexec binaries ( i.e. \`deliver\` )are moved to new location:"
echo " %_libexecdir/dovecot1.2 => %_libexecdir/dovecot"
echo ""
echo "Please move your configuration files to new location manually:"
echo " %_sysconfdir/dovecot1.2 => %_sysconfdir/dovecot"
echo ""
echo "================================================================="
fi
%triggerun -- dovecot < 1.2
if [ $2 -gt 0 ]; then
#upgrade of dovecot, old one was 1.1 version
echo " Please read Dovecot 1.2 upgrade guide: %_docdir/wiki/Upgrading.1.2.txt"
fi
%files
%_controldir/%name-auth
%config(noreplace) %_sysconfdir/%name/dovecot.conf
%config(noreplace) %_sysconfdir/%name/dovecot-openssl.cnf
%config(noreplace) %_sysconfdir/pam.d/dovecot
%config %_sysconfdir/%name/dovecot-ldap-example.conf
%config %_sysconfdir/%name/dovecot-sql-example.conf
%config %_sysconfdir/%name/dovecot-dict-sql-example.conf
%config %_sysconfdir/%name/dovecot-db-example.conf
%config %_initdir/%name
%dir %attr(0755,root,root) %_var/run/%oname
%dir %attr(0750,root,dovecot) %_var/run/%oname/login
%dir %_sysconfdir/%name
%_libexecdir/%name
%exclude %_libexecdir/%name/managesieve*
%_libdir/%name
%exclude %_libdir/%name/modules/lda/*.la
%exclude %_libdir/%name/modules/lda/*.a
%exclude %_libdir/%name/modules/imap/*.la
%exclude %_libdir/%name/modules/imap/*.a
%exclude %_libdir/%name/modules/*.la
%exclude %_libdir/%name/modules/*.a
%exclude %_libdir/%name/dovecot-config
%exclude %_libdir/%name/lib*
%exclude %_libdir/%name/modules/lib
%exclude %_libdir/%name/modules/lib-*
%exclude %_libdir/%name/modules/lib/*
%_sbindir/*
%_bindir/sievec
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %_var/run/%oname/ssl-parameters.dat
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %_ssldir/certs/%oname.pem
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %_ssldir/private/%oname.pem
%doc %oname/COPYING* %oname/{TODO,README,NEWS,ChangeLog,AUTHORS,INSTALL}
%doc %oname/doc/*.txt
%doc %oname/doc/wiki
%files -n %name-devel
%dir %_libdir/%name
%dir %_libdir/%name/*
%dir %_libdir/%name/modules/lib
%dir %_libdir/%name/modules/imap
%dir %_libdir/%name/modules/lib-mail
%dir %_libdir/%name/modules/lib-storage
%_libdir/%name/dovecot-config
%_libdir/%name/modules/*.a
%_libdir/%name/modules/*.la
%_libdir/%name/modules/*/*.a
%_libdir/%name/modules/*/*.la
%exclude %_libdir/%name/modules/lda/lib90*.a
%exclude %_libdir/%name/modules/lda/lib90*.la
%_libdir/%name/lib*/*.a
%_includedir/%oname
%files -n %name-libsieve
%_bindir/sieve-test
%_bindir/sieved
%_libdir/%name/modules/lda/lib90_sieve_plugin.a
%_libdir/%name/modules/lda/lib90_sieve_plugin.la
%doc %_man1dir/*
%files -n %name-managesieve
%_libexecdir/%name/managesieve
%_libexecdir/%name/managesieve-login
%changelog
…
Полный changelog можно просмотреть здесь