mutt.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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.3.27
  27. # build options
  28. %define with_comp yes
  29. %define with_nntp yes
  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 [REL]
  37. Group: Mail
  38. License: BSD
  39. Version: %{V_mutt}i
  40. Release: 20020206
  41. # list of sources
  42. Source0: ftp://ftp.mutt.org/pub/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 >= 20020206, make, openssl, slang, libiconv
  51. PreReq: OpenPKG, openpkg >= 20020206
  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
  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. options=''
  68. case "%{l_target}" in
  69. *-freebsd* ) options="--enable-flock --disable-fcntl" ;;
  70. esac
  71. CC="%{l_cc}" \
  72. CFLAGS="%{l_cflags -O}" \
  73. ./configure \
  74. --prefix=%{l_prefix} \
  75. --sysconfdir=%{l_prefix}/etc/mutt \
  76. --with-docdir=%{l_prefix}/share/mutt \
  77. --with-slang=%{l_prefix} \
  78. --with-iconv=%{l_prefix} \
  79. --with-ssl=%{l_prefix} \
  80. --without-wc-funcs \
  81. --enable-pop \
  82. --enable-imap \
  83. --disable-nls \
  84. %if "%{with_comp}" == "yes"
  85. --enable-compressed \
  86. %endif
  87. %if "%{with_nntp}" == "yes"
  88. --enable-nntp \
  89. %endif
  90. $options
  91. %{l_make} %{l_mflags}
  92. %install
  93. rm -rf $RPM_BUILD_ROOT
  94. %{l_shtool} subst -e "s;chmod 2755;true;" "s;chgrp mail;true;" Makefile
  95. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  96. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mutt/[A-Za-d]*
  97. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/html
  98. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/samples
  99. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/flea
  100. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/flea.1
  101. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/muttbug
  102. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/muttbug.1
  103. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/pgp*
  104. %{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
  105. %{SOURCE muttrc} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/Muttrc
  106. %{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
  107. %{SOURCE mailcap} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/mailcap
  108. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  109. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  110. %files -f files
  111. %clean
  112. rm -rf $RPM_BUILD_ROOT