imap/imap.spec

Fri, 24 Apr 2009 17:37:04 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 24 Apr 2009 17:37:04 +0200
changeset 198
8364d0b242cd
parent 197
a90827bdc01a
child 230
f4b972145c42
permissions
-rw-r--r--

Remove useless (openssl.cnf is read during build) wish directories.

     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   2007e
    26 %define       V_real   2007e
    27 %define       V_subdir 2007e
    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:      20090420
    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 Prefix:       %{l_prefix}
    54 BuildRoot:    %{l_buildroot}
    55 BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc
    56 PreReq:       OpenPKG, openpkg >= 20040130
    57 %if "%{with_pam}" == "yes"
    58 BuildPreReq:  PAM
    59 PreReq:       PAM
    60 %endif
    61 %if "%{with_ssl}" == "yes"
    62 BuildPreReq:  openssl
    63 PreReq:       openssl
    64 %endif
    65 AutoReq:      no
    66 AutoReqProv:  no
    67 %if "%{with_daemons}" == "yes"
    68 Conflicts:    imaputils
    69 %endif
    71 %description
    72     The IMAP library provides a C API for IMAP client access.
    73     It optionally contains the UW IMAP/POP3 daemons, too.
    75 %track
    76     prog imap = {
    77         version   = %{V_real}
    78         url       = ftp://ftp.cac.washington.edu/imap/
    79         regex     = imap-(\d+[a-z]?\d?)\.tar\.Z
    80     }
    82 %prep
    83     %setup -q -n imap-%{V_subdir}
    84     %patch -p0
    86 %build
    87     mflags="%{l_mflags}"
    88     cflags="%{l_cflags}"
    89     ldflags="%{l_ldflags}"
    90 %if "%{with_pam}" == "yes"
    91     case "%{l_platform -t}" in
    92         *-sunos* ) pamtype=pmb ;;
    93         *        ) pamtype=pam ;;
    94     esac
    95     mflags="$mflags PASSWDTYPE=$pamtype"
    96     cflags="$cflags -I`%{l_rc} --query pam_incdir`"
    97     ldflags="$ldflags -L`%{l_rc} --query pam_libdir`"
    98 %endif
    99 %if "%{with_mbxdef}" == "yes"
   100     mflags="$mflags CREATEPROTO=mbxproto"
   101 %endif
   102 %if "%{with_ssl}" == "yes"
   103     cflags="%{l_cppflags openssl .} $cflags"
   104     mflags="$mflags SSLDIR=%{l_prefix}/etc/openssl"
   105     mflags="$mflags SSLCERTS=%{l_prefix}/etc/openssl/certs"
   106     mflags="$mflags SSLINCLUDE=%{l_prefix}/include"
   107     mflags="$mflags SSLLIB=%{l_prefix}/lib"
   108 %else
   109     mflags="$mflags SSLTYPE=none"
   110 %endif
   111     case "%{l_platform -t}" in
   112         *-freebsd* ) os=bsf ;;
   113         *-linux*   ) os=slx ;;
   114         *-sunos*   ) os=gso ;;
   115         *-netbsd*  ) os=neb ;;
   116         *-irix*    ) os=gsg ;;
   117         *) echo "Unsupported platform %{l_platform -t}" 1>&2; exit 1 ;;
   118     esac
   119     mflags="$mflags $os"
   120     %{l_make} $mflags \
   121         EXTRACFLAGS="$cflags" \
   122         EXTRALDFLAGS="$ldflags"
   124 %install
   125     rm -rf $RPM_BUILD_ROOT
   126     %{l_shtool} mkdir -f -p -m 755 \
   127         $RPM_BUILD_ROOT%{l_prefix}/include/imap \
   128         $RPM_BUILD_ROOT%{l_prefix}/lib
   129     %{l_shtool} install -c -m 644 \
   130         c-client/*.h \
   131         c-client/linkage.c \
   132         $RPM_BUILD_ROOT%{l_prefix}/include/imap/
   133     rm -f $RPM_BUILD_ROOT%{l_prefix}/include/imap/os_*.h
   134     %{l_shtool} install -c -m 644 c-client/c-client.a \
   135         $RPM_BUILD_ROOT%{l_prefix}/lib/libimap.a
   136 %if "%{with_daemons}" == "yes"
   137     %{l_shtool} mkdir -f -p -m 755 \
   138         $RPM_BUILD_ROOT%{l_prefix}/bin \
   139         $RPM_BUILD_ROOT%{l_prefix}/sbin \
   140         $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
   141         $RPM_BUILD_ROOT%{l_prefix}/man/man8
   142     %{l_shtool} install -c -m 755 \
   143         tmail/tmail dmail/dmail mailutil/mailutil \
   144         $RPM_BUILD_ROOT%{l_prefix}/bin/
   145     %{l_shtool} install -c -m 755 \
   146         imapd/imapd ipopd/ipop3d \
   147         $RPM_BUILD_ROOT%{l_prefix}/sbin/
   148     %{l_shtool} install -c -m 644 \
   149         src/tmail/tmail.1 src/dmail/dmail.1 src/mailutil/mailutil.1 \
   150         $RPM_BUILD_ROOT%{l_prefix}/man/man1/
   151     %{l_shtool} install -c -m 644 \
   152         src/imapd/imapd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/imapd.8
   153     %{l_shtool} install -c -m 644 \
   154         src/ipopd/ipopd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/ipopd.8
   155 %endif
   157     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   159 %files -f files
   161 %clean
   162     rm -rf $RPM_BUILD_ROOT

mercurial