]> git.pld-linux.org Git - packages/dovecot.git/blobdiff - dovecot.spec
- release 3
[packages/dovecot.git] / dovecot.spec
index 1e8b8a0d73e7874e4ca29c14697e39caf2a627c5..e933ca96e8a293ee8ed2a5314bbfd2f9bb0ca5f9 100644 (file)
@@ -1,5 +1,3 @@
-# TODO:
-# - use service macros
 #
 # Conditional build:
 %bcond_without gssapi  # without GSSAPI support
 Summary:       IMAP and POP3 server written with security primarily in mind
 Summary(pl.UTF-8):     Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie
 Name:          dovecot
-Version:       2.0.6
-Release:       2
+Version:       2.0.13
+Release:       3
 Epoch:         1
 License:       MIT (libraries), LGPL v2.1 (the rest)
 Group:         Networking/Daemons
 Source0:       http://dovecot.org/releases/2.0/%{name}-%{version}.tar.gz
-# Source0-md5: 6226485f95def28ecb4ff8fc52915762
+# Source0-md5: fd8a0702275a61332db7353dadff0f92
 Source1:       %{name}.pamd
 Source2:       %{name}.init
 Source3:       %{name}.sysconfig
@@ -48,7 +46,7 @@ Requires(pre):        /bin/id
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
-Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
 Requires:      pam >= 0.79.0
 Provides:      group(dovecot)
 Provides:      imapdaemon
@@ -209,17 +207,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add dovecot
-if [ -f /var/lock/subsys/dovecot ]; then
-       /etc/rc.d/init.d/dovecot restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/dovecot start\" to start dovecot daemon."
-fi
+%service dovecot restart
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/dovecot ]; then
-               /etc/rc.d/init.d/dovecot stop >&2
-       fi
+       %service dovecot stop
        /sbin/chkconfig --del dovecot
 fi
 
@@ -234,6 +226,13 @@ fi
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
+%triggerin -- pam
+# restart devocot if pam is upgraded
+# (dovecot is linked with old libpam but tries to open modules linked with new libpam)
+if [ "$2" != 1 ]; then
+       %service -q dovecot restart
+fi
+
 %triggerpostun -- dovecot < 1:2.0.0
 # upgrading dovecot < 1.1
 echo "Configuration change default_mail_env -> mail_location"
@@ -323,6 +322,7 @@ fi
 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so
 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so
 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so
+%attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so
 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so
 %{_libdir}/%{name}-devel
 %{_includedir}/%{name}
@@ -334,10 +334,12 @@ fi
 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0.0.0
 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0.0.0
 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0.0.0
+%attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0.0.0
 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0.0.0
 # Note: we are in %{_libdir}/dovecot, ldconfig does not look into this
 # directory. This is why the following files are not %ghost
 %attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0
 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0
 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0
+%attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0
 %attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0
This page took 0.041787 seconds and 4 git commands to generate.