Search
j0ke.net Open Build Service
>
Projects
>
vhcs
>
courier-imap
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 8
[-]
[+]
Added
courier-imap.spec
@@ -0,0 +1,262 @@ +# +# spec file for package courier-imap (Version 4.1.1) +# +# Copyright (c) 2007 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++ libstdc++-devel openssl-devel postfix +URL: http://www.courier-mta.org/imap/ +Summary: An IMAP and POP3 Server for Maildir MTAs +Version: 4.1.2 +Release: 33 +License: GNU General Public License (GPL) +Conflicts: imap qpopper +Group: Productivity/Networking/Email/Servers +Obsoletes: %{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 +Patch: %{name}-4.0.6.diff +Patch1: %{name}-4.1.1.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Prefix: /usr +%define _sysconfdir /etc/courier +%define _localstatedir /var/run +%define authdaemondir %{_localstatedir}/authdaemon.courier-imap + +%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 + +%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 +rm -rf $RPM_BUILD_ROOT +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} 's/^IMAPDSTART=.*/IMAPDSTART=YES/' \ + <$RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist \ + >$RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist.tmp +%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist.tmp \ + $RPM_BUILD_ROOT%{_sysconfdir}/imapd.dist +%{__sed} 's/^IMAPDSSLSTART=.*/IMAPDSSLSTART=YES/' \ + <$RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist \ + >$RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist.tmp +%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/imapd-ssl.dist.tmp \ + $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} 's/^POP3DSTART=.*/POP3DSTART=YES/' \ + <$RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist \ + >$RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist.tmp +%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist.tmp \ + $RPM_BUILD_ROOT%{_sysconfdir}/pop3d.dist +%{__sed} 's/^POP3DSSLSTART=.*/POP3DSSLSTART=YES/' \ + <$RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist \ + >$RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist.tmp +%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/pop3d-ssl.dist.tmp \ + $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 imap/README README.imap +install maildir/README.maildirquota.txt README.maildirquota +install 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%{_sysconfdir}/SuSEfirewall2.d/services/ +install -m 644 %{S:8} $RPM_BUILD_ROOT%{_sysconfdir}/SuSEfirewall2.d/services/%{name} + +%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/* +%{_sysconfdir}/SuSEfirewall2.d/services/%{name} +%dir %{_sysconfdir}/SuSEfirewall2.d +%dir %{_sysconfdir}/SuSEfirewall2.d/services + +%clean +rm -rf $RPM_BUILD_ROOT + +%changelog -n courier-imap +* 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