mutt.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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.28
  27. # build options
  28. %ifndef with_comp
  29. %define with_comp yes
  30. %endif
  31. %ifndef with_nntp
  32. %define with_nntp yes
  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 [REL]
  41. Group: Mail
  42. License: BSD
  43. Version: %{V_mutt}i
  44. Release: 20020314
  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, libiconv
  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
  61. color terminals, MIME, and a threaded sorting mode
  62. %prep
  63. %setup -q -n mutt-%{V_mutt}
  64. %if "%{with_comp}" == "yes"
  65. %patch0 -p1
  66. %endif
  67. %if "%{with_nntp}" == "yes"
  68. %patch1 -p1
  69. %endif
  70. %build
  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. ./configure \
  78. --prefix=%{l_prefix} \
  79. --sysconfdir=%{l_prefix}/etc/mutt \
  80. --with-docdir=%{l_prefix}/share/mutt \
  81. --with-slang=%{l_prefix} \
  82. --with-iconv=%{l_prefix} \
  83. --with-ssl=%{l_prefix} \
  84. --without-wc-funcs \
  85. --enable-pop \
  86. --enable-imap \
  87. --disable-nls \
  88. %if "%{with_comp}" == "yes"
  89. --enable-compressed \
  90. %endif
  91. %if "%{with_nntp}" == "yes"
  92. --enable-nntp \
  93. %endif
  94. $options
  95. %{l_make} %{l_mflags}
  96. %install
  97. rm -rf $RPM_BUILD_ROOT
  98. %{l_shtool} subst -e "s;chmod 2755;true;" -e "s;chgrp mail;true;" Makefile
  99. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  100. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mutt/[A-Za-d]*
  101. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/html
  102. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/samples
  103. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/flea
  104. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/flea.1
  105. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/muttbug
  106. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/muttbug.1
  107. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/pgp*
  108. %{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
  109. %{SOURCE muttrc} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/Muttrc
  110. %{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
  111. %{SOURCE mailcap} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/mailcap
  112. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  113. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  114. %files -f files
  115. %clean
  116. rm -rf $RPM_BUILD_ROOT