# HG changeset patch # User Michael Schloh von Bennewitz # Date 1240579950 -7200 # Node ID 722f9e17a5c40eba3f8d3bab64f03c5e2f95d99d # Parent 8f6a78b621a9b0989f82030e5d35364e728717c2 Import package vendor original specs for necessary manipulations. diff -r 8f6a78b621a9 -r 722f9e17a5c4 imap/imap.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imap/imap.patch Fri Apr 24 15:32:30 2009 +0200 @@ -0,0 +1,11 @@ +Index: Makefile +--- Makefile.orig 2007-12-20 23:11:10 +0100 ++++ Makefile 2008-03-13 19:12:09 +0100 +@@ -326,7 +326,6 @@ + bsf: an + $(TOUCH) ip6 + $(BUILD) BUILDTYPE=$@ IP=$(IP6) \ +- PASSWDTYPE=pam \ + SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/etc/ssl/certs SSLKEYS=/etc/ssl/private GSSINCLUDE=/usr/include GSSLIB=/usr/lib PAMLDFLAGS=-lpam" + + # I assume that Theo did the right thing for IPv6. OpenBSD does not have PAM. diff -r 8f6a78b621a9 -r 722f9e17a5c4 imap/imap.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imap/imap.spec Fri Apr 24 15:32:30 2009 +0200 @@ -0,0 +1,166 @@ +## +## imap.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2009 OpenPKG Foundation e.V. +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package version +%define V_here 2007e +%define V_real 2007e +%define V_subdir 2007e + +# package information +Name: imap +Summary: The IMAP Library +URL: http://www.washington.edu/imap/ +Vendor: University of Washington +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: BASE +Group: Mail +License: University of Washington's Free-Fork License +Version: %{V_here} +Release: 20081218 + +# package options +%option with_ssl yes +%option with_pam no +%option with_daemons no +%option with_mbxdef no +%option with_annotate no + +# list of sources +# (ping p@rdus.de if the Kolab patches are unavailable for the latest IMAP version) +Source0: ftp://ftp.cac.washington.edu/imap/imap-%{V_real}.tar.Z +Patch0: imap.patch +Patch1: http://kolab.org/cgi-bin/viewcvs-kolab.cgi/*checkout*/server/patches/imap/KOLAB_imap-c-client_2006j2_Annotations.patch + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20040130, gcc +PreReq: OpenPKG, openpkg >= 20040130 +%if "%{with_pam}" == "yes" +BuildPreReq: PAM +PreReq: PAM +%endif +%if "%{with_ssl}" == "yes" +BuildPreReq: openssl +PreReq: openssl +%endif +AutoReq: no +AutoReqProv: no +%if "%{with_daemons}" == "yes" +Conflicts: imaputils +%endif + +%description + The IMAP library provides a C API for IMAP client access. + It optionally contains the UW IMAP/POP3 daemons, too. + +%track + prog imap = { + version = %{V_real} + url = ftp://ftp.cac.washington.edu/imap/ + regex = imap-(\d+[a-z]?\d?)\.tar\.Z + } + +%prep + %setup -q -n imap-%{V_subdir} + %patch -p0 +%if "%{with_annotate}" == "yes" + %patch -p1 -P 1 +%endif + +%build + mflags="%{l_mflags}" + cflags="%{l_cflags}" + ldflags="%{l_ldflags}" +%if "%{with_pam}" == "yes" + case "%{l_platform -t}" in + *-sunos* ) pamtype=pmb ;; + * ) pamtype=pam ;; + esac + mflags="$mflags PASSWDTYPE=$pamtype" + cflags="$cflags -I`%{l_rc} --query pam_incdir`" + ldflags="$ldflags -L`%{l_rc} --query pam_libdir`" +%endif +%if "%{with_mbxdef}" == "yes" + mflags="$mflags CREATEPROTO=mbxproto" +%endif +%if "%{with_ssl}" == "yes" + cflags="%{l_cppflags openssl .} $cflags" + mflags="$mflags SSLDIR=%{l_prefix}/etc/openssl" +%else + mflags="$mflags SSLTYPE=none" +%endif + case "%{l_platform -t}" in + *-freebsd* ) os=bsf ;; + *-linux* ) os=slx ;; + *-sunos* ) os=gso ;; + *-netbsd* ) os=neb ;; + *-irix* ) os=gsg ;; + *) echo "Unsupported platform %{l_platform -t}" 1>&2; exit 1 ;; + esac + mflags="$mflags $os" + %{l_make} $mflags \ + EXTRACFLAGS="$cflags" \ + EXTRALDFLAGS="$ldflags" + +%install + rm -rf $RPM_BUILD_ROOT + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/include/imap \ + $RPM_BUILD_ROOT%{l_prefix}/lib + %{l_shtool} install -c -m 644 \ + c-client/*.h \ + c-client/linkage.c \ + $RPM_BUILD_ROOT%{l_prefix}/include/imap/ + rm -f $RPM_BUILD_ROOT%{l_prefix}/include/imap/os_*.h + %{l_shtool} install -c -m 644 c-client/c-client.a \ + $RPM_BUILD_ROOT%{l_prefix}/lib/libimap.a +%if "%{with_daemons}" == "yes" + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/bin \ + $RPM_BUILD_ROOT%{l_prefix}/sbin \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man8 + %{l_shtool} install -c -m 755 \ + tmail/tmail dmail/dmail mailutil/mailutil \ + $RPM_BUILD_ROOT%{l_prefix}/bin/ + %{l_shtool} install -c -m 755 \ + imapd/imapd ipopd/ipop3d \ + $RPM_BUILD_ROOT%{l_prefix}/sbin/ + %{l_shtool} install -c -m 644 \ + src/tmail/tmail.1 src/dmail/dmail.1 src/mailutil/mailutil.1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/ + %{l_shtool} install -c -m 644 \ + src/imapd/imapd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/imapd.8 + %{l_shtool} install -c -m 644 \ + src/ipopd/ipopd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/ipopd.8 +%endif + + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT +