mutt.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. ##
  2. ## mutt.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # version
  25. %define V_mutt 1.3.23
  26. # build options
  27. %define with_comp yes
  28. %define with_nntp yes
  29. # package information
  30. Name: mutt
  31. Summary: Mail User Agent
  32. URL: http://www.mutt.org/
  33. Vendor: Michael Elkins
  34. Packager: The OpenPKG Project
  35. Distribution: OpenPKG [EXP]
  36. Group: Mail
  37. License: BSD
  38. Version: %{V_mutt}i
  39. Release: %{l_branch}.0
  40. # list of sources
  41. Source0: ftp://ftp.mutt.org/pub/mutt/mutt-%{V_mutt}i.tar.gz
  42. Source1: mailcap
  43. Source2: muttrc
  44. Patch0: ftp://ftp.mutt.org.ua/pub/mutt/mutt-%{V_mutt}/patch-%{V_mutt}.rr.compressed.gz
  45. Patch1: ftp://ftp.mutt.org.ua/pub/mutt/mutt-%{V_mutt}/patch-%{V_mutt}.vvv.nntp.gz
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20011023.0, make, openssl, slang, libiconv
  50. PreReq: OpenPKG, openpkg >= 20011023.0
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. Mutt is a small but very powerful text based program for reading
  55. electronic mail under Unix operating systems, including support
  56. color terminals, MIME, and a threaded sorting mode
  57. %prep
  58. %setup -q -n mutt-%{V_mutt}
  59. %if "%{with_comp}" == "yes"
  60. %patch0 -p1
  61. %endif
  62. %if "%{with_nntp}" == "yes"
  63. %patch1 -p1
  64. %endif
  65. %build
  66. options=''
  67. case "%{l_target}" in
  68. *-freebsd* ) options="--enable-flock --disable-fcntl" ;;
  69. esac
  70. CC="%{l_cc}" \
  71. CFLAGS="%{l_cflags -O}" \
  72. ./configure \
  73. --prefix=%{l_prefix} \
  74. --sysconfdir=%{l_prefix}/etc/mutt \
  75. --with-docdir=%{l_prefix}/share/mutt \
  76. --with-slang=%{l_prefix} \
  77. --with-iconv=%{l_prefix} \
  78. --with-ssl=%{l_prefix} \
  79. --without-wc-funcs \
  80. --enable-pop \
  81. --enable-imap \
  82. --disable-nls \
  83. %if "%{with_comp}" == "yes"
  84. --enable-compressed \
  85. %endif
  86. %if "%{with_nntp}" == "yes"
  87. --enable-nntp \
  88. %endif
  89. $options
  90. %{l_make} %{l_mflags}
  91. %install
  92. rm -rf $RPM_BUILD_ROOT
  93. %{l_rpmtool} subst "s;chmod 2755;true;" "s;chgrp mail;true;" -- Makefile
  94. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  95. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mutt/[A-Za-d]*
  96. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/html
  97. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/samples
  98. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/flea
  99. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/flea.1
  100. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/muttbug
  101. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/muttbug.1
  102. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/pgp*
  103. %{l_shtool} install -c -m 644 -e "s;@l_prefix@;%{l_prefix};g" \
  104. %{SOURCE muttrc} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/Muttrc
  105. %{l_shtool} install -c -m 644 -e "s;@l_prefix@;%{l_prefix};g" \
  106. %{SOURCE mailcap} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/mailcap
  107. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  108. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  109. %files -f files
  110. %clean
  111. rm -rf $RPM_BUILD_ROOT