SHA256
1
0
forked from pool/courier-imap
courier-imap/courier-imap.spec

305 lines
11 KiB
RPMSpec

#
# spec file for package courier-imap (Version 4.3.1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: courier-imap
BuildRequires: courier-authlib-devel fam-devel gcc-c++ gdbm-devel libstdc++-devel openssl openssl-devel postfix procps
Requires: fam-server
Url: http://www.courier-mta.org/imap/
Summary: An IMAP and POP3 Server for Maildir MTAs
Version: 4.3.1
Release: 4
License: GPL v2 or later
Conflicts: imap qpopper
Group: Productivity/Networking/Email/Servers
Obsoletes: %{name}-ldap
Provides: %{name}-ldap
Source: %{name}-%{version}.tar.bz2
Source1: pop3.pamd
Source2: imap.pamd
Source4: courier-imap.init
Source5: courier-imap-ssl.init
Source6: courier-pop.init
Source7: courier-pop-ssl.init
Source8: %name.firewall
Source9: %name-ssl.firewall
Patch: %{name}-4.0.6.diff
Patch1: %{name}-4.1.1.diff
Patch2: %{name}-ulimit_conf.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Prefix: /usr
%define _sysconfdir /etc/courier
%define _localstatedir /var/run
%define authdaemondir %{_localstatedir}/authdaemon.courier-imap
PreReq: coreutils
%description
Courier-IMAP is a lightweight server that provides IMAP access to
maildir mailboxes. It supports folders, custom authentication modules,
and virtual mailboxes. A compatible POP3 server is also provided. The
source code is based on the IMAP module in the Courier Mail Server, but
this build is independently repackaged to work with any other MTA that
delivers to maildir format mailboxes.
%prep
%setup -q
%patch
%patch1
%patch2
%build
%{suse_update_config}
export CFLAGS="$RPM_OPT_FLAGS"
./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir}/courier-imap \
--libdir=%{_libdir} --libexecdir=%{_prefix}/lib/courier-imap \
--localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir}/courier-imap --mandir=%{_mandir} \
--infodir=%{_infodir} --with-piddir=/var/run \
--disable-root-check \
--enable-unicode \
--with-authdaemonvar=%{authdaemondir} \
--enable-workarounds-for-imap-client-bugs \
--host=%{_host} --build=%{_build} --target=%{_target_platform} \
make
#make check
%install
make install DESTDIR=$RPM_BUILD_ROOT
# Move daemons into sbin
mv $RPM_BUILD_ROOT%{_prefix}/bin/{couriertls,imapd,pop3d} $RPM_BUILD_ROOT%{_prefix}/sbin/
# Rename imapd.8 to courier-imapd.8
mv $RPM_BUILD_ROOT%{_mandir}/man8/imapd.8 $RPM_BUILD_ROOT%{_mandir}/man8/courier-imapd.8
# Install PAM config files
mkdir -p $RPM_BUILD_ROOT/etc/pam.d
install -m 644 $RPM_SOURCE_DIR/pop3.pamd $RPM_BUILD_ROOT/etc/pam.d/pop3
install -m 644 $RPM_SOURCE_DIR/imap.pamd $RPM_BUILD_ROOT/etc/pam.d/imap
# Install init scripts
mkdir -p $RPM_BUILD_ROOT/etc/init.d
for i in imap imap-ssl pop pop-ssl ; do
install -m 644 $RPM_SOURCE_DIR/courier-$i.init $RPM_BUILD_ROOT/etc/init.d/courier-$i
ln -sf /etc/init.d/courier-$i $RPM_BUILD_ROOT%{_prefix}/sbin/rccourier-$i
done
# Remove original init scripts, will not work longer
rm $RPM_BUILD_ROOT%{_prefix}/lib/courier-imap/imapd.rc
rm $RPM_BUILD_ROOT%{_prefix}/lib/courier-imap/imapd-ssl.rc
rm $RPM_BUILD_ROOT%{_prefix}/lib/courier-imap/pop3d.rc
rm $RPM_BUILD_ROOT%{_prefix}/lib/courier-imap/pop3d-ssl.rc
#
# Fix imapd.dist
#
%{__sed} -i -e 's/^IMAPDSTART=.*/IMAPDSTART=YES/' \
$RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist
%{__sed} -i -e 's/^IMAPDSSLSTART=.*/IMAPDSSLSTART=YES/' \
$RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist
%{__chmod} 600 $RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist
%{__chmod} 600 $RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist
%{__sed} -i -e 's/^POP3DSTART=.*/POP3DSTART=YES/' \
$RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist
%{__sed} -i -e 's/^POP3DSSLSTART=.*/POP3DSSLSTART=YES/' \
$RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist
%{__chmod} 600 $RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist
%{__chmod} 600 $RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist
# For %doc macro
install -m 644 imap/README README.imap
install -m 644 maildir/README.maildirquota.txt README.maildirquota
install -m 644 maildir/README.sharedfolders.txt README.sharedfolders
install -d $RPM_BUILD_ROOT%{_datadir}/courier-imap
install -m 755 sysconftool $RPM_BUILD_ROOT%{_datadir}/courier-imap/sysconftool
cat >$RPM_BUILD_ROOT%{_datadir}/courier-imap/configlist <<EOF
%{_sysconfdir}/imapd.dist
%{_sysconfdir}/imapd-ssl.dist
%{_sysconfdir}/pop3d.dist
%{_sysconfdir}/pop3d-ssl.dist
EOF
#make config dir
install -d $RPM_BUILD_ROOT%{_sysconfdir}/%name/
#firewall script
install -d $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/
install -m 644 %{S:8} $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/%{name}
install -m 644 %{S:9} $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/%{name}-ssl
%post
%{_datadir}/courier-imap/sysconftool `%{__cat} %{_datadir}/courier-imap/configlist` >/dev/null
%preun
%stop_on_removal courier-imap courier-imap-ssl courier-pop courier-pop-ssl
if [ "$1" = "0" ]; then
rm -f %{_localstatedir}/couriersslcache
rm -f %{_localstatedir}/imapd.pid
rm -f %{_localstatedir}/imapd-ssl.pid
rm -f %{_localstatedir}/imapd.pid.lock
rm -f %{_localstatedir}/imapd-ssl.pid.lock
rm -f %{_localstatedir}/pop3d.pid
rm -f %{_localstatedir}/pop3d-ssl.pid
rm -f %{_localstatedir}/pop3d.pid.lock
rm -f %{_localstatedir}/pop3d-ssl.pid.lock
fi
exit 0
%postun
%restart_on_update courier-imap courier-imap-ssl courier-pop courier-pop-ssl
%insserv_cleanup
exit 0
%files
%defattr(-,root,root,755)
%doc AUTHORS COPYING imap/BUGS README README.imap README.maildirquota
%doc README.sharedfolders
%attr(755 root,root) /etc/init.d/courier-*
%attr(644,root,root) /etc/pam.d/imap
%attr(644,root,root) /etc/pam.d/pop3
%dir %{_sysconfdir}
%config %{_sysconfdir}/imap*
%config %{_sysconfdir}/pop3*
%config %{_sysconfdir}/quotawarnmsg.example
%dir %{_prefix}/lib/courier-imap
%{_prefix}/lib/courier-imap/makedatprog
%{_prefix}/lib/courier-imap/couriertcpd
%{_bindir}/*
%{_sbindir}/*
%{_mandir}/man?/*
%dir %{_datadir}/courier-imap/
%{_datadir}/courier-imap/*
%config /etc/sysconfig/SuSEfirewall2.d/services/%name
%config /etc/sysconfig/SuSEfirewall2.d/services/%name-ssl
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Apr 14 2008 aj@suse.de
- Remove executable permissions from README files.
* Wed Apr 02 2008 hvogel@suse.de
- update to version 4.3.1
* make SSL23 default tls protocol
* update description of SSL/TLS-related settings
* introduce IMAP_MAILBOX_SANITY_CHECK
* Explicitly make stderr line-buffered
* Suppress spurious error message in imap.c
- fix some rpmlint warnings
* Thu Jan 17 2008 mskibbe@suse.de
- update to version 4.3.0 which
o Fix some Bugs
o Fix SSL session caching bug
o Make skew check more reliable
o code cleanup
* Wed Nov 21 2007 mskibbe@suse.de
- Bug 342601 - courier-imap rc and config bugs
* Fri Nov 16 2007 mskibbe@suse.de
- Bug 341267 - courier-imap-ssl configuration problems
* Mon Oct 22 2007 sbrabec@suse.cz
- Use correct SuSEfirewall2 rule directory.
* Wed Apr 25 2007 mskibbe@suse.de
- update to version 4.1.3 which includes:
o fix memory leak
o checks for malloc failures
o updated man pages
o cleaned up configure script
o bug fixes
* Mon Apr 23 2007 mskibbe@suse.de
- SuSEfirewall2 service file installed in wrong dir/broken
(#266949)
* Thu Mar 29 2007 rguenther@suse.de
- add procps BuildRequries because of interesting configure checks
* Mon Mar 26 2007 rguenther@suse.de
- add gdbm-devel BuildRequires
* Wed Mar 14 2007 mskibbe@suse.de
- fam has no address, rejected by xinetd, when called from
courier-imap (#253437)
* Fri Mar 02 2007 mskibbe@suse.de
- courier : Support for FATE #300687: Ports for SuSEfirewall added
via packages (#250575)
- fix file list
- update to version 2.1.2 which
o Clarify some error messages
o Try to log bandwidth usage before getting killed by a signal
o Fix many compiler warnings
o Fix segfault if non-cert files were found in the cert dir
o Added koi8-u character set
* Mon Feb 12 2007 mskibbe@suse.de
- fix mkpop3dcert and mkimapdcert. Now they use pem files from
/etc/courier-imap/
* Mon Feb 05 2007 mskibbe@suse.de
- Courier generates certificates in /usr/share/courier-imap
(#241937)
* Mon Jan 22 2007 mskibbe@suse.de
- checkproc uses -p parameter not as specified in man page
(#230806)
* Mon Sep 11 2006 tpatzig@suse.de
- Add Conflict to qpopper
* Tue Aug 01 2006 mskibbe@suse.de
- update to version 4.1.1 which
o fixed some compiler warnings
o fix segfault if non-cert files were found in the cert dir
o Added koi8-u character set
o fix quota calculations on 32 bit platforms with 64 bit off_t
o Don't assume that connect() of a non-blocking socket always
fails with INPROGRESS
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Dec 06 2005 kukuk@suse.de
- Don't link static
* Mon Nov 14 2005 kukuk@suse.de
- Add postfix to nfb to fix location of sendmail [#133327]
* Wed Nov 02 2005 kukuk@suse.de
- Update to version 4.0.6
* Fri Sep 23 2005 kukuk@suse.de
- Fix imapd and pop3d init scripte for SSL connections [#113213]
* Mon Sep 19 2005 kukuk@suse.de
- Update to version 4.0.5
* Fri Aug 26 2005 kukuk@suse.de
- Rename courier-pop3* init scripts to courier-pop* to be
LSB conform
- Source imapd-ssl and pop3-ssl from init scripts [#113213],
use correct SSLPIDFILE variable and add path to checkproc
* Wed Aug 03 2005 kukuk@suse.de
- Update to version 4.0.4
* Thu Jul 21 2005 kukuk@suse.de
- Use Maildir from config file [#94231]
- If user removed PIDFILE entry from config file, set default
one [#85845]
* Thu Nov 18 2004 kukuk@suse.de
- Update to release 3.0.8
* Mon Nov 15 2004 kukuk@suse.de
- Use common-* PAM config files for imap and pop3
* Mon Sep 06 2004 kukuk@suse.de
- Fix permission of /usr/lib/courier-imap/authlib/authdaemond.ldap
[#44721]
* Mon Aug 16 2004 kukuk@suse.de
- Update to bug fix release 3.0.7
* Wed May 12 2004 kukuk@suse.de
- Update to 3.0.3
* Thu Mar 25 2004 mmj@suse.de
- Add postfix to # neededforbuild
* Wed Mar 17 2004 kukuk@suse.de
- Update to 3.0.2: vpopmail password fixes, filesystem/ACL fixes
* Mon Mar 08 2004 kukuk@suse.de
- Update to official 3.0.0 release
* Mon Feb 09 2004 kukuk@suse.de
- Update to official 2.2.1 release
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Fri Aug 29 2003 kukuk@suse.de
- Add conflict with imap package
* Tue Aug 26 2003 kukuk@suse.de
- Fix typo in spec file
- Update to 2.1.1
* Sun Aug 03 2003 aj@suse.de
- Package sysconftool also.
* Fri Aug 01 2003 kukuk@suse.de
- Rename imapd.8 to courier-imapd.8 to resolve file conflicts.
* Wed Jul 30 2003 kukuk@suse.de
- Initial version