imap.spec 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. ##
  2. ## imap.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://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 version
  25. %define V_real 2006a
  26. %define V_here 2006a
  27. # package information
  28. Name: imap
  29. Summary: The IMAP Library
  30. URL: http://www.washington.edu/imap/
  31. Vendor: University of Washington
  32. Packager: OpenPKG
  33. Distribution: OpenPKG
  34. Class: BASE
  35. Group: Mail
  36. License: University of Washington's Free-Fork License
  37. Version: %{V_here}
  38. Release: 20060923
  39. # package options
  40. %option with_ssl yes
  41. %option with_pam no
  42. %option with_daemons no
  43. %option with_mbxdef no
  44. # list of sources
  45. Source0: ftp://ftp.cac.washington.edu/imap/imap-%{V_real}.tar.Z
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
  50. PreReq: OpenPKG, openpkg >= 20040130
  51. %if "%{with_pam}" == "yes"
  52. BuildPreReq: PAM
  53. PreReq: PAM
  54. %endif
  55. %if "%{with_ssl}" == "yes"
  56. BuildPreReq: openssl
  57. PreReq: openssl
  58. %endif
  59. AutoReq: no
  60. AutoReqProv: no
  61. %if "%{with_daemons}" == "yes"
  62. Conflicts: imaputils
  63. %endif
  64. %description
  65. The IMAP library provides a C API for IMAP client access.
  66. It optionally contains the UW IMAP/POP3 daemons, too.
  67. %track
  68. prog imap = {
  69. version = %{V_real}
  70. url = ftp://ftp.cac.washington.edu/imap/
  71. regex = imap-(\d+[a-z]?\d?)\.tar\.Z
  72. }
  73. %prep
  74. %setup -q -n imap-%{V_real}
  75. %build
  76. mflags="%{l_mflags}"
  77. cflags="%{l_cflags}"
  78. ldflags="%{l_ldflags}"
  79. %if "%{with_pam}" == "yes"
  80. case "%{l_platform -t}" in
  81. *-sunos* ) pamtype=pmb ;;
  82. * ) pamtype=pam ;;
  83. esac
  84. mflags="$mflags PASSWDTYPE=$pamtype"
  85. cflags="$cflags -I`%{l_rc} --query pam_incdir`"
  86. ldflags="$ldflags -L`%{l_rc} --query pam_libdir`"
  87. %endif
  88. %if "%{with_mbxdef}" == "yes"
  89. mflags="$mflags CREATEPROTO=mbxproto"
  90. %endif
  91. %if "%{with_ssl}" == "yes"
  92. cflags="%{l_cppflags openssl .} $cflags"
  93. mflags="$mflags SSLDIR=%{l_prefix}/etc/openssl"
  94. %else
  95. mflags="$mflags SSLTYPE=none"
  96. %endif
  97. case "%{l_platform -t}" in
  98. *-freebsd* ) os=bsf ;;
  99. *-linux* ) os=slx ;;
  100. *-sunos* ) os=gso ;;
  101. *-netbsd* ) os=neb ;;
  102. *-irix* ) os=gsg ;;
  103. *) echo "Unsupported platform %{l_platform -t}" 1>&2; exit 1 ;;
  104. esac
  105. mflags="$mflags $os"
  106. %{l_make} $mflags \
  107. EXTRACFLAGS="$cflags" \
  108. EXTRALDFLAGS="$ldflags"
  109. %install
  110. rm -rf $RPM_BUILD_ROOT
  111. %{l_shtool} mkdir -f -p -m 755 \
  112. $RPM_BUILD_ROOT%{l_prefix}/include/imap \
  113. $RPM_BUILD_ROOT%{l_prefix}/lib
  114. %{l_shtool} install -c -m 644 \
  115. c-client/*.h \
  116. c-client/linkage.c \
  117. $RPM_BUILD_ROOT%{l_prefix}/include/imap/
  118. rm -f $RPM_BUILD_ROOT%{l_prefix}/include/imap/os_*.h
  119. %{l_shtool} install -c -m 644 c-client/c-client.a \
  120. $RPM_BUILD_ROOT%{l_prefix}/lib/libimap.a
  121. %if "%{with_daemons}" == "yes"
  122. %{l_shtool} mkdir -f -p -m 755 \
  123. $RPM_BUILD_ROOT%{l_prefix}/bin \
  124. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  125. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  126. $RPM_BUILD_ROOT%{l_prefix}/man/man8
  127. %{l_shtool} install -c -m 755 \
  128. tmail/tmail dmail/dmail mailutil/mailutil \
  129. $RPM_BUILD_ROOT%{l_prefix}/bin/
  130. %{l_shtool} install -c -m 755 \
  131. imapd/imapd ipopd/ipop3d \
  132. $RPM_BUILD_ROOT%{l_prefix}/sbin/
  133. %{l_shtool} install -c -m 644 \
  134. src/tmail/tmail.1 src/dmail/dmail.1 src/mailutil/mailutil.1 \
  135. $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  136. %{l_shtool} install -c -m 644 \
  137. src/imapd/imapd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/imapd.8
  138. %{l_shtool} install -c -m 644 \
  139. src/ipopd/ipopd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/ipopd.8
  140. %endif
  141. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  142. %files -f files
  143. %clean
  144. rm -rf $RPM_BUILD_ROOT