mutt.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. ##
  2. ## mutt.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package version
  26. %define V_mutt 1.4.1
  27. # package information
  28. Name: mutt
  29. Summary: Mail User Agent
  30. URL: http://www.mutt.org/
  31. Vendor: Michael Elkins
  32. Packager: The OpenPKG Project
  33. Distribution: OpenPKG [BASE]
  34. Group: Mail
  35. License: BSD
  36. Version: %{V_mutt}i
  37. Release: 20030817
  38. # build options
  39. %option with_comp no
  40. %option with_nntp no
  41. %option with_initials no
  42. %option with_quote no
  43. # list of sources
  44. Source0: ftp://ftp.mutt.org/mutt/mutt-%{V_mutt}i.tar.gz
  45. Source1: mailcap
  46. Source2: muttrc
  47. Patch0: ftp://ftp.mutt.org.ua/pub/mutt/mutt-%{V_mutt}/patch-%{V_mutt}.rr.compressed.gz
  48. Patch1: ftp://ftp.mutt.org.ua/pub/mutt/mutt-%{V_mutt}/patch-%{V_mutt}.vvv.nntp.gz
  49. Patch2: ftp://ftp.mutt.org.ua/pub/mutt/mutt-%{V_mutt}/patch-%{V_mutt}.vvv.initials.gz
  50. Patch3: ftp://ftp.mutt.org.ua/pub/mutt/mutt-%{V_mutt}/patch-%{V_mutt}.vvv.quote.gz
  51. # build information
  52. Prefix: %{l_prefix}
  53. BuildRoot: %{l_buildroot}
  54. BuildPreReq: OpenPKG, openpkg >= 20030717, make
  55. PreReq: OpenPKG, openpkg >= 20030717
  56. BuildPreReq: openssl, slang
  57. PreReq: openssl, slang
  58. AutoReq: no
  59. AutoReqProv: no
  60. %description
  61. Mutt is a small but very powerful text based program for reading
  62. electronic mail under Unix operating systems, including support for
  63. color terminals, MIME, and a threaded sorting mode.
  64. %prep
  65. %setup -q -n mutt-%{V_mutt}
  66. %if "%{with_comp}" == "yes"
  67. %patch0 -p1
  68. %endif
  69. %if "%{with_nntp}" == "yes"
  70. %patch1 -p1
  71. %endif
  72. %if "%{with_initials}" == "yes"
  73. %patch2 -p1
  74. %endif
  75. %if "%{with_quote}" == "yes"
  76. %patch3 -p1
  77. %endif
  78. %build
  79. # configure for particular platform
  80. echo 'am_cv_func_iconv=no' >config.cache
  81. echo 'ac_cv_header_iconv_h=no' >>config.cache
  82. options=''
  83. case "%{l_target}" in
  84. *-freebsd* ) options="--enable-flock --disable-fcntl" ;;
  85. esac
  86. CC="%{l_cc}" \
  87. CFLAGS="%{l_cflags -O}" \
  88. CPPFLAGS="-DICONV_CONST=const" \
  89. LDFLAGS="-Limap %{l_ldflags}" \
  90. ./configure \
  91. --cache-file=./config.cache \
  92. --prefix=%{l_prefix} \
  93. --sysconfdir=%{l_prefix}/etc/mutt \
  94. --with-docdir=%{l_prefix}/share/mutt \
  95. --with-slang=%{l_prefix} \
  96. --with-ssl=%{l_prefix} \
  97. --enable-pop \
  98. --enable-imap \
  99. %if "%{with_comp}" == "yes"
  100. --enable-compressed \
  101. %endif
  102. %if "%{with_nntp}" == "yes"
  103. --enable-nntp \
  104. %endif
  105. --enable-buffy-size \
  106. --without-iconv \
  107. --without-wc-funcs \
  108. --disable-nls \
  109. $options
  110. # perform standard build procedure
  111. %{l_make} %{l_mflags}
  112. %install
  113. rm -rf $RPM_BUILD_ROOT
  114. # perform standard installation procedure
  115. %{l_shtool} subst \
  116. -e "s;chmod 2755;true;" \
  117. -e "s;chgrp mail;true;" \
  118. Makefile
  119. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  120. # strip down installation tree
  121. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mutt/[A-Za-d]*
  122. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mutt/patch-notes.txt
  123. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/html
  124. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/samples
  125. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/flea
  126. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/flea.1
  127. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/muttbug
  128. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/muttbug.1
  129. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  130. # install additional files
  131. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  132. %{SOURCE muttrc} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/Muttrc
  133. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  134. %{SOURCE mailcap} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/mailcap
  135. # determine installation files
  136. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  137. %files -f files
  138. %clean
  139. rm -rf $RPM_BUILD_ROOT