+# TODO:
+# - put imap-ssl and pop3-ssl to separate packages - some want to have
+# ssl-only system.
#
%bcond_with toplevel # Allow toplevel folders. More info: http://www.ricky-chan.co.uk/courier/
#
Summary: Courier-IMAP server
Summary(pl): Serwer Courier-IMAP
Name: courier-imap
-Version: 4.0.5
-Release: 1
+Version: 4.1.1
+Release: 2
License: GPL
Group: Networking/Daemons
Source0: http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
-# Source0-md5: 961372cea83bcbd07471670df1f9121b
+# Source0-md5: f423a609d9cce0dcf193cac64eb4cbdd
Source1: %{name}.init
Source2: %{name}-ssl.init
Source3: %{name}-pop3.init
Patch1: %{name}-certsdir.patch
Patch2: %{name}-maildir.patch
Patch3: %{name}-toplevel.patch
+Patch4: %{name}-drop-makedat.patch
URL: http://www.courier-mta.org/imap/
BuildRequires: autoconf >= 2.54
BuildRequires: automake
%if %{with toplevel}
%patch3 -p1
%endif
+%patch4 -p1
install %{SOURCE1} courier-imap.in
install %{SOURCE2} courier-imap-ssl.in
install %{SOURCE3} courier-pop3.in
install %{SOURCE4} courier-pop3-ssl.in
+rm -f makedat/configure.in
%build
# Change Makefile.am files and force recreate Makefile.in's.
-OLDDIR=`pwd`
-find -type f -a \( -name configure.in -o -name configure.ac \) | while read FILE; do
- cd "`dirname "$FILE"`"
+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
+ if [ -f Makefile.am ]; then
+ %{__sed} -i -e '/_[L]DFLAGS=-static/d' Makefile.am
+ fi
- %{__libtoolize}
- %{__aclocal}
- %{__autoconf}
- %{__autoheader}
- %{__automake}
+ %{__libtoolize}
+ %{__aclocal}
+ %{__autoconf}
+ %{__autoheader}
+ %{__automake}
- cd "$OLDDIR"
+ cd -
done
%configure \
install imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8
touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap}
+touch $RPM_BUILD_ROOT%{_sysconfdir}/shared/index
# make config files
./sysconftool $RPM_BUILD_ROOT%{_sysconfdir}/*.dist
%files
%defattr(644,root,root,755)
-%doc maildir/README.sharedfolders.html imap/README.proxy tcpd/README.couriertls
+%doc maildir/README.sharedfolders.txt imap/README.proxy tcpd/README.couriertls
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/imap
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/imapd
%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(644,daemon,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/shared/index
%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*
-%attr(750,root,root) %dir %{_sysconfdir}
+%attr(751,root,root) %dir %{_sysconfdir}
%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(755,root,root) %{_libexecdir}/makedatprog
%{_mandir}/man1/couriert*
%{_mandir}/man8/couriert*
%{_mandir}/man8/mk*