mutt.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. # package version
  26. %define V_mutt 1.4
  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: 20030103
  38. # build options
  39. %option with_comp no
  40. %option with_nntp no
  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 >= 20030103, make, openssl, slang
  51. PreReq: OpenPKG, openpkg >= 20030103
  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. %prep
  59. %setup -q -n mutt-%{V_mutt}
  60. %if "%{with_comp}" == "yes"
  61. %patch0 -p1
  62. %endif
  63. %if "%{with_nntp}" == "yes"
  64. %patch1 -p1
  65. %endif
  66. %build
  67. # configure for particular platform
  68. echo 'am_cv_func_iconv=no' >config.cache
  69. echo 'ac_cv_header_iconv_h=no' >>config.cache
  70. options=''
  71. case "%{l_target}" in
  72. *-freebsd* ) options="--enable-flock --disable-fcntl" ;;
  73. esac
  74. CC="%{l_cc}" \
  75. CFLAGS="%{l_cflags -O}" \
  76. CPPFLAGS="-DICONV_CONST=const" \
  77. ./configure \
  78. --cache-file=./config.cache \
  79. --prefix=%{l_prefix} \
  80. --sysconfdir=%{l_prefix}/etc/mutt \
  81. --with-docdir=%{l_prefix}/share/mutt \
  82. --with-slang=%{l_prefix} \
  83. --with-ssl=%{l_prefix} \
  84. --enable-pop \
  85. --enable-imap \
  86. %if "%{with_comp}" == "yes"
  87. --enable-compressed \
  88. %endif
  89. %if "%{with_nntp}" == "yes"
  90. --enable-nntp \
  91. %endif
  92. --enable-buffy-size \
  93. --without-iconv \
  94. --without-wc-funcs \
  95. --disable-nls \
  96. $options
  97. # perform standard build procedure
  98. %{l_make} %{l_mflags}
  99. %install
  100. rm -rf $RPM_BUILD_ROOT
  101. # perform standard installation procedure
  102. %{l_shtool} subst \
  103. -e "s;chmod 2755;true;" \
  104. -e "s;chgrp mail;true;" \
  105. Makefile
  106. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  107. # strip down installation tree
  108. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mutt/[A-Za-d]*
  109. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/html
  110. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/samples
  111. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/flea
  112. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/flea.1
  113. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/muttbug
  114. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/muttbug.1
  115. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  116. # install additional files
  117. %{l_shtool} install -c -m 644 \
  118. -e 's;@l_prefix@;%{l_prefix};g' \
  119. %{SOURCE muttrc} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/Muttrc
  120. %{l_shtool} install -c -m 644 \
  121. -e 's;@l_prefix@;%{l_prefix};g' \
  122. %{SOURCE mailcap} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/mailcap
  123. # determine installation files
  124. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  125. %files -f files
  126. %clean
  127. rm -rf $RPM_BUILD_ROOT