michael@196: ## michael@196: ## imap.spec -- OpenPKG RPM Package Specification michael@196: ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. michael@196: ## michael@196: ## Permission to use, copy, modify, and distribute this software for michael@196: ## any purpose with or without fee is hereby granted, provided that michael@196: ## the above copyright notice and this permission notice appear in all michael@196: ## copies. michael@196: ## michael@196: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@196: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@196: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@196: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@196: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@196: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@196: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@196: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@196: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@196: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@196: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@196: ## SUCH DAMAGE. michael@196: ## michael@196: michael@196: # package version michael@555: %define V_here 2007f michael@555: %define V_real 2007f michael@555: %define V_subdir 2007f michael@196: michael@196: # package information michael@196: Name: imap michael@196: Summary: The IMAP Library michael@196: URL: http://www.washington.edu/imap/ michael@196: Vendor: University of Washington michael@196: Packager: OpenPKG Foundation e.V. michael@196: Distribution: OpenPKG Community michael@196: Class: BASE michael@196: Group: Mail michael@196: License: University of Washington's Free-Fork License michael@196: Version: %{V_here} michael@555: Release: 20120800 michael@196: michael@196: # package options michael@196: %option with_ssl yes michael@196: %option with_pam no michael@196: %option with_daemons no michael@196: %option with_mbxdef no michael@196: michael@196: # list of sources michael@196: Source0: ftp://ftp.cac.washington.edu/imap/imap-%{V_real}.tar.Z michael@196: Patch0: imap.patch michael@196: michael@196: # build information michael@555: BuildPreReq: OpenPKG, openpkg >= 20100101, gcc michael@555: PreReq: OpenPKG, openpkg >= 20100101 michael@196: %if "%{with_pam}" == "yes" michael@196: BuildPreReq: PAM michael@196: PreReq: PAM michael@196: %endif michael@196: %if "%{with_ssl}" == "yes" michael@196: BuildPreReq: openssl michael@196: PreReq: openssl michael@196: %endif michael@196: %if "%{with_daemons}" == "yes" michael@196: Conflicts: imaputils michael@196: %endif michael@196: michael@196: %description michael@196: The IMAP library provides a C API for IMAP client access. michael@196: It optionally contains the UW IMAP/POP3 daemons, too. michael@196: michael@196: %track michael@196: prog imap = { michael@196: version = %{V_real} michael@196: url = ftp://ftp.cac.washington.edu/imap/ michael@196: regex = imap-(\d+[a-z]?\d?)\.tar\.Z michael@196: } michael@196: michael@196: %prep michael@196: %setup -q -n imap-%{V_subdir} michael@196: %patch -p0 michael@555: case "%{l_platform -t}" in michael@555: *-sunos* ) michael@555: %{l_shtool} subst \ michael@555: -e 's;dd_fd;d_fd;g' \ michael@555: src/osdep/unix/scandir.c michael@555: ;; michael@555: esac michael@196: michael@196: %build michael@196: mflags="%{l_mflags}" michael@196: cflags="%{l_cflags}" michael@196: ldflags="%{l_ldflags}" michael@196: %if "%{with_pam}" == "yes" michael@196: case "%{l_platform -t}" in michael@196: *-sunos* ) pamtype=pmb ;; michael@196: * ) pamtype=pam ;; michael@196: esac michael@196: mflags="$mflags PASSWDTYPE=$pamtype" michael@196: cflags="$cflags -I`%{l_rc} --query pam_incdir`" michael@196: ldflags="$ldflags -L`%{l_rc} --query pam_libdir`" michael@196: %endif michael@196: %if "%{with_mbxdef}" == "yes" michael@196: mflags="$mflags CREATEPROTO=mbxproto" michael@196: %endif michael@196: %if "%{with_ssl}" == "yes" michael@196: cflags="%{l_cppflags openssl .} $cflags" michael@196: mflags="$mflags SSLDIR=%{l_prefix}/etc/openssl" michael@198: mflags="$mflags SSLCERTS=%{l_prefix}/etc/openssl/certs" michael@230: mflags="$mflags SSLKEYS=%{l_prefix}/etc/openssl/private" michael@197: mflags="$mflags SSLINCLUDE=%{l_prefix}/include" michael@197: mflags="$mflags SSLLIB=%{l_prefix}/lib" michael@196: %else michael@196: mflags="$mflags SSLTYPE=none" michael@196: %endif michael@196: case "%{l_platform -t}" in michael@196: *-freebsd* ) os=bsf ;; michael@196: *-linux* ) os=slx ;; michael@196: *-sunos* ) os=gso ;; michael@196: *-netbsd* ) os=neb ;; michael@196: *-irix* ) os=gsg ;; michael@196: *) echo "Unsupported platform %{l_platform -t}" 1>&2; exit 1 ;; michael@196: esac michael@196: mflags="$mflags $os" michael@196: %{l_make} $mflags \ michael@196: EXTRACFLAGS="$cflags" \ michael@196: EXTRALDFLAGS="$ldflags" michael@196: michael@196: %install michael@196: %{l_shtool} mkdir -f -p -m 755 \ michael@196: $RPM_BUILD_ROOT%{l_prefix}/include/imap \ michael@196: $RPM_BUILD_ROOT%{l_prefix}/lib michael@196: %{l_shtool} install -c -m 644 \ michael@196: c-client/*.h \ michael@196: c-client/linkage.c \ michael@196: $RPM_BUILD_ROOT%{l_prefix}/include/imap/ michael@196: rm -f $RPM_BUILD_ROOT%{l_prefix}/include/imap/os_*.h michael@196: %{l_shtool} install -c -m 644 c-client/c-client.a \ michael@196: $RPM_BUILD_ROOT%{l_prefix}/lib/libimap.a michael@196: %if "%{with_daemons}" == "yes" michael@196: %{l_shtool} mkdir -f -p -m 755 \ michael@196: $RPM_BUILD_ROOT%{l_prefix}/bin \ michael@196: $RPM_BUILD_ROOT%{l_prefix}/sbin \ michael@196: $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ michael@196: $RPM_BUILD_ROOT%{l_prefix}/man/man8 michael@196: %{l_shtool} install -c -m 755 \ michael@196: tmail/tmail dmail/dmail mailutil/mailutil \ michael@196: $RPM_BUILD_ROOT%{l_prefix}/bin/ michael@196: %{l_shtool} install -c -m 755 \ michael@196: imapd/imapd ipopd/ipop3d \ michael@196: $RPM_BUILD_ROOT%{l_prefix}/sbin/ michael@196: %{l_shtool} install -c -m 644 \ michael@196: src/tmail/tmail.1 src/dmail/dmail.1 src/mailutil/mailutil.1 \ michael@196: $RPM_BUILD_ROOT%{l_prefix}/man/man1/ michael@196: %{l_shtool} install -c -m 644 \ michael@196: src/imapd/imapd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/imapd.8 michael@196: %{l_shtool} install -c -m 644 \ michael@196: src/ipopd/ipopd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/ipopd.8 michael@196: %endif michael@196: michael@196: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@196: michael@196: %files -f files michael@196: michael@196: %clean michael@196: