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

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   27-May-2004 08:38:34
  Branch: HEAD                             Handle: 2004052707383300

  Modified files:
    openpkg-src/imap        imap.spec

  Log:
    Add optional PAM support and installation of daemons (they are build
    always anyway). Also cleanup the flags processing.
    
    Submitted partly by: Darrell Fuhriman

  Summary:
    Revision    Changes     Path
    1.26        +67 -8      openpkg-src/imap/imap.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/imap/imap.spec
  ============================================================================
  $ cvs diff -u -r1.25 -r1.26 imap.spec
  --- openpkg-src/imap/imap.spec        13 May 2004 18:21:53 -0000      1.25
  +++ openpkg-src/imap/imap.spec        27 May 2004 06:38:33 -0000      1.26
  @@ -38,7 +38,13 @@
   Group:        Mail
   License:      University of Washington's Free-Fork License
   Version:      %{V_here}
  -Release:      20040513
  +Release:      20040527
  +
  +#   package options
  +%option       with_ssl      yes
  +%option       with_pam      no
  +%option       with_daemons  no
  +%option       with_mbxdef   no
   
   #   list of sources
   Source0:      ftp://ftp.cac.washington.edu/imap/imap-%{V_real}.tar.Z
  @@ -46,13 +52,25 @@
   #   build information
   Prefix:       %{l_prefix}
   BuildRoot:    %{l_buildroot}
  -BuildPreReq:  OpenPKG, openpkg >= 20040130, openssl, gcc
  -PreReq:       OpenPKG, openpkg >= 20040130, openssl
  +BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc
  +PreReq:       OpenPKG, openpkg >= 20040130
  +%if "%{with_pam}" == "yes"
  +BuildPreReq:  PAM
  +PreReq:       PAM
  +%endif
  +%if "%{with_ssl}" == "yes"
  +BuildPreReq:  openssl
  +PreReq:       openssl
  +%endif
   AutoReq:      no
   AutoReqProv:  no
  +%if "%{with_daemons}" == "yes"
  +Conflicts:    imaputils
  +%endif
   
   %description
       The IMAP library provides a C API for IMAP client access.
  +    It optionally contains the UW IMAP/POP3 daemons, too.
   
   %track
       prog imap = {
  @@ -65,7 +83,27 @@
       %setup -q -n imap-%{V_real}
   
   %build
  -    os=""
  +    mflags="%{l_mflags}"
  +    cflags="%{l_cflags}"
  +    ldflags="%{l_ldflags}"
  +%if "%{with_pam}" == "yes"
  +    case "%{l_platform -t}" in
  +        *-sunos* ) pamtype=pmb ;;
  +        *        ) pamtype=pam ;;
  +    esac
  +    mflags="$mflags PASSWDTYPE=$pamtype"
  +    cflags="$cflags -I`%{l_prefix}/etc/rc --query pam_incdir`"
  +    ldflags="$ldflags -L`%{l_prefix}/etc/rc --query pam_libdir`"
  +%endif
  +%if "%{with_mbxdef}" == "yes"
  +    mflags="$mflags CREATEPROTO=mbxproto"
  +%endif
  +%if "%{with_ssl}" == "yes"
  +    cflags="%{l_cppflags openssl .} $cflags"
  +    mflags="$mflags SSLDIR=%{l_prefix}/etc/openssl"
  +%else
  +    mflags="$mflags SSLTYPE=none"
  +%endif
       case "%{l_platform -t}" in
           *-freebsd* ) os=bsf ;;
           *-linux*   ) os=slx ;;
  @@ -73,10 +111,10 @@
           *-irix*    ) os=gsg ;;
           *) echo "Unsupported platform %{l_platform -t}" 1>&2; exit 1 ;;
       esac
  -    %{l_make} $os \
  -        SSLDIR=%{l_prefix} \
  -        EXTRACFLAGS='%{l_cppflags openssl}' \
  -        EXTRALDFLAGS='%{l_ldflags}'
  +    mflags="$mflags $os"
  +    %{l_make} $mflags \
  +        EXTRACFLAGS="$cflags" \
  +        EXTRALDFLAGS="$ldflags"
   
   %install
       rm -rf $RPM_BUILD_ROOT
  @@ -90,6 +128,27 @@
       rm -f $RPM_BUILD_ROOT%{l_prefix}/include/imap/os_*.h
       %{l_shtool} install -c -m 644 c-client/c-client.a \
           $RPM_BUILD_ROOT%{l_prefix}/lib/libimap.a
  +%if "%{with_daemons}" == "yes"
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/bin \
  +        $RPM_BUILD_ROOT%{l_prefix}/sbin \
  +        $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  +        $RPM_BUILD_ROOT%{l_prefix}/man/man8
  +    %{l_shtool} install -c -m 755 \
  +        tmail/tmail dmail/dmail mailutil/mailutil \
  +        $RPM_BUILD_ROOT%{l_prefix}/bin/
  +    %{l_shtool} install -c -m 755 \
  +        imapd/imapd ipopd/ipop3d \
  +        $RPM_BUILD_ROOT%{l_prefix}/sbin/
  +    %{l_shtool} install -c -m 644 \
  +        src/tmail/tmail.1 src/dmail/dmail.1 src/mailutil/mailutil.1 \
  +        $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  +    %{l_shtool} install -c -m 644 \
  +        src/imapd/imapd.8c $RPM_BUILD_ROOT%{l_prefix}/man/man8/imapd.8
  +    %{l_shtool} install -c -m 644 \
  +        src/ipopd/ipopd.8c $RPM_BUILD_ROOT%{l_prefix}/man/man8/ipopd.8
  +%endif
  +
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   
   %files -f files
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to