imap/imap.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 230
f4b972145c42
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

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

mercurial