mutt.spec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. ##
  2. ## mutt.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.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. # version
  26. %define V_mutt 1.4
  27. # build options
  28. %ifndef with_comp
  29. %define with_comp no
  30. %endif
  31. %ifndef with_nntp
  32. %define with_nntp no
  33. %endif
  34. # package information
  35. Name: mutt
  36. Summary: Mail User Agent
  37. URL: http://www.mutt.org/
  38. Vendor: Michael Elkins
  39. Packager: The OpenPKG Project
  40. Distribution: OpenPKG [BASE]
  41. Group: Mail
  42. License: BSD
  43. Version: %{V_mutt}i
  44. Release: 20020826
  45. # list of sources
  46. Source0: ftp://ftp.mutt.org/pub/mutt/mutt-%{V_mutt}i.tar.gz
  47. Source1: mailcap
  48. Source2: muttrc
  49. Patch0: ftp://ftp.mutt.org.ua/pub/mutt/mutt-%{V_mutt}/patch-%{V_mutt}.rr.compressed.gz
  50. Patch1: ftp://ftp.mutt.org.ua/pub/mutt/mutt-%{V_mutt}/patch-%{V_mutt}.vvv.nntp.gz
  51. # build information
  52. Prefix: %{l_prefix}
  53. BuildRoot: %{l_buildroot}
  54. BuildPreReq: OpenPKG, openpkg >= 20020222, make, openssl, slang
  55. PreReq: OpenPKG, openpkg >= 20020222
  56. AutoReq: no
  57. AutoReqProv: no
  58. %description
  59. Mutt is a small but very powerful text based program for reading
  60. electronic mail under Unix operating systems, including support for
  61. color terminals, MIME, and a threaded sorting mode.
  62. Options:
  63. --define 'with_comp %{with_comp}' \
  64. --define 'with_nntp %{with_nntp}'
  65. %prep
  66. %setup -q -n mutt-%{V_mutt}
  67. %if "%{with_comp}" == "yes"
  68. %patch0 -p1
  69. %endif
  70. %if "%{with_nntp}" == "yes"
  71. %patch1 -p1
  72. %endif
  73. %build
  74. # configure for particular platform
  75. echo 'am_cv_func_iconv=no' >config.cache
  76. echo 'ac_cv_header_iconv_h=no' >>config.cache
  77. options=''
  78. case "%{l_target}" in
  79. *-freebsd* ) options="--enable-flock --disable-fcntl" ;;
  80. esac
  81. CC="%{l_cc}" \
  82. CFLAGS="%{l_cflags -O}" \
  83. CPPFLAGS="-DICONV_CONST=const" \
  84. ./configure \
  85. --cache-file=./config.cache \
  86. --prefix=%{l_prefix} \
  87. --sysconfdir=%{l_prefix}/etc/mutt \
  88. --with-docdir=%{l_prefix}/share/mutt \
  89. --with-slang=%{l_prefix} \
  90. --with-ssl=%{l_prefix} \
  91. --enable-pop \
  92. --enable-imap \
  93. %if "%{with_comp}" == "yes"
  94. --enable-compressed \
  95. %endif
  96. %if "%{with_nntp}" == "yes"
  97. --enable-nntp \
  98. %endif
  99. --enable-buffy-size \
  100. --without-iconv \
  101. --without-wc-funcs \
  102. --disable-nls \
  103. $options
  104. # perform standard build procedure
  105. %{l_make} %{l_mflags}
  106. %install
  107. rm -rf $RPM_BUILD_ROOT
  108. # perform standard installation procedure
  109. %{l_shtool} subst \
  110. -e "s;chmod 2755;true;" \
  111. -e "s;chgrp mail;true;" \
  112. Makefile
  113. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  114. # strip down installation tree
  115. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mutt/[A-Za-d]*
  116. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/html
  117. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/samples
  118. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/flea
  119. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/flea.1
  120. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/muttbug
  121. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/muttbug.1
  122. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  123. # install additional files
  124. %{l_shtool} install -c -m 644 \
  125. -e 's;@l_prefix@;%{l_prefix};g' \
  126. %{SOURCE muttrc} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/Muttrc
  127. %{l_shtool} install -c -m 644 \
  128. -e 's;@l_prefix@;%{l_prefix};g' \
  129. %{SOURCE mailcap} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/mailcap
  130. # determine installation files
  131. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  132. %files -f files
  133. %clean
  134. rm -rf $RPM_BUILD_ROOT