1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/imap/imap.spec Fri Apr 24 15:32:30 2009 +0200 1.3 @@ -0,0 +1,166 @@ 1.4 +## 1.5 +## imap.spec -- OpenPKG RPM Package Specification 1.6 +## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## 1.8 +## Permission to use, copy, modify, and distribute this software for 1.9 +## any purpose with or without fee is hereby granted, provided that 1.10 +## the above copyright notice and this permission notice appear in all 1.11 +## copies. 1.12 +## 1.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 1.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 1.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 1.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 1.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 1.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 1.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1.24 +## SUCH DAMAGE. 1.25 +## 1.26 + 1.27 +# package version 1.28 +%define V_here 2007e 1.29 +%define V_real 2007e 1.30 +%define V_subdir 2007e 1.31 + 1.32 +# package information 1.33 +Name: imap 1.34 +Summary: The IMAP Library 1.35 +URL: http://www.washington.edu/imap/ 1.36 +Vendor: University of Washington 1.37 +Packager: OpenPKG Foundation e.V. 1.38 +Distribution: OpenPKG Community 1.39 +Class: BASE 1.40 +Group: Mail 1.41 +License: University of Washington's Free-Fork License 1.42 +Version: %{V_here} 1.43 +Release: 20081218 1.44 + 1.45 +# package options 1.46 +%option with_ssl yes 1.47 +%option with_pam no 1.48 +%option with_daemons no 1.49 +%option with_mbxdef no 1.50 +%option with_annotate no 1.51 + 1.52 +# list of sources 1.53 +# (ping p@rdus.de if the Kolab patches are unavailable for the latest IMAP version) 1.54 +Source0: ftp://ftp.cac.washington.edu/imap/imap-%{V_real}.tar.Z 1.55 +Patch0: imap.patch 1.56 +Patch1: http://kolab.org/cgi-bin/viewcvs-kolab.cgi/*checkout*/server/patches/imap/KOLAB_imap-c-client_2006j2_Annotations.patch 1.57 + 1.58 +# build information 1.59 +Prefix: %{l_prefix} 1.60 +BuildRoot: %{l_buildroot} 1.61 +BuildPreReq: OpenPKG, openpkg >= 20040130, gcc 1.62 +PreReq: OpenPKG, openpkg >= 20040130 1.63 +%if "%{with_pam}" == "yes" 1.64 +BuildPreReq: PAM 1.65 +PreReq: PAM 1.66 +%endif 1.67 +%if "%{with_ssl}" == "yes" 1.68 +BuildPreReq: openssl 1.69 +PreReq: openssl 1.70 +%endif 1.71 +AutoReq: no 1.72 +AutoReqProv: no 1.73 +%if "%{with_daemons}" == "yes" 1.74 +Conflicts: imaputils 1.75 +%endif 1.76 + 1.77 +%description 1.78 + The IMAP library provides a C API for IMAP client access. 1.79 + It optionally contains the UW IMAP/POP3 daemons, too. 1.80 + 1.81 +%track 1.82 + prog imap = { 1.83 + version = %{V_real} 1.84 + url = ftp://ftp.cac.washington.edu/imap/ 1.85 + regex = imap-(\d+[a-z]?\d?)\.tar\.Z 1.86 + } 1.87 + 1.88 +%prep 1.89 + %setup -q -n imap-%{V_subdir} 1.90 + %patch -p0 1.91 +%if "%{with_annotate}" == "yes" 1.92 + %patch -p1 -P 1 1.93 +%endif 1.94 + 1.95 +%build 1.96 + mflags="%{l_mflags}" 1.97 + cflags="%{l_cflags}" 1.98 + ldflags="%{l_ldflags}" 1.99 +%if "%{with_pam}" == "yes" 1.100 + case "%{l_platform -t}" in 1.101 + *-sunos* ) pamtype=pmb ;; 1.102 + * ) pamtype=pam ;; 1.103 + esac 1.104 + mflags="$mflags PASSWDTYPE=$pamtype" 1.105 + cflags="$cflags -I`%{l_rc} --query pam_incdir`" 1.106 + ldflags="$ldflags -L`%{l_rc} --query pam_libdir`" 1.107 +%endif 1.108 +%if "%{with_mbxdef}" == "yes" 1.109 + mflags="$mflags CREATEPROTO=mbxproto" 1.110 +%endif 1.111 +%if "%{with_ssl}" == "yes" 1.112 + cflags="%{l_cppflags openssl .} $cflags" 1.113 + mflags="$mflags SSLDIR=%{l_prefix}/etc/openssl" 1.114 +%else 1.115 + mflags="$mflags SSLTYPE=none" 1.116 +%endif 1.117 + case "%{l_platform -t}" in 1.118 + *-freebsd* ) os=bsf ;; 1.119 + *-linux* ) os=slx ;; 1.120 + *-sunos* ) os=gso ;; 1.121 + *-netbsd* ) os=neb ;; 1.122 + *-irix* ) os=gsg ;; 1.123 + *) echo "Unsupported platform %{l_platform -t}" 1>&2; exit 1 ;; 1.124 + esac 1.125 + mflags="$mflags $os" 1.126 + %{l_make} $mflags \ 1.127 + EXTRACFLAGS="$cflags" \ 1.128 + EXTRALDFLAGS="$ldflags" 1.129 + 1.130 +%install 1.131 + rm -rf $RPM_BUILD_ROOT 1.132 + %{l_shtool} mkdir -f -p -m 755 \ 1.133 + $RPM_BUILD_ROOT%{l_prefix}/include/imap \ 1.134 + $RPM_BUILD_ROOT%{l_prefix}/lib 1.135 + %{l_shtool} install -c -m 644 \ 1.136 + c-client/*.h \ 1.137 + c-client/linkage.c \ 1.138 + $RPM_BUILD_ROOT%{l_prefix}/include/imap/ 1.139 + rm -f $RPM_BUILD_ROOT%{l_prefix}/include/imap/os_*.h 1.140 + %{l_shtool} install -c -m 644 c-client/c-client.a \ 1.141 + $RPM_BUILD_ROOT%{l_prefix}/lib/libimap.a 1.142 +%if "%{with_daemons}" == "yes" 1.143 + %{l_shtool} mkdir -f -p -m 755 \ 1.144 + $RPM_BUILD_ROOT%{l_prefix}/bin \ 1.145 + $RPM_BUILD_ROOT%{l_prefix}/sbin \ 1.146 + $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ 1.147 + $RPM_BUILD_ROOT%{l_prefix}/man/man8 1.148 + %{l_shtool} install -c -m 755 \ 1.149 + tmail/tmail dmail/dmail mailutil/mailutil \ 1.150 + $RPM_BUILD_ROOT%{l_prefix}/bin/ 1.151 + %{l_shtool} install -c -m 755 \ 1.152 + imapd/imapd ipopd/ipop3d \ 1.153 + $RPM_BUILD_ROOT%{l_prefix}/sbin/ 1.154 + %{l_shtool} install -c -m 644 \ 1.155 + src/tmail/tmail.1 src/dmail/dmail.1 src/mailutil/mailutil.1 \ 1.156 + $RPM_BUILD_ROOT%{l_prefix}/man/man1/ 1.157 + %{l_shtool} install -c -m 644 \ 1.158 + src/imapd/imapd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/imapd.8 1.159 + %{l_shtool} install -c -m 644 \ 1.160 + src/ipopd/ipopd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/ipopd.8 1.161 +%endif 1.162 + 1.163 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} 1.164 + 1.165 +%files -f files 1.166 + 1.167 +%clean 1.168 + rm -rf $RPM_BUILD_ROOT 1.169 +