imapd.spec 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ##
  2. ## imapd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.com>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: imapd
  26. Summary: Cyrus IMAP Server
  27. URL: http://asg.web.cmu.edu/cyrus/imapd/
  28. Vendor: Carnegie Mellon University
  29. Packager: The OpenPKG Project
  30. Distribution: OpenPKG [REL]
  31. Group: Mail
  32. License: BSD
  33. Version: 2.1.1
  34. Release: 20020206
  35. # list of sources
  36. Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-%{version}.tar.gz
  37. Patch0: imapd.patch
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20020206, sasl, db, openssl, make
  42. PreReq: OpenPKG, openpkg >= 20020206, sasl, db, openssl
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. Cyrus IMAP Server is a IMAP and POP daemon.
  47. %prep
  48. %setup -q -n cyrus-imapd-%{version}
  49. %patch -p0
  50. %build
  51. PATH="%{l_prefix}/bin:$PATH"; export PATH
  52. cflags="-I%{l_prefix}/include"
  53. ldflags="-L%{l_prefix}/lib"
  54. case "%{l_target}" in
  55. *-freebsd* ) ldflags="$ldflags -lpam -lcrypt" ;;
  56. *-solaris* ) ldflags="$ldflags -lpam" ;;
  57. *-linux* ) ldflags="$ldflags -lpam -lcrypt" ;;
  58. esac
  59. CC="%{l_cc}" \
  60. CPPFLAGS="$cflags" \
  61. CFLAGS="%{l_cflags -O} $cflags" \
  62. LDFLAGS="$ldflags" \
  63. ./configure \
  64. --prefix=%{l_prefix} \
  65. --with-openssl=%{l_prefix} \
  66. --with-dbdir=%{l_prefix} \
  67. --with-sasl=%{l_prefix} \
  68. --with-statedir=%{l_prefix}/var/imapd \
  69. --with-auth=unix \
  70. --without-perl \
  71. --disable-sieve \
  72. --with-cyrus-prefix=%{l_prefix} \
  73. --with-cyrus-user=%{l_musr} \
  74. --with-cyrus-group=%{l_mgrp}
  75. %{l_make} %{l_mflags}
  76. %install
  77. rm -rf $RPM_BUILD_ROOT
  78. %{l_make} %{l_mflags} install \
  79. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  80. exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
  81. cyrus_prefix=$RPM_BUILD_ROOT%{l_prefix}
  82. %{l_shtool} mkdir -f -p -m 755 \
  83. $RPM_BUILD_ROOT%{l_prefix}/var/imapd
  84. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  85. %files -f files
  86. %clean
  87. rm -rf $RPM_BUILD_ROOT