imap/imap.spec

Mon, 17 Sep 2012 19:10:10 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 17 Sep 2012 19:10:10 +0200
changeset 689
9fe04d4d4e5a
parent 230
f4b972145c42
permissions
-rw-r--r--

Update to new version of vendor software although Oracle fails to deliver.
More specifically, newer db(3) patch revisions exist but Oracle has
removed them from the canonical download server URI for Berkely DB.

     1 ##
     2 ##  imap.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package version
    25 %define       V_here   2007f
    26 %define       V_real   2007f
    27 %define       V_subdir 2007f
    29 #   package information
    30 Name:         imap
    31 Summary:      The IMAP Library
    32 URL:          http://www.washington.edu/imap/
    33 Vendor:       University of Washington
    34 Packager:     OpenPKG Foundation e.V.
    35 Distribution: OpenPKG Community
    36 Class:        BASE
    37 Group:        Mail
    38 License:      University of Washington's Free-Fork License
    39 Version:      %{V_here}
    40 Release:      20120800
    42 #   package options
    43 %option       with_ssl      yes
    44 %option       with_pam      no
    45 %option       with_daemons  no
    46 %option       with_mbxdef   no
    48 #   list of sources
    49 Source0:      ftp://ftp.cac.washington.edu/imap/imap-%{V_real}.tar.Z
    50 Patch0:       imap.patch
    52 #   build information
    53 BuildPreReq:  OpenPKG, openpkg >= 20100101, gcc
    54 PreReq:       OpenPKG, openpkg >= 20100101
    55 %if "%{with_pam}" == "yes"
    56 BuildPreReq:  PAM
    57 PreReq:       PAM
    58 %endif
    59 %if "%{with_ssl}" == "yes"
    60 BuildPreReq:  openssl
    61 PreReq:       openssl
    62 %endif
    63 %if "%{with_daemons}" == "yes"
    64 Conflicts:    imaputils
    65 %endif
    67 %description
    68     The IMAP library provides a C API for IMAP client access.
    69     It optionally contains the UW IMAP/POP3 daemons, too.
    71 %track
    72     prog imap = {
    73         version   = %{V_real}
    74         url       = ftp://ftp.cac.washington.edu/imap/
    75         regex     = imap-(\d+[a-z]?\d?)\.tar\.Z
    76     }
    78 %prep
    79     %setup -q -n imap-%{V_subdir}
    80     %patch -p0
    81     case "%{l_platform -t}" in
    82         *-sunos* )
    83             %{l_shtool} subst \
    84                 -e 's;dd_fd;d_fd;g' \
    85                 src/osdep/unix/scandir.c
    86             ;;
    87     esac
    89 %build
    90     mflags="%{l_mflags}"
    91     cflags="%{l_cflags}"
    92     ldflags="%{l_ldflags}"
    93 %if "%{with_pam}" == "yes"
    94     case "%{l_platform -t}" in
    95         *-sunos* ) pamtype=pmb ;;
    96         *        ) pamtype=pam ;;
    97     esac
    98     mflags="$mflags PASSWDTYPE=$pamtype"
    99     cflags="$cflags -I`%{l_rc} --query pam_incdir`"
   100     ldflags="$ldflags -L`%{l_rc} --query pam_libdir`"
   101 %endif
   102 %if "%{with_mbxdef}" == "yes"
   103     mflags="$mflags CREATEPROTO=mbxproto"
   104 %endif
   105 %if "%{with_ssl}" == "yes"
   106     cflags="%{l_cppflags openssl .} $cflags"
   107     mflags="$mflags SSLDIR=%{l_prefix}/etc/openssl"
   108     mflags="$mflags SSLCERTS=%{l_prefix}/etc/openssl/certs"
   109     mflags="$mflags SSLKEYS=%{l_prefix}/etc/openssl/private"
   110     mflags="$mflags SSLINCLUDE=%{l_prefix}/include"
   111     mflags="$mflags SSLLIB=%{l_prefix}/lib"
   112 %else
   113     mflags="$mflags SSLTYPE=none"
   114 %endif
   115     case "%{l_platform -t}" in
   116         *-freebsd* ) os=bsf ;;
   117         *-linux*   ) os=slx ;;
   118         *-sunos*   ) os=gso ;;
   119         *-netbsd*  ) os=neb ;;
   120         *-irix*    ) os=gsg ;;
   121         *) echo "Unsupported platform %{l_platform -t}" 1>&2; exit 1 ;;
   122     esac
   123     mflags="$mflags $os"
   124     %{l_make} $mflags \
   125         EXTRACFLAGS="$cflags" \
   126         EXTRALDFLAGS="$ldflags"
   128 %install
   129     %{l_shtool} mkdir -f -p -m 755 \
   130         $RPM_BUILD_ROOT%{l_prefix}/include/imap \
   131         $RPM_BUILD_ROOT%{l_prefix}/lib
   132     %{l_shtool} install -c -m 644 \
   133         c-client/*.h \
   134         c-client/linkage.c \
   135         $RPM_BUILD_ROOT%{l_prefix}/include/imap/
   136     rm -f $RPM_BUILD_ROOT%{l_prefix}/include/imap/os_*.h
   137     %{l_shtool} install -c -m 644 c-client/c-client.a \
   138         $RPM_BUILD_ROOT%{l_prefix}/lib/libimap.a
   139 %if "%{with_daemons}" == "yes"
   140     %{l_shtool} mkdir -f -p -m 755 \
   141         $RPM_BUILD_ROOT%{l_prefix}/bin \
   142         $RPM_BUILD_ROOT%{l_prefix}/sbin \
   143         $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
   144         $RPM_BUILD_ROOT%{l_prefix}/man/man8
   145     %{l_shtool} install -c -m 755 \
   146         tmail/tmail dmail/dmail mailutil/mailutil \
   147         $RPM_BUILD_ROOT%{l_prefix}/bin/
   148     %{l_shtool} install -c -m 755 \
   149         imapd/imapd ipopd/ipop3d \
   150         $RPM_BUILD_ROOT%{l_prefix}/sbin/
   151     %{l_shtool} install -c -m 644 \
   152         src/tmail/tmail.1 src/dmail/dmail.1 src/mailutil/mailutil.1 \
   153         $RPM_BUILD_ROOT%{l_prefix}/man/man1/
   154     %{l_shtool} install -c -m 644 \
   155         src/imapd/imapd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/imapd.8
   156     %{l_shtool} install -c -m 644 \
   157         src/ipopd/ipopd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/ipopd.8
   158 %endif
   160     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   162 %files -f files
   164 %clean

mercurial