Fri, 24 Apr 2009 15:32:30 +0200
Import package vendor original specs for necessary manipulations.
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@196 | 25 | %define V_here 2007e |
michael@196 | 26 | %define V_real 2007e |
michael@196 | 27 | %define V_subdir 2007e |
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@196 | 40 | Release: 20081218 |
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 | %option with_annotate no |
michael@196 | 48 | |
michael@196 | 49 | # list of sources |
michael@196 | 50 | # (ping p@rdus.de if the Kolab patches are unavailable for the latest IMAP version) |
michael@196 | 51 | Source0: ftp://ftp.cac.washington.edu/imap/imap-%{V_real}.tar.Z |
michael@196 | 52 | Patch0: imap.patch |
michael@196 | 53 | Patch1: http://kolab.org/cgi-bin/viewcvs-kolab.cgi/*checkout*/server/patches/imap/KOLAB_imap-c-client_2006j2_Annotations.patch |
michael@196 | 54 | |
michael@196 | 55 | # build information |
michael@196 | 56 | Prefix: %{l_prefix} |
michael@196 | 57 | BuildRoot: %{l_buildroot} |
michael@196 | 58 | BuildPreReq: OpenPKG, openpkg >= 20040130, gcc |
michael@196 | 59 | PreReq: OpenPKG, openpkg >= 20040130 |
michael@196 | 60 | %if "%{with_pam}" == "yes" |
michael@196 | 61 | BuildPreReq: PAM |
michael@196 | 62 | PreReq: PAM |
michael@196 | 63 | %endif |
michael@196 | 64 | %if "%{with_ssl}" == "yes" |
michael@196 | 65 | BuildPreReq: openssl |
michael@196 | 66 | PreReq: openssl |
michael@196 | 67 | %endif |
michael@196 | 68 | AutoReq: no |
michael@196 | 69 | AutoReqProv: no |
michael@196 | 70 | %if "%{with_daemons}" == "yes" |
michael@196 | 71 | Conflicts: imaputils |
michael@196 | 72 | %endif |
michael@196 | 73 | |
michael@196 | 74 | %description |
michael@196 | 75 | The IMAP library provides a C API for IMAP client access. |
michael@196 | 76 | It optionally contains the UW IMAP/POP3 daemons, too. |
michael@196 | 77 | |
michael@196 | 78 | %track |
michael@196 | 79 | prog imap = { |
michael@196 | 80 | version = %{V_real} |
michael@196 | 81 | url = ftp://ftp.cac.washington.edu/imap/ |
michael@196 | 82 | regex = imap-(\d+[a-z]?\d?)\.tar\.Z |
michael@196 | 83 | } |
michael@196 | 84 | |
michael@196 | 85 | %prep |
michael@196 | 86 | %setup -q -n imap-%{V_subdir} |
michael@196 | 87 | %patch -p0 |
michael@196 | 88 | %if "%{with_annotate}" == "yes" |
michael@196 | 89 | %patch -p1 -P 1 |
michael@196 | 90 | %endif |
michael@196 | 91 | |
michael@196 | 92 | %build |
michael@196 | 93 | mflags="%{l_mflags}" |
michael@196 | 94 | cflags="%{l_cflags}" |
michael@196 | 95 | ldflags="%{l_ldflags}" |
michael@196 | 96 | %if "%{with_pam}" == "yes" |
michael@196 | 97 | case "%{l_platform -t}" in |
michael@196 | 98 | *-sunos* ) pamtype=pmb ;; |
michael@196 | 99 | * ) pamtype=pam ;; |
michael@196 | 100 | esac |
michael@196 | 101 | mflags="$mflags PASSWDTYPE=$pamtype" |
michael@196 | 102 | cflags="$cflags -I`%{l_rc} --query pam_incdir`" |
michael@196 | 103 | ldflags="$ldflags -L`%{l_rc} --query pam_libdir`" |
michael@196 | 104 | %endif |
michael@196 | 105 | %if "%{with_mbxdef}" == "yes" |
michael@196 | 106 | mflags="$mflags CREATEPROTO=mbxproto" |
michael@196 | 107 | %endif |
michael@196 | 108 | %if "%{with_ssl}" == "yes" |
michael@196 | 109 | cflags="%{l_cppflags openssl .} $cflags" |
michael@196 | 110 | mflags="$mflags SSLDIR=%{l_prefix}/etc/openssl" |
michael@196 | 111 | %else |
michael@196 | 112 | mflags="$mflags SSLTYPE=none" |
michael@196 | 113 | %endif |
michael@196 | 114 | case "%{l_platform -t}" in |
michael@196 | 115 | *-freebsd* ) os=bsf ;; |
michael@196 | 116 | *-linux* ) os=slx ;; |
michael@196 | 117 | *-sunos* ) os=gso ;; |
michael@196 | 118 | *-netbsd* ) os=neb ;; |
michael@196 | 119 | *-irix* ) os=gsg ;; |
michael@196 | 120 | *) echo "Unsupported platform %{l_platform -t}" 1>&2; exit 1 ;; |
michael@196 | 121 | esac |
michael@196 | 122 | mflags="$mflags $os" |
michael@196 | 123 | %{l_make} $mflags \ |
michael@196 | 124 | EXTRACFLAGS="$cflags" \ |
michael@196 | 125 | EXTRALDFLAGS="$ldflags" |
michael@196 | 126 | |
michael@196 | 127 | %install |
michael@196 | 128 | rm -rf $RPM_BUILD_ROOT |
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 | rm -rf $RPM_BUILD_ROOT |
michael@196 | 166 |