OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   31-May-2007 15:27:45
  Branch: HEAD                             Handle: 2007053114274500

  Modified files:
    openpkg-src/imapd       imapd.spec

  Log:
    IMAP METADATA Extension and other requirements for Kolab; packaging
    work motivated by the Kolab-Konsortium

  Summary:
    Revision    Changes     Path
    1.174       +68 -8      openpkg-src/imapd/imapd.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/imapd/imapd.spec
  ============================================================================
  $ cvs diff -u -r1.173 -r1.174 imapd.spec
  --- openpkg-src/imapd/imapd.spec      6 May 2007 22:17:10 -0000       1.173
  +++ openpkg-src/imapd/imapd.spec      31 May 2007 13:27:45 -0000      1.174
  @@ -33,17 +33,32 @@
   Group:        Mail
   License:      BSD
   Version:      2.3.8
  -Release:      20070507
  +Release:      20070531
   
   #   package options
   %option       with_fsl           yes
   %option       with_group         no
  +%option       with_group_igncase no
   %option       with_atvdom        no
   %option       with_drac          no
   %option       with_replication   no
   %option       with_murder        no
   %option       with_listext       no
   %option       with_nntp          no
  +%option       with_ldap          no
  +%option       with_annotate      no
  +%option       with_morelogging   no
  +%option       with_kolab         no
  +
  +#   fixing implicit inter-module dependencies and correlations
  +%if "%{with_kolab}" == "yes"
  +%undefine     with_group_igncase
  +%undefine     with_ldap
  +%undefine     with_annotate
  +%define       with_group_igncase yes
  +%define       with_ldap          yes
  +%define       with_annotate      yes
  +%endif
   
   #   list of sources
   Source0:      
ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-%{version}.tar.gz
  @@ -53,6 +68,11 @@
   Source4:      fsl.imapd
   Patch0:       imapd.patch
   Patch1:       imapd.patch.group
  +Patch2:       http://vman.de/cyrus/TV-annotation-definitions.diff
  +Patch3:       
http://projects.pardus.de/kolab/browser/ebuilds-2.1/net-mail/cyrus-imap-admin/files/cyrus-imap-admin-2.3.7-cyradm.patch?format=raw
  +Patch4:       
http://projects.pardus.de/kolab/browser/ebuilds-2.1/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.7-morelogging.patch?format=raw
  +Patch5:       
http://projects.pardus.de/kolab/browser/ebuilds-2.1/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.7-kolab.patch?format=raw
  +Patch6:       
http://projects.pardus.de/kolab/browser/ebuilds-2.1/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.7-goodchars.patch?format=raw
   
   #   build information
   Prefix:       %{l_prefix}
  @@ -65,6 +85,10 @@
   BuildPreReq:  fsl >= 1.2.0
   PreReq:       fsl >= 1.2.0
   %endif
  +%if "%{with_ldap}" == "yes"
  +BuildPreReq:  openldap >= 2.2.14
  +PreReq:       openldap >= 2.2.14
  +%endif
   %if "%{with_drac}" == "yes"
   BuildPreReq:  drac
   PreReq:       drac
  @@ -94,23 +118,49 @@
       #   upgrade config scripts for better platform support
       %{l_prefix}/bin/config install
   
  -    #   add optional group file support
  +    #   add optional group file support with support to ignore case
   %if "%{with_group}" == "yes"
  -    %patch -p0 -P 1
  +    cp %{PATCH imapd.patch.group} imapd.patch.group
  +%if "%{with_group_igncase}" == "yes"
  +    %{l_shtool} subst -e 's;^\(\+.*\)strcmp;\1strcasecmp;' imapd.patch.group
  +%endif
  +    %{l_patch} -p0 <imapd.patch.group
       %{l_shtool} subst \
           -e 's;/etc/imapd\.group;%{l_prefix}/etc/imapd/imapd.group;' \
           lib/auth_unix.c
   %endif
   
  +    #   add optional folder annotation support
  +%if "%{with_annotate}" == "yes"
  +    sed <%{PATCH2} -e '3,25d' | %{l_patch} -p1
  +    %patch -p1 -P 3
  +%endif
  +
  +    #   add optional support for extended logging
  +%if "%{with_morelogging}" == "yes"
  +     %patch -p1 -P 4
  +%endif
  +
  +    #   add optional support for ldap
  +%if "%{with_ldap}" == "yes"
  +    %{l_shtool} subst -e 's;\(IMAP_LIBS="${LIB_SASL}\) \(.*"\);\1 -lldap 
-llber \2;g' configure
  +%endif
  +
  +    #   add optional kolab specific stuff for ldap and goodchars
  +%if "%{with_kolab}" == "yes"
  +     sed <%{PATCH5} -e '1,12d' -e '/cyrus-imapd-2.3.7\/lib\/imapopts.c/,$d' 
| %{l_patch} -p1
  +     %patch -p1 -P 6
  +%endif
  +
       #   add optional DRAC file support
   %if "%{with_drac}" == "yes"
       %{l_shtool} subst -e 's;@DRACLIBS@;-ldrac;g' contrib/drac_auth.patch
       %{l_patch} -p0 <contrib/drac_auth.patch
  -    sleep 1
  -    touch configure lib/imapoptions
  -    rm -f lib/imapopts.[ch]
   %endif
   
  +    #   make sure config2header rebuilds imapopts based on imapoptions
  +    rm -f lib/imapopts.h lib/imapopts.c >/dev/null 2>&1 || true
  +
       #   ensure local et/com_err can be found
       %{l_shtool} subst -s \
           -e 's;#include <et/com_err.h>;#include "et/com_err.h";' \
  @@ -118,10 +168,11 @@
           sieve/sieve_err.h config.h.in configure
   
       #   fix Berkeley-DB detection
  -    %{l_shtool} subst \
  +    %{l_shtool} subst\
           -e 's;-L/usr/local/lib;;g' \
           -e 's;-I/usr/local/include;;g' \
  -        -e 's;db-4.4;db;g' \
  +        -e 's;db-4\.[0-9];db;g' \
  +        -e 's;-l\$dbname;%{l_prefix}/lib/lib$dbname.a;g' \
           configure
   
       #   ensure correct linking of Berkeley-DB in perl bindings
  @@ -167,6 +218,12 @@
           -e '/alt_config/s;"deliver";"cyrdeliver";' \
           imap/deliver.c
   
  +    #   avoid name clash with postfix
  +    %{l_shtool} subst \
  +        -e '/snprintf(buf, sizeof(buf), 
"%s/s;/reconstruct";/cyrreconstruct";' \
  +        -e '/snprintf(buf, sizeof(buf), "%s/s;/quota";/cyrquota";' \
  +        imap/imapd.c
  +
       #   fix up man pages
       %{l_shtool} subst \
           -e 's;\(\\fB\|\.B 
\)/etc/\(cyrus.conf\|imapd.conf\);\1%{l_prefix}/etc/imapd/\2;g' \
  @@ -220,6 +277,9 @@
           --with-cyrus-user=%{l_rusr} \
           --with-cyrus-group=%{l_rgrp} \
           --with-pidfile=%{l_prefix}/var/imapd/cyrmaster.pid \
  +%if "%{with_ldap}" == "yes"
  +        --with-ldap=%{l_prefix} \
  +%endif
   %if "%{with_replication}" == "yes"
           --enable-replication \
   %endif
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to