]> git.pld-linux.org Git - packages/courier.git/blobdiff - courier.spec
- updated to 0.45.1
[packages/courier.git] / courier.spec
index 5f028e15b81ff4bcbb0dda19d273dd653114feb3..ec0f5806e3ba6f24999d4fa481700b56620a38a0 100644 (file)
@@ -1,19 +1,22 @@
 #
 # Conditional build:
-%bcond_with fam                # with fam support
+%bcond_with    fam             # with fam support
 #
 Summary:       Courier mail server
 Summary(pl):   Serwer poczty Courier
 Name:          courier
-Version:       0.44.2
-Release:       2
+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
@@ -37,11 +40,25 @@ Requires(post,preun):       /sbin/chkconfig
 Requires(post):        openssl-tools >= 0.9.7c
 %{?with_fam:Requires:  fam}
 Provides:      smtpdaemon
+Obsoletes:     exim
+Obsoletes:     masqmail
+Obsoletes:     nullmailer
+Obsoletes:     omta
+Obsoletes:     qmail
+Obsoletes:     sendmail
+Obsoletes:     sendmail-cf
+Obsoletes:     sendmail-doc
+Obsoletes:     smail
+Obsoletes:     smtpdaemon
+Obsoletes:     ssmtp
+Obsoletes:     zmailer
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                apachedir       /home/services/httpd
-%define                _prefix         /usr/lib/courier
+%define                _datadir        %{_prefix}/share/courier
 %define                _mandir         /usr/share/man
+%define                _libdir         %{_prefix}/%{_lib}/courier
+%define                _libexecdir     %{_libdir}
 %define                _localstatedir  /var/spool/courier
 %define                _sysconfdir     /etc/courier
 %define                initdir         /etc/rc.d/init.d
@@ -80,7 +97,7 @@ filtrowania spamu.
 Summary:       Courier Integrated POP3 server
 Summary(pl):   Zintegrowany serwer POP3 do Couriera
 Group:         Networking/Daemons
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 Requires(post):        openssl-tools >= 0.9.7c
 
 %description pop3d
@@ -101,7 +118,7 @@ obs
 Summary:       Courier Integrated IMAP server
 Summary(pl):   Zintegrowany serwer IMAP do Couriera
 Group:         Networking/Daemons
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 Requires(post):        openssl-tools >= 0.9.7c
 Obsoletes:     courier-imap
 Obsoletes:     courier-imap-common
@@ -135,7 +152,7 @@ pakietu automatycznie odinstaluje Courier-IMAP je
 Summary:       Courier Integrated HTTP (webmail) server
 Summary(pl):   Zintegrowany serwer poczty przez HTTP (webmail) do Couriera
 Group:         Networking/Daemons
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 Requires:      %{_cgibindir}
 Requires:      %{_documentrootdir}
 
@@ -163,7 +180,7 @@ SqWebMail, ale jego konfiguracja jest dostosowana do serwera Courier.
 Summary:       Courier Integrated Mailing List Manager
 Summary(pl):   Zintegrowany zarz±dca list dyskusyjnych do Couriera
 Group:         Applications/Mail
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description mlm
 This package installs couriermlm - a mailing list manager for the
@@ -190,7 +207,7 @@ aliasy pocztowe tylko do wysy
 Summary:       Courier Integrated mail filter
 Summary(pl):   Zintegrowany filtr poczty do Couriera
 Group:         Applications/Mail
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description maildrop
 This package installs Courier mail server's integrated mail filter.
@@ -205,7 +222,7 @@ potrzebny do filtrowania przychodz
 Summary:       Courier mail server authenticated ESMTP module
 Summary(pl):   Modu³ uwierzytelniania ESMTP (SMTP AUTH) do Couriera
 Group:         Networking/Daemons
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description smtpauth
 Authenticated ESMTP allows remote users to authenticate themselves and
@@ -217,10 +234,10 @@ umo
 Courier.
 
 %package authldap
-Summary:        LDAP authentication daemon for Courier mail server
-Summary(pl):    Demon autentykacji LDAP do Couriera
-Group:          Networking/Daemons
-PreReq:         %{name} = %{version}
+Summary:       LDAP authentication daemon for Courier mail server
+Summary(pl):   Demon autentykacji LDAP do Couriera
+Group:         Networking/Daemons
+PreReq:                %{name} = %{version}-%{release}
 
 %description authldap
 This package provides LDAP authentication for Courier.
@@ -229,10 +246,10 @@ This package provides LDAP authentication for Courier.
 Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courierze.
 
 %package authmysql
-Summary:        MySQL authentication daemon for Courier mail server
-Summary(pl):    Demon autentykacji MySQL do Couriera
-Group:          Networking/Daemons
-PreReq:         %{name} = %{version}
+Summary:       MySQL authentication daemon for Courier mail server
+Summary(pl):   Demon autentykacji MySQL do Couriera
+Group:         Networking/Daemons
+PreReq:                %{name} = %{version}-%{release}
 
 %description authmysql
 This package provides MySQL authentication for Courier.
@@ -241,10 +258,10 @@ This package provides MySQL authentication for Courier.
 Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courierze.
 
 %package authpgsql
-Summary:        PostgreSQL authentication daemon for Courier mail server
-Summary(pl):    Demon autentykacji PostgreSQL do Couriera
-Group:          Networking/Daemons
-PreReq:         %{name} = %{version}
+Summary:       PostgreSQL authentication daemon for Courier mail server
+Summary(pl):   Demon autentykacji PostgreSQL do Couriera
+Group:         Networking/Daemons
+PreReq:                %{name} = %{version}-%{release}
 
 %description authpgsql
 This package provides PostgreSQL authentication for Courier.
@@ -257,30 +274,47 @@ Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courierze.
 %patch0 -p1
 %{!?with_fam:%patch1 -p1}
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
 # we don't want fax module
 rm -rf courier/module.fax
+cp -f /usr/share/automake/config.sub webmail
 
 cd rootcerts
-rm -f missing
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
 %{__automake}
 cd ..
 
-rm -f missing
+cd authlib
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+cd ..
+
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
 %{__automake}
+
+cd courier
+%{__aclocal}
+%{__autoconf}
+ln -s ../ltmain.sh .
+%{__automake}
+cd ..
+
 %configure \
        --localstatedir=%{_localstatedir} \
        --sysconfdir=%{_sysconfdir} \
        --mandir=%{_mandir} \
        --enable-imageurl=%{_imageurl} \
-       --with-db=db
+       --with-db=db \
+       --with-mailer=%{_sbindir}/sendmail
 
 %{__make}
 %{__make} check
@@ -288,7 +322,7 @@ rm -f missing
 %install
 rm -rf $RPM_BUILD_ROOT
 umask 022
-install -d -p $RPM_BUILD_ROOT{%{_prefix},/etc/{cron.hourly,pam.d},%{initdir}} \
+install -d -p $RPM_BUILD_ROOT{%{_prefix}/lib,/etc/{cron.hourly,pam.d},%{initdir}} \
        $RPM_BUILD_ROOT{%{_cgibindir},%{_documentrootdir}} \
        $RPM_BUILD_ROOT{%{_sysconfdir}/userdb,%{_localstatedir}{/calendar,/tmp/broken}} \
        $RPM_BUILD_ROOT/etc/cron.hourly
@@ -302,9 +336,9 @@ for X in imap esmtp pop3 webmail calendar
 do
 cat > $RPM_BUILD_ROOT/etc/pam.d/$X <<EOF
 #%PAM-1.0
-auth       required     /lib/security/pam_unix.so shadow nullok
-account    required     /lib/security/pam_unix.so
-session    required     /lib/security/pam_unix.so
+auth   required        pam_unix.so shadow nullok
+account        required        pam_unix.so
+session        required        pam_unix.so
 EOF
 done
 
@@ -442,15 +476,8 @@ else
 endif
 EOF
 
-#
 # sendmail soft links
-#
-
-install -d $RPM_BUILD_ROOT/usr/sbin
-install -d $RPM_BUILD_ROOT/usr/lib
-
-ln -sf %{_bindir}/sendmail $RPM_BUILD_ROOT/usr/sbin/sendmail
-ln -sf %{_bindir}/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail
+ln -sf %{_sbindir}/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail
 
 # This link by default is missing
 ln -sf %{_datadir}/esmtpd-ssl $RPM_BUILD_ROOT%{_sbindir}/esmtpd-ssl
@@ -466,130 +493,159 @@ 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
+
 Now courier will refuse to accept SMTP messages except to localhost
 add hosts to /etc/courier/esmtpacceptmailfor.dir/esmtpacceptmailfor
-run /usr/lib/courier/sbin/makeacceptmailfor
+run makeacceptmailfor
+
+Add hosts to /etc/courier/locals you want to accept mail for
+run makealiases
+
 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
-
-cat <<EOF
-Add hosts to /etc/courier/locals you want to accept mail for
-run /usr/lib/courier/sbin/makealiases
-EOF
 
 %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
 if ps -A |grep -q authdaemond; then
-    %{_prefix}/lib/courier/sqwebmaild start
+       %{_libdir}/courier/sqwebmaild start
 fi
 
 %preun webmail
 if ps -A |grep -q sqwebmaild; then
-    %{_prefix}/lib/courier/sqwebmaild stop
+       %{_libdir}/courier/sqwebmaild stop
 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
 if ps -A |grep -q authdaemond; then
-    %{_libdir}/authlib/authdaemond stop
-    %{_libdir}/authlib/authdaemond start
+       %{_libdir}/authlib/authdaemond stop
+       %{_libdir}/authlib/authdaemond start
 fi
 
 %postun authldap
 if [ -x %{_libdir}/authlib/authdaemond ]; then
-    if ps -A |grep -q authdaemond; then
-       %{_libdir}/authlib/authdaemond stop;
-       %{_libdir}/authlib/authdaemond start;
-    fi
+       if ps -A |grep -q authdaemond; then
+               %{_libdir}/authlib/authdaemond stop;
+               %{_libdir}/authlib/authdaemond start;
+       fi
 fi
 
 %post authmysql
 if ps -A |grep -q authdaemond; then
-    %{_libdir}/authlib/authdaemond stop
-    %{_libdir}/authlib/authdaemond start
+       %{_libdir}/authlib/authdaemond stop
+       %{_libdir}/authlib/authdaemond start
 fi
 
 %postun authmysql
 if [ -x %{_libdir}/authlib/authdaemond ]; then
-    if ps -A |grep -q authdaemond; then
-       %{_libdir}/authlib/authdaemond stop;
-       %{_libdir}/authlib/authdaemond start;
-    fi
+       if ps -A |grep -q authdaemond; then
+               %{_libdir}/authlib/authdaemond stop;
+               %{_libdir}/authlib/authdaemond start;
+       fi
 fi
 
 %post authpgsql
 if ps -A |grep -q authdaemond; then
-    %{_libdir}/authlib/authdaemond stop
-    %{_libdir}/authlib/authdaemond start
+       %{_libdir}/authlib/authdaemond stop
+       %{_libdir}/authlib/authdaemond start
 fi
 
 %postun authpgsql
 if [ -x %{_libdir}/authlib/authdaemond ]; then
-    if ps -A |grep -q authdaemond; then
-       %{_libdir}/authlib/authdaemond stop;
-       %{_libdir}/authlib/authdaemond start;
-    fi
+       if ps -A |grep -q authdaemond; then
+               %{_libdir}/authlib/authdaemond stop;
+               %{_libdir}/authlib/authdaemond start;
+       fi
 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*
@@ -651,12 +707,10 @@ fi
 %attr(755,daemon,daemon) %dir %{_sysconfdir}/smtpaccess
 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/smtpaccess/default
 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/esmtpacceptmailfor.dir/esmtpacceptmailfor
+%attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/locals
 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/courierd
 %attr(640,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/aliases/system
 %attr(644,root,root) %{_sysconfdir}/quotawarnmsg.example
-%dir %{_prefix}
-%dir %{_bindir}
-%dir %{_sbindir}
 %dir %{_libdir}
 %dir %{_libdir}/courier
 %dir %{_datadir}
@@ -763,7 +817,7 @@ fi
 %attr(2755,root,daemon) %{_bindir}/mailq
 %attr(755,root,root) %{_bindir}/maildirmake
 %attr(755,root,root) %{_bindir}/maildirkw
-%attr(4755,root,root) %{_bindir}/sendmail
+%attr(4755,root,root) %{_sbindir}/sendmail
 %attr(4755,root,root) %{_bindir}/rmail
 %attr(755,root,root) %{_bindir}/lockmail
 %attr(755,root,root) %{_bindir}/deliverquota
@@ -807,8 +861,7 @@ fi
 %attr(700,daemon,daemon) %dir %{_sysconfdir}/userdb
 %attr(755,daemon,daemon) %dir %{_localstatedir}/calendar
 %attr(755,daemon,daemon) %dir %{_localstatedir}/tmp/broken
-/usr/lib/sendmail
-/usr/sbin/sendmail
+%attr(755,root,root) /usr/lib/sendmail
 
 %files pop3d
 %defattr(644,root,root,755)
@@ -822,7 +875,6 @@ fi
 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pop3d
 %attr(600,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pop3d.cnf
 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pop3d-ssl
-%attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/locals
 %attr(755,root,root) %{_libdir}/courier/courierpop3d
 %attr(755,root,root) %{_libdir}/courier/courierpop3login
 %attr(755,root,root) %{_datadir}/pop3d
@@ -872,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
@@ -884,9 +936,9 @@ fi
 %{_mandir}/man1/refor*
 %{_mandir}/man5/maildrop*
 %attr(644,daemon,daemon) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/maildrop
-%attr(755,root,root)  %{_bindir}/reformail
-%attr(755,root,root)  %{_bindir}/reformime
 %attr(4755,root,root) %{_bindir}/maildrop
+%attr(755,root,root) %{_bindir}/reformail
+%attr(755,root,root) %{_bindir}/reformime
 
 %files mlm
 %defattr(644,root,root,755)
@@ -900,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.069844 seconds and 4 git commands to generate.