X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=courier-imap.spec;h=ff213dd0ab2f485936ca71062964615e1d8e9674;hb=6ccdf486874dc50aa8f9dbeabe706c0519da216c;hp=d73d364f54f2bab348684ed0dd5b0d8747435872;hpb=e12a09a39f9b14286b887f0064e5a33a197c42a8;p=packages%2Fcourier-imap.git diff --git a/courier-imap.spec b/courier-imap.spec index d73d364..ff213dd 100644 --- a/courier-imap.spec +++ b/courier-imap.spec @@ -1,21 +1,41 @@ -Summary: Courier-IMAP 0.18 IMAP server +# +# Conditional build: +# _without_ldap - without LDAP support +# _without_mysql - without MySQL support +# _without_postgresql - without PostgreSQL support +Summary: Courier-IMAP server +Summary(pl): Serwer Courier-IMAP Name: courier-imap -Version: 0.22 -Release: 2 +Version: 1.4.2 +Release: 3 License: GPL -Group: Applications/Mail -Group(pl): Aplikacje/Poczta -Group(pt): Aplicações/Correio Eletrônico -Source0: http://www.inter7.com/courierimap/%{name}-%{version}.tar.gz -Source1: %{name}.initd -Source2: %{name}.pamd -Source3: %{name}.sysconfig +Group: Networking/Daemons +Source0: http://download.sourceforge.net/courier/%{name}-%{version}.tar.gz +Source1: %{name}.init +Source2: %{name}-pop3.init +Source3: %{name}-authdaemon.init +Source4: %{name}.pamd +Source5: %{name}-pop3.pamd +Source6: %{name}.sysconfig +Source7: %{name}-pop3.sysconfig +Source8: %{name}-authdaemon.sysconfig +Patch0: ftp://ftp.pld.org.pl/people/siefca/patches/courier/%{name}-myownquery-fix.patch URL: http://www.inter7.com/courierimap/ -BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +%{!?_without_postgresql:BuildRequires: postgresql-devel} +%{!?_without_mysql:BuildRequires: mysql-devel} +%{!?_without_mysql:BuildRequires: zlib-devel} +%{!?_without_ldap:BuildRequires: openldap-devel} +BuildRequires: gdbm-devel +BuildRequires: libstdc++-devel +BuildRequires: openssl-devel +BuildRequires: kernel-headers Provides: imapdaemon +PreReq: %{name}-common = %{version} +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) Obsoletes: imapdaemon %define _libexecdir /usr/lib/courier-imap +%define _sysconfdir /etc/courier-imap %description Courier-IMAP is an IMAP server for Maildir mailboxes. @@ -23,41 +43,185 @@ Courier-IMAP is an IMAP server for Maildir mailboxes. %description -l pl Courier-IMAP jest serwerem IMAP dla skrzynek pocztowych Maildir. +%package common +Summary: Common files for imap and pop daemons +Summary(pl): Pliki wspólne dla serwerów imap i pop +Group: Networking/Daemons +PreReq: rc-scripts +PreReq: /sbin/chkconfig +Requires: %{name}-maildirmake +Requires: %{name}-deliverquota +Requires: %{name}-userdb + +%description common +Common files for imap and pop daemons. + +%description common -l pl +Pliki wspólne dla serwerów imap i pop. + +%package userdb +Summary: Commands used to create the /etc/userdb.dat +Group: Networking/Daemons + +%description userdb +Commands used to create the /etc/userdb.dat. + +%description userdb -l pl +Polecenia u¿ywane do stworzenia /etc/userdb.dat. + +%package deliverquota +Summary: Deliver to a maildir with a 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 maildir z programowo narzucon± quot±. + +%package maildirmake +Summary: 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. + +%description maildirmake -l pl +Maildirmake jest narzêdziem do tworzenia folderów pocztowych w +formacie Maildir. + +%package pop3 +Summary: Courier-IMAP POP3 Server +Summary(pl): Serwer Courier-IMAP POP3 +Group: Networking/Daemons +PreReq: %{name}-common = %{version} +Provides: pop3daemon +Obsoletes: pop3daemon + +%description pop3 +Courier-IMAP POP3 is an POP3 server for Maildir mailboxes. + +%description pop3 -l pl +Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir. + +%package authldap +Summary: LDAP authentication daemon for Courier IMAP +Summary(pl): Demon autentykacji LDAP do Courier IMAP +Group: Networking/Daemons +PreReq: %{name}-common = %{version} + +%description authldap +This package provides LDAP authentication for Courier IMAP. + +%description authldap -l pl +Ten pakiet pozwala na korzystanie z autentykacji LDAP w Courier IMAP. + +%package authmysql +Summary: MySQL authentication daemon for Courier IMAP +Summary(pl): Demon autentykacji MySQL do Courier IMAP +Group: Networking/Daemons +PreReq: %{name}-common = %{version} +Requires: zlib + +%description authmysql +This package provides MySQL authentication for Courier IMAP. + +%description authmysql -l pl +Ten pakiet pozwala na korzystanie z autentykacji MySQL w Courier IMAP. + +%package authpgsql +Summary: PostgreSQL authentication daemon for Courier IMAP +Summary(pl): Demon autentykacji PostgreSQL do Courier IMAP +Group: Networking/Daemons +PreReq: %{name}-common = %{version} + +%description authpgsql +This package provides PostgreSQL authentication for Courier IMAP. + +%description authpgsql -l pl +Ten pakiet pozwala na korzystanie z autentykacji PostgreSQL w Courier +IMAP. + %prep %setup -q +%patch0 -p1 + %build -LDFLAGS="-s"; export LDFLAGS -%configure \ - --with-authvchkpw -make +%configure2_13 \ + --enable-unicode \ + --with-authchangepwdir=/var/tmp \ + --with-authdaemonvar=/var/lib/authdaemon \ + %{!?_without_mysql:--with-mysql-libs=%{_libdir} --with-mysql-includes=%{_includedir}/mysql} \ + %{?_without_mysql:--without-authmysql} \ + %{!?_without_postgresql:--with-pgsql-libs=%{_libdir} --with-pgsql-includes=%{_includedir}/postgresql} \ + %{?_without_postgresql:--without-authpgsql} \ + %{?_without_ldap:--without-authldap} + +%{__make} %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} +install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig} \ + $RPM_BUILD_ROOT{%{_sysconfdir},/var/lib/authdaemon} -make install DESTDIR=$RPM_BUILD_ROOT +%{__make} install DESTDIR=$RPM_BUILD_ROOT install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap -install %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/imap -install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap +install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-imap-pop3 +install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/authdaemon + +install %{SOURCE4} $RPM_BUILD_ROOT/etc/pam.d/imap +install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/pop3 + +install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap +install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/courier-imap-pop3 +install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/authdaemon + +rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb,authdaemon,authdaemond,authldap,authmysql}.8 \ + $RPM_BUILD_ROOT%{_sbindir}/{*db,mk*cert} + +mv -f authlib/README.authmysql.html README.authmysql.html +mv -f authlib/README.ldap README.ldap +mv -f authlib/README.authmysql.myownquery README.authmysql.myownquery +mv -f imap/README README.imap +mv -f maildir/README.maildirquota.txt README.maildirquota -mv imap/README README.imap -mv maildir/README.maildirquota.txt README.maildirquota +install authlib/authdaemonrc $RPM_BUILD_ROOT%{_sysconfdir} +install authlib/authldaprc $RPM_BUILD_ROOT%{_sysconfdir} +install authlib/authmysqlrc $RPM_BUILD_ROOT%{_sysconfdir} +install authlib/authpgsqlrc $RPM_BUILD_ROOT%{_sysconfdir} -rm -rf $RPM_BUILD_ROOT%{_mandir}/man8/{authcram,authpam,authpwd,authshadow,authuserdb,authvchkpw,pw2userdb,vchkpw2userdb}.8 +mv -f $RPM_BUILD_ROOT%{_datadir}/*db \ + $RPM_BUILD_ROOT%{_sbindir} +mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert \ + $RPM_BUILD_ROOT%{_sbindir} -echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8 -echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8 -echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8 -echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8 -echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8 -echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8 -echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8 -echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8 +mv -f tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.1 +mv -f imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8 -gzip -9nf $RPM_BUILD_ROOT%{_mandir}/*/* README* imap/BUGS AUTHORS COPYING +echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authcram.8 +echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpam.8 +echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpwd.8 +echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authshadow.8 +echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authuserdb.8 +echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authvchkpw.8 +echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemon.8 +echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authdaemond.8 +%{!?_without_pgsql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authpgsql.8} +%{!?_without_mysql:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authmysql.8} +%{!?_without_ldap:echo ".so authlib.8" >$RPM_BUILD_ROOT%{_mandir}/man8/authldap.8} +echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/pw2userdb.8 +echo ".so makeuserdb.8" >$RPM_BUILD_ROOT%{_mandir}/man8/vchkpw2userdb.8 -touch $RPM_BUILD_ROOT/etc/security/blacklist.courier-imap +gzip -9nf README* imap/BUGS AUTHORS COPYING + +touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap} + +%clean +rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add courier-imap @@ -76,23 +240,169 @@ if [ "$1" = "0" ]; then /sbin/chkconfig --del courier-imap fi -%clean -rm -rf $RPM_BUILD_ROOT +%post common +/sbin/chkconfig --add authdaemon + +if [ -f /var/lock/subsys/authdaemon ]; then + /etc/rc.d/init.d/authdaemon restart >&2 +else + echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon." +fi + +%preun common +if [ "$1" = "0" ]; then + if [ -f /var/lock/subsys/authdaemon ]; then + /etc/rc.d/init.d/authdaemon stop >&2 + fi + + /sbin/chkconfig --del authdaemon +fi + +%post pop3 +/sbin/chkconfig --add courier-imap-pop3 + +if [ -f /var/lock/subsys/courier-imap-pop3 ]; then + /etc/rc.d/init.d/courier-imap-pop3 restart >&2 +else + echo "Run \"/etc/rc.d/init.d/courier-imap-pop3 start\" to start courier-imap pop3 daemon." +fi + +%preun pop3 +if [ "$1" = "0" ]; then + if [ -f /var/lock/subsys/courier-imap-pop3 ]; then + /etc/rc.d/init.d/courier-imap-pop3 stop >&2 + fi + /sbin/chkconfig --del courier-imap-pop3 +fi + +%post authldap +METHOD=plain +. /etc/sysconfig/authdaemon +if [ "$METHOD" = "ldap" ]; then + if [ -f /var/lock/subsys/authdaemon ]; then + /etc/rc.d/init.d/authdaemon restart >&2 + else + echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon." + fi +fi + +%preun authldap +METHOD=plain +. /etc/sysconfig/authdaemon +if [ "$1" = "$0" -a "$METHOD" = "ldap" ]; then + if [ -f /var/lock/subsys/authdaemon ]; then + /etc/rc.d/init.d/authdaemon stop >&2 + fi +fi + +%post authmysql +METHOD=plain +. /etc/sysconfig/authdaemon +if [ "$METHOD" = "mysql" ]; then + if [ -f /var/lock/subsys/authdaemon ]; then + /etc/rc.d/init.d/authdaemon restart >&2 + else + echo "Run \"/etc/rc.d/init.d/authdaemon start\" to start courier-imap authdaemon." + fi +fi + +%preun authmysql +METHOD=plain +. /etc/sysconfig/authdaemon +if [ "$1" = "$0" -a "$METHOD" = "mysql" ]; then + if [ -f /var/lock/subsys/authdaemon ]; then + /etc/rc.d/init.d/authdaemon stop >&2 + fi +fi %files %defattr(644,root,root,755) -%doc {AUTHORS,COPYING,imap/BUGS,README,README.imap,README.maildirquota}.gz -%attr(640,root,root) %config %verify(not size mtime md5) /etc/pam.d/imap -%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.courier-imap +%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/imap +%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.imap %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap %attr(754,root,root) /etc/rc.d/init.d/courier-imap +%{_sysconfdir}/imapd.cnf +%attr(755,root,root) %{_bindir}/imapd +%attr(755,root,root) %{_sbindir}/imaplogin +%attr(755,root,root) %{_sbindir}/mkimapdcert +%{_mandir}/man8/imapd* + +%files common +%defattr(644,root,root,755) +%doc *.gz imap/*.gz +%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/authdaemon +%attr(754,root,root) /etc/rc.d/init.d/authdaemon +%attr(700,root,root) /var/lib/authdaemon +%attr(750,root,root) %dir %{_sysconfdir} %dir %{_libexecdir} %dir %{_libexecdir}/authlib -%attr(755,root,root) %{_bindir}/* -%attr(755,root,root) %{_sbindir}/* -%attr(755,root,root) %{_libexecdir}/authlib/* +%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authdaemonrc +%{_sysconfdir}/quotawarnmsg.example +%attr(755,root,root) %{_bindir}/couriertls +%attr(755,root,root) %{_libexecdir}/authlib/authdaemon +%attr(755,root,root) %{_libexecdir}/authlib/authdaemond.plain %attr(755,root,root) %{_libexecdir}/couriertcpd -%attr(755,root,root) %{_libexecdir}/deliverquota %attr(755,root,root) %{_libexecdir}/logger %attr(755,root,root) %{_libexecdir}/makedatprog -%{_mandir}/*/* +%{_mandir}/man8/auth[cdsuv]* +%{_mandir}/man8/authp[aw]* +%{_mandir}/man7/authlib* +%{_mandir}/man1/couriert* +%{_mandir}/man8/mk* + +%files userdb +%defattr(644,root,root,755) +%attr(755,root,root) %{_sbindir}/makeuserdb +%attr(755,root,root) %{_sbindir}/pw2userdb +%attr(755,root,root) %{_sbindir}/userdb +%attr(755,root,root) %{_sbindir}/userdbpw +%attr(755,root,root) %{_sbindir}/vchkpw2userdb +%{_mandir}/man8/makeuserdb* +%{_mandir}/man8/userdb* +%{_mandir}/man8/*pw2userdb* + +%files deliverquota +%defattr(644,root,root,755) +%attr(755,root,root) %{_libexecdir}/deliverquota +%{_mandir}/man8/deliverquota* + +%files maildirmake +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/maildirmake +%{_mandir}/man1/maildirmake* + +%files pop3 +%defattr(644,root,root,755) +%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/pam.d/pop3 +%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/security/blacklist.pop3 +%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/courier-imap-pop3 +%attr(754,root,root) /etc/rc.d/init.d/courier-imap-pop3 +%attr(755,root,root) %{_bindir}/pop3d +%attr(755,root,root) %{_sbindir}/mkpop3dcert +%attr(755,root,root) %{_sbindir}/pop3login +%{_sysconfdir}/pop3d.cnf +%{_mandir}/man8/courierpop* + +%if %{?_without_ldap:0}%{!?_without_ldap:1} +%files authldap +%defattr(644,root,root,755) +%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authldaprc +%attr(755,root,root) %{_libexecdir}/authlib/authdaemond.ldap +%{_mandir}/man8/authldap* +%endif + +%if %{?_without_mysql:0}%{!?_without_mysql:1} +%files authmysql +%defattr(644,root,root,755) +%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authmysqlrc +%attr(755,root,root) %{_libexecdir}/authlib/authdaemond.mysql +%{_mandir}/man8/authmysql* +%endif + +%if %{?_without_pgsql:0}%{!?_without_pgsql:1} +%files authpgsql +%defattr(644,root,root,755) +%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/authpgsqlrc +%attr(755,root,root) %{_libexecdir}/authlib/authdaemond.pgsql +%{_mandir}/man8/authpgsql* +%endif