+# TODO:
+# - put imap-ssl and pop3-ssl to separate packages - some want to have
+# ssl-only system (or non-ssl only system)
+# see also http://thread.gmane.org/gmane.linux.pld.devel.english/2509/focus=2509
+# - fix manpages:
+# [set $man.base.url.for.relative.links]/maildirquota.html
-Source0: http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
-# Source0-md5: 961372cea83bcbd07471670df1f9121b
+Source0: http://downloads.sourceforge.net/courier/%{name}-%{version}.tar.bz2
+# Source0-md5: 2f95c99b9ad1380b9f3ac733ccd741a2
Patch1: %{name}-certsdir.patch
Patch2: %{name}-maildir.patch
Patch3: %{name}-toplevel.patch
Patch1: %{name}-certsdir.patch
Patch2: %{name}-maildir.patch
Patch3: %{name}-toplevel.patch
-BuildRequires: fam-devel
+BuildRequires: gdbm-devel
+BuildRequires: gnet-devel
+BuildRequires: libidn-devel
+%{?with_fam:BuildRequires: gamin-devel}
Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
%package common
Summary: Common files for imap and pop3 daemons
Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir.
%package common
Summary: Common files for imap and pop3 daemons
Group: Networking/Daemons
Requires(post,preun): /sbin/chkconfig
Requires: /sbin/chkconfig
Group: Networking/Daemons
Requires(post,preun): /sbin/chkconfig
Requires: /sbin/chkconfig
Group: Networking/Daemons
%description deliverquota
deliverquota is a temporary hack to implement E-mail delivery to a
Maildir with a software-imposed quota.
Group: Networking/Daemons
%description deliverquota
deliverquota is a temporary hack to implement E-mail delivery to a
Maildir with a software-imposed quota.
-%description deliverquota -l pl
-deliverquota jest tymczasowym rozwi±zaniem implementuj±cym
-dostarczanie e-maili do skrzynek Maildir z programowo narzucon± quot±.
+%description deliverquota -l pl.UTF-8
+deliverquota jest tymczasowym rozwiązaniem implementującym
+dostarczanie e-maili do skrzynek Maildir z programowo narzuconą quotą.
Group: Networking/Daemons
Conflicts: qmail-maildirmake
%description maildirmake
Maildirmake is a tool for making mail folders in Maildir format.
Group: Networking/Daemons
Conflicts: qmail-maildirmake
%description maildirmake
Maildirmake is a tool for making mail folders in Maildir format.
-install %{SOURCE1} courier-imap.in
-install %{SOURCE2} courier-imap-ssl.in
-install %{SOURCE3} courier-pop3.in
-install %{SOURCE4} courier-pop3-ssl.in
+cp -p %{SOURCE1} courier-imap.in
+cp -p %{SOURCE2} courier-imap-ssl.in
+cp -p %{SOURCE3} courier-pop3.in
+cp -p %{SOURCE4} courier-pop3-ssl.in
+rm -f makedat/configure.in
-OLDDIR=`pwd`
-find -type f -a \( -name configure.in -o -name configure.ac \) | while read FILE; do
- cd "`dirname "$FILE"`"
-
- if [ -f Makefile.am ]; then
- sed -i -e '/_[L]DFLAGS=-static/d' Makefile.am
- fi
-
- %{__libtoolize}
- %{__aclocal}
- %{__autoconf}
- %{__autoheader}
- %{__automake}
-
- cd "$OLDDIR"
+find -type f -a '(' -name configure.in -o -name configure.ac ')' | while read FILE; do
+ cd "$(dirname "$FILE")"
+
+ if [ -f Makefile.am ]; then
+ %{__sed} -i -e '/_[L]DFLAGS=-static/d' Makefile.am
+ fi
+
+ %{__libtoolize}
+ %{__aclocal}
+ %{__autoconf}
+ if grep -q AC_CONFIG_HEADER configure.in; then
+ %{__autoheader}
+ fi
+ %{__automake}
+
+ cd -
-install courier-imap $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
-install courier-imap-ssl $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-ssl
-install courier-pop3 $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-pop3
-install courier-pop3-ssl $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-pop3-ssl
-install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/imap
-install %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/pop3
+install -p courier-imap $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap
+install -p courier-imap-ssl $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-ssl
+install -p courier-pop3 $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-pop3
+install -p courier-pop3-ssl $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-pop3-ssl
+cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/imap
+cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/pop3
-install imap/README README.imap
-install imap/ChangeLog ChangeLog
-install maildir/README.maildirquota.txt README.maildirquota
+cp -pf imap/README README.imap
+cp -pf imap/ChangeLog ChangeLog
+cp -pf maildir/README.maildirquota.txt README.maildirquota
-install tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
-install imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
+cp -p tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8
+cp -p imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
%attr(754,root,root) /etc/rc.d/init.d/courier-imap-ssl
%attr(755,daemon,daemon) %dir %{_sysconfdir}/shared
%attr(755,daemon,daemon) %dir %{_sysconfdir}/shared.tmp
%attr(754,root,root) /etc/rc.d/init.d/courier-imap-ssl
%attr(755,daemon,daemon) %dir %{_sysconfdir}/shared
%attr(755,daemon,daemon) %dir %{_sysconfdir}/shared.tmp
%attr(755,root,root) %{_bindir}/imapd
%attr(755,root,root) %{_bindir}/maildiracl
%attr(755,root,root) %{_bindir}/maildirkw
%attr(755,root,root) %{_bindir}/imapd
%attr(755,root,root) %{_bindir}/maildiracl
%attr(755,root,root) %{_bindir}/maildirkw
%files common
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog imap/BUGS INSTALL README*
%files common
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog imap/BUGS INSTALL README*
%attr(750,root,root) %dir %{_certsdir}
%attr(770,daemon,daemon) %dir %{_localstatedir}
%dir %{_libexecdir}
%{_sysconfdir}/quotawarnmsg.example
%attr(755,root,root) %{_bindir}/couriertls
%attr(755,root,root) %{_libexecdir}/couriertcpd
%attr(750,root,root) %dir %{_certsdir}
%attr(770,daemon,daemon) %dir %{_localstatedir}
%dir %{_libexecdir}
%{_sysconfdir}/quotawarnmsg.example
%attr(755,root,root) %{_bindir}/couriertls
%attr(755,root,root) %{_libexecdir}/couriertcpd