]> git.pld-linux.org Git - packages/courier.git/blobdiff - courier.spec
- updated to 0.45.1
[packages/courier.git] / courier.spec
index 03d1934a4947471947233bb0dfc04973ba0ffb66..ec0f5806e3ba6f24999d4fa481700b56620a38a0 100644 (file)
@@ -5,17 +5,18 @@
 Summary:       Courier mail server
 Summary(pl):   Serwer poczty Courier
 Name:          courier
-Version:       0.44.2
-Release:       4
+Version:       0.45.1
+Release:       0.9
 License:       GPL
 Group:         Networking/Daemons
 Source0:       http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
-# Source0-md5: 8c607c70a692d8f8ccb769a3f96d2f28
+# Source0-md5: 449b03a7d61e2174ad7dc65e4ddf57c6
 Patch0:        %{name}-openssl-path.patch
 Patch1:                %{name}-withoutfam.patch
 Patch2:                %{name}-maildir.patch
 Patch3:                %{name}-no_res_query.patch
 Patch4:                %{name}-sendmail_dir.patch
+Patch5:                %{name}-start_scripts.patch
 URL:           http://www.courier-mta.org/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -275,6 +276,7 @@ Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courierze.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %build
 # we don't want fax module
@@ -491,14 +493,8 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man5/maildir.5*
 rm -rf $RPM_BUILD_ROOT
 
 %post
+if [ "$1" = "1" ]; then
 /sbin/chkconfig --add courier
-%{_sbindir}/makealiases 2>/dev/null || true
-%{_sbindir}/makesmtpaccess 2>/dev/null || true
-
-# If we do not have a certificate, make one up.
-if [ ! -f %{_datadir}/esmtpd.pem ]; then
-       %{_sbindir}/mkesmtpdcert
-fi
 
 cat <<EOF
 
@@ -513,40 +509,58 @@ Enter user, who should receive mail for root, mailer-daemon and postmaster
 into /etc/courier/aliases/system
 
 EOF
+fi
+
+if [ -e /var/lock/subsys/courier ]; then
+    %{initdir}/courier restart
+fi
 
 %preun
 if [ "$1" = "0" ]; then
+    if [ -e /var/lock/subsys/courier ]; then
        %{initdir}/courier stop
+    fi
        /sbin/chkconfig --del courier
 fi
 
 %post imapd
-# If we do not have a certificate, make one up.
-if [ ! -f %{_datadir}/imapd.pem ]; then
-       %{_sbindir}/mkimapdcert
+if [ -e %{_localstatedir}/tmp/imapd.pid ]; then
+    %{_sbindir}/imapd stop
+    %{_sbindir}/imapd start
+fi
+if [ -e %{_localstatedir}/tmp/imapd-ssl.pid ]; then
+    %{_sbindir}/imapd-ssl stop
+    %{_sbindir}/imapd-ssl start
 fi
-%{_sbindir}/imapd stop
-%{_sbindir}/imapd start
-%{_sbindir}/imapd-ssl stop
-%{_sbindir}/imapd-ssl start
 
 %preun imapd
 if [ "$1" = "0" ]; then
+    if [ -e %{_localstatedir}/tmp/imapd.pid ]; then
        %{_sbindir}/imapd stop
+    fi
+    if [ -e %{_localstatedir}/tmp/imapd-ssl.pid ]; then
        %{_sbindir}/imapd-ssl stop
+    fi
 fi
 
 %post pop3d
-# If we do not have a certificate, make one up.
-if [ ! -f %{_datadir}/pop3d.pem ]; then
-       %{_sbindir}/mkpop3dcert
+if [ -e %{_localstatedir}/tmp/pop3d.pid ]; then
+    %{_sbindir}/pop3d stop
+    %{_sbindir}/pop3d start
+fi
+if [ -e %{_localstatedir}/tmp/pop3d-ssl.pid ]; then
+    %{_sbindir}/pop3d-ssl stop
+    %{_sbindir}/pop3d-ssl start
 fi
-%{_sbindir}/pop3d stop
-%{_sbindir}/pop3d start
 
 %preun pop3d
 if [ "$1" = "0" ]; then
+    if [ -e %{_localstatedir}/tmp/pop3d.pid ]; then
        %{_sbindir}/pop3d stop
+    fi
+    if [ -e %{_localstatedir}/tmp/pop3d-ssl.pid ]; then
+       %{_sbindir}/pop3d-ssl stop
+    fi
 fi
 
 %post webmail
@@ -560,17 +574,31 @@ if ps -A |grep -q sqwebmaild; then
 fi
 
 %post smtpauth
-%{_sbindir}/esmtpd stop
-%{_sbindir}/esmtpd start
+if [ -e %{_localstatedir}/tmp/esmtpd.pid ]; then
+    %{_sbindir}/esmtpd stop
+    %{_sbindir}/esmtpd start
+fi
+if [ -e %{_localstatedir}/tmp/esmtpd-ssl.pid ]; then
+    %{_sbindir}/esmtpd-ssl stop
+    %{_sbindir}/esmtpd-ssl start
+fi
 
+if [ "$1" = "1" ]; then
 echo
 echo Remember to enable auth in esmtp config files
 echo
+fi
 
 %postun smtpauth
 if [ "$1" = "0" ]; then
+    if [ -e %{_localstatedir}/tmp/esmtpd.pid ]; then
        %{_sbindir}/esmtpd stop
        %{_sbindir}/esmtpd start
+    fi
+    if [ -e %{_localstatedir}/tmp/esmtpd-ssl.pid ]; then
+       %{_sbindir}/esmtpd-ssl stop
+       %{_sbindir}/esmtpd-ssl start
+    fi
 fi
 
 %post authldap
@@ -617,7 +645,7 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS BENCHMARKS NEWS README TODO htmldoc/*
+%doc AUTHORS BENCHMARKS ChangeLog NEWS README TODO htmldoc/*
 %{_mandir}/man1/sendmail.1*
 %{_mandir}/man1/preline.1*
 %{_mandir}/man1/maildirmake.1*
@@ -896,7 +924,7 @@ fi
 %attr(755,root,root) %{_datadir}/sqwebmail/sendit.sh
 %attr(755,root,root) %{_datadir}/sqwebmail/ldapsearch
 %attr(755,root,root) %{_libdir}/%{name}/sqwebmaild
-%dir %{_libdir}/%{name}/webmail/
+%dir %{_libdir}/%{name}/webmail
 %attr(755,root,root) %{_libdir}/%{name}/webmail/webadmin
 %attr(755,root,root) %{_libdir}/%{name}/webmail/webmail
 %attr(700, bin, bin) %dir %{_localstatedir}/webmail-logincache
@@ -924,16 +952,22 @@ fi
 %attr(755,root,root) %{_libdir}/courier/modules/esmtp/authend
 
 %files authldap
-%{_mandir}/man7/authldap.7*
+%defattr(644,root,root,755)
+%doc authlib/README.ldap
 %attr(755,root,root) %{_libdir}/authlib/authdaemond.ldap
 %attr(660,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc
+%{_mandir}/man7/authldap.7*
 
 %files authmysql
-%{_mandir}/man7/authmysql.7*
+%defattr(644,root,root,755)
+%doc authlib/README.authmysql.html authlib/README.authmysql.myownquery
 %attr(755,root,root) %{_libdir}/authlib/authdaemond.mysql
 %attr(660,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc
+%{_mandir}/man7/authmysql.7*
 
 %files authpgsql
-%{_mandir}/man7/authpgsql.7*
+%defattr(644,root,root,755)
+%doc authlib/README.authpostgres.html
 %attr(755,root,root) %{_libdir}/authlib/authdaemond.pgsql
 %attr(660,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc
+%{_mandir}/man7/authpgsql.7*
This page took 0.129771 seconds and 4 git commands to generate.