X-Git-Url: http://git.pld-linux.org/?p=packages%2Fcourier-imap.git;a=blobdiff_plain;f=courier-imap.spec;h=bc9615045dab40b0d3fc963e59789a61f12458cf;hp=49f9c556f1893b217a3fc6f4348c49ea80f524f1;hb=HEAD;hpb=4764c7474b704de2f557584694564cb941bd44c1 diff --git a/courier-imap.spec b/courier-imap.spec index 49f9c55..943c76d 100644 --- a/courier-imap.spec +++ b/courier-imap.spec @@ -2,18 +2,25 @@ # - 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 +# - Review -toplevel.patch # +# Conditional build: %bcond_with toplevel # Allow toplevel folders. More info: http://www.ricky-chan.co.uk/courier/ -# +%bcond_without fam # FAM for enhanced IMAP IDLE and locking +%bcond_with gnutls # GnuTLS instead of OpenSSL +%bcond_with socks # (Courier) Socks support + Summary: Courier-IMAP server Summary(pl.UTF-8): Serwer Courier-IMAP Name: courier-imap -Version: 4.3.1 -Release: 2 -License: GPL +Version: 5.2.2 +Release: 1 +License: GPL v3 with OpenSSL exception Group: Networking/Daemons -Source0: http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2 -# Source0-md5: 6e25e51faeec55a695242679311b595f +Source0: https://downloads.sourceforge.net/courier/%{name}-%{version}.tar.bz2 +# Source0-md5: 7f210160a19ec973ea39d9ef32e25053 Source1: %{name}.init Source2: %{name}-ssl.init Source3: %{name}-pop3.init @@ -25,16 +32,24 @@ Patch1: %{name}-certsdir.patch Patch2: %{name}-maildir.patch Patch3: %{name}-toplevel.patch Patch4: %{name}-drop-makedat.patch -Patch5: %{name}-link.patch +Patch5: %{name}-disable-courierlogger-check.patch URL: http://www.courier-mta.org/imap/ -BuildRequires: autoconf >= 2.54 +BuildRequires: autoconf >= 2.59 BuildRequires: automake -BuildRequires: courier-authlib-devel >= 0.59 +BuildRequires: courier-authlib-devel >= 0.71.0 +%{?with_socks:BuildRequires: courier-sox-devel} +BuildRequires: courier-unicode-devel >= 2.1 BuildRequires: db-devel -BuildRequires: fam-devel +BuildRequires: libidn2-devel >= 0.0.0 +%{?with_fam:BuildRequires: gamin-devel} +%{?with_gnutls:BuildRequires: gnutls-devel >= 3.0} +%{?with_gnutls:BuildRequires: libgcrypt-devel} +%{?with_gnutls:BuildRequires: libgpg-error-devel} BuildRequires: libstdc++-devel -BuildRequires: libtool -BuildRequires: openssl-devel >= 0.9.7d +BuildRequires: libtool >= 2:2 +%{!?with_gnutls:BuildRequires: openssl-devel >= 0.9.7d} +BuildRequires: perl-base +BuildRequires: pkgconfig BuildRequires: procps BuildRequires: rpmbuild(macros) >= 1.268 BuildRequires: sed >= 4.0 @@ -42,6 +57,7 @@ BuildRequires: sysconftool Requires(post,preun): /sbin/chkconfig Requires: %{name}-common = %{version}-%{release} Requires: /sbin/chkconfig +Requires: courier-unicode >= 2.1 Requires: pam >= 0.79.0 Requires: rc-scripts Provides: imapdaemon @@ -50,7 +66,6 @@ Conflicts: cyrus-imapd Conflicts: imap BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _libexecdir /usr/%{_lib}/courier-imap %define _sysconfdir /etc/courier-imap %define _certsdir %{_sysconfdir}/certs %define _localstatedir /var/spool/courier-imap @@ -67,9 +82,12 @@ Summary(pl.UTF-8): Pliki wspólne dla serwerów imap i pop3 Group: Networking/Daemons Requires(post,preun): /sbin/chkconfig Requires: /sbin/chkconfig -Requires: courier-authlib +# even if using OpenSSL libraries, Courier uses certtool from GnuTLS +Requires: /usr/bin/certtool +Requires: courier-authlib >= 0.71.0 Requires: procps Requires: rc-scripts +Conflicts: maildrop < 3 %description common Common files for imap and pop3 daemons. @@ -106,7 +124,7 @@ formacie Maildir. %package pop3 Summary: Courier-IMAP POP3 Server Summary(pl.UTF-8): Serwer Courier-IMAP POP3 -Group: Networking/Daemons +Group: Networking/Daemons/POP3 Requires: %{name}-common = %{version}-%{release} Requires: pam >= 0.79.0 Provides: pop3daemon @@ -133,39 +151,46 @@ Courier-IMAP POP3 jest serwerem POP3 dla skrzynek pocztowych Maildir. %patch4 -p1 %patch5 -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 +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 %build - +%{__libtoolize} # Change Makefile.am files and force recreate Makefile.in's. -find -type f -a '(' -name configure.in -o -name configure.ac ')' | while read FILE; do +find -type f -a -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 + %{__sed} -i -e '/_[L]DFLAGS=-static/d' Makefile.am - %{__libtoolize} %{__aclocal} %{__autoconf} - %{__autoheader} + if grep -q AC_CONFIG_HEADER configure.ac; then + %{__autoheader} + fi %{__automake} cd - done %configure \ - --with-db=db \ + CERTOOL=/usr/bin/certtool \ +%if %{without fam} + ac_cv_header_fam_h=no \ + ac_cv_lib_fam_FAMOpen=no \ +%endif + --libexecdir=%{_libexecdir}/courier-imap \ --enable-unicode \ --with-authchangepwdir=/var/tmp \ --with-certsdir=%{_certsdir} \ - --with-mailer=/usr/lib/sendmail + --with-db=db \ + %{?with_gnutls:--with-gnutls} \ + --with-mailer=/usr/lib/sendmail \ + --with-notice=unicode \ + %{!?with_socks:--without-socks} -%{__make} +%{__make} -j1 %install rm -rf $RPM_BUILD_ROOT @@ -174,23 +199,20 @@ install -d $RPM_BUILD_ROOT{/etc/{pam.d,rc.d/init.d,security},%{_certsdir}} %{__make} -j1 install \ DESTDIR=$RPM_BUILD_ROOT -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 - -rm -rf $RPM_BUILD_ROOT%{_sbindir}/mk*cert +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 +# install directly instead of symlinking +%{__rm} $RPM_BUILD_ROOT%{_sbindir}/mk{dhparams,imapdcert,pop3dcert} +%{__mv} $RPM_BUILD_ROOT%{_datadir}/mk{dhparams,imapdcert,pop3dcert} $RPM_BUILD_ROOT%{_sbindir} -mv -f $RPM_BUILD_ROOT%{_datadir}/mk*cert $RPM_BUILD_ROOT%{_sbindir} - -install tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man8/couriertls.8 -install imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8/courierpop3d.8 +# missing from make install +cp -p libs/imap/courierpop3d.8 $RPM_BUILD_ROOT%{_mandir}/man8 +cp -p libs/tcpd/couriertls.1 $RPM_BUILD_ROOT%{_mandir}/man1 touch $RPM_BUILD_ROOT/etc/security/blacklist.{pop3,imap} touch $RPM_BUILD_ROOT%{_sysconfdir}/shared/index @@ -203,7 +225,7 @@ sed -i 's/^POP3DSTART.*/POP3DSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/pop3d sed -i 's/^IMAPDSTART.*/IMAPDSTART=YES/' $RPM_BUILD_ROOT%{_sysconfdir}/imapd # remove unpackaged files -rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.dist +%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/*.dist %clean rm -rf $RPM_BUILD_ROOT @@ -226,7 +248,8 @@ if [ "$1" = "0" ]; then fi -%triggerin -- %{name} < 3.0.5 +%triggerin -- %{name} < 3.0.6 +# 3.0.5 if [ -f /var/lib/openssl/certs/imapd.pem ]; then echo echo imapd.pem has been moved automatically to %{_certsdir} @@ -252,7 +275,7 @@ if [ -f /etc/sysconfig/courier-imap ]; then fi %service -q courier-imap restart -%triggerin -- %{name} < 3.0.6 +# 3.0.6 . %{_sysconfdir}/imapd-ssl if [ $TLS_CACHEFILE = "/var/couriersslcache" ]; then sed -i s/^TLS_CACHEFILE=.*/"TLS_CACHEFILE=\/var\/spool\/courier-imap\/couriersslcache"/ %{_sysconfdir}/imapd-ssl @@ -276,10 +299,16 @@ if [ -f /etc/sysconfig/authdaemon ]; then fi echo echo Changes to version 3.0.5 : -echo - config files has been splited and moved to %{_sysconfdir} +echo - config files has been split and moved to %{_sysconfdir} echo - certificates directory has changed to %{_certsdir} echo +%triggerpostun common -- %{name}-common < 5 +%banner -e courier-imap-unicode <