mutt.spec 4.6 KB

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