mutt15.spec 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. ##
  2. ## mutt15.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <http://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. # package version
  25. %define V_mutt 1.5.11
  26. %define V_mutt_patches 1.5.11
  27. %define V_mutt_patches_sidebar 1.5.10i.sidebar.20050816
  28. # package information
  29. Name: mutt15
  30. Summary: Mail User Agent
  31. URL: http://www.mutt.org/
  32. Vendor: Michael Elkins
  33. Packager: OpenPKG
  34. Distribution: OpenPKG
  35. Class: EVAL
  36. Group: Mail
  37. License: BSD
  38. Version: %{V_mutt}i
  39. Release: 20050930
  40. # build options
  41. %option with_comp no
  42. %option with_nntp no
  43. %option with_initials no
  44. %option with_quote no
  45. %option with_sidebar no
  46. %option with_ncurses no
  47. # list of sources
  48. Source0: ftp://ftp.mutt.org/mutt/devel/mutt-%{V_mutt}.tar.gz
  49. Source1: mailcap
  50. Source2: muttrc
  51. Patch0: ftp://ftp.mutt.org.ua/pub/mutt/mutt-%{V_mutt_patches}/patch-%{V_mutt_patches}.rr.compressed.gz
  52. Patch1: ftp://ftp.mutt.org.ua/pub/mutt/mutt-%{V_mutt_patches}/patch-%{V_mutt_patches}.vvv.nntp.gz
  53. Patch2: ftp://ftp.mutt.org.ua/pub/mutt/mutt-%{V_mutt_patches}/patch-%{V_mutt_patches}.vvv.initials.gz
  54. Patch3: ftp://ftp.mutt.org.ua/pub/mutt/mutt-%{V_mutt_patches}/patch-%{V_mutt_patches}.vvv.quote.gz
  55. Patch4: http://thomer.com/mutt/patch-%{V_mutt_patches_sidebar}.txt
  56. # build information
  57. Prefix: %{l_prefix}
  58. BuildRoot: %{l_buildroot}
  59. BuildPreReq: OpenPKG, openpkg >= 20040130, make
  60. PreReq: OpenPKG, openpkg >= 20040130
  61. BuildPreReq: openssl, libidn, libiconv
  62. PreReq: openssl, libidn, libiconv
  63. %if "%{with_ncurses}" == "yes"
  64. BuildPreReq: ncurses
  65. PreReq: ncurses
  66. %else
  67. BuildPreReq: slang
  68. PreReq: slang
  69. %endif
  70. AutoReq: no
  71. AutoReqProv: no
  72. Provides: mutt
  73. %description
  74. Mutt is a small but very powerful text based program for reading
  75. electronic mail under Unix operating systems, including support for
  76. color terminals, MIME, and a threaded sorting mode.
  77. Notice: this is the development series of Mutt. Use it at your own risk!
  78. %track
  79. prog mutt15 = {
  80. version = %{V_mutt}
  81. url = ftp://ftp.mutt.org/mutt/devel/
  82. regex = mutt-(__VER__)\.tar\.gz
  83. }
  84. prog mutt15:patch_rr_compressed = {
  85. version = %{V_mutt_patches}
  86. url = ftp://ftp.mutt.org.ua/pub/mutt/
  87. regex = mutt-(1\.5(\.\d+)+)
  88. url = ftp://ftp.mutt.org.ua/pub/mutt/mutt-__NEWVER__/
  89. regex = patch-(__VER__)\.rr\.compressed\.gz
  90. }
  91. prog mutt15:patch_vvv_initials = {
  92. version = %{V_mutt_patches}
  93. url = ftp://ftp.mutt.org.ua/pub/mutt/
  94. regex = mutt-(1\.5(\.\d+)+)
  95. url = ftp://ftp.mutt.org.ua/pub/mutt/mutt-__NEWVER__/
  96. regex = patch-(__VER__)\.vvv\.initials\.gz
  97. }
  98. prog mutt15:patch_vvv_nntp = {
  99. version = %{V_mutt_patches}
  100. url = ftp://ftp.mutt.org.ua/pub/mutt/
  101. regex = mutt-(1\.5(\.\d+)+)
  102. url = ftp://ftp.mutt.org.ua/pub/mutt/mutt-__NEWVER__/
  103. regex = patch-(__VER__)\.vvv\.nntp\.gz
  104. }
  105. prog mutt15:patch_vvv_quote = {
  106. version = %{V_mutt_patches}
  107. url = ftp://ftp.mutt.org.ua/pub/mutt/
  108. regex = mutt-(1\.5(\.\d+)+)
  109. url = ftp://ftp.mutt.org.ua/pub/mutt/mutt-__NEWVER__/
  110. regex = patch-(__VER__)\.vvv\.quote\.gz
  111. }
  112. prog mutt15:patch_sidebar = {
  113. version = %{V_mutt_patches_sidebar}
  114. url = http://thomer.com/mutt/
  115. regex = patch-(.+?i.sidebar.__VER__)\.txt
  116. }
  117. %prep
  118. %setup -q -n mutt-%{V_mutt}
  119. %if "%{with_comp}" == "yes"
  120. %{l_gzip} -d -c <%{PATCH0} |\
  121. sed -e '/^diff.*Makefile\.am/,/^diff/d' \
  122. -e '/^diff.*configure\.in /,/^diff/d' \
  123. -e '/^diff.*acconfig\.h /,/^diff/d' |\
  124. %{l_patch} -p1
  125. %endif
  126. %if "%{with_nntp}" == "yes"
  127. %{l_gzip} -d -c <%{PATCH1} |\
  128. sed -e '/^diff.*configure\.in /,/^diff/d' \
  129. -e '/^diff.*acconfig\.h /,/^diff/d' |\
  130. %{l_patch} -p1
  131. %endif
  132. %if "%{with_initials}" == "yes"
  133. %patch -p1 -P 2
  134. %endif
  135. %if "%{with_quote}" == "yes"
  136. %patch -p1 -P 3
  137. %endif
  138. %if "%{with_sidebar}" == "yes"
  139. %patch -p1 -P 4
  140. %endif
  141. %{l_shtool} subst \
  142. -e 's;\(Mutt/%%s\);\1 %{l_openpkg_release -F "OpenPKG/%%s"};' \
  143. sendlib.c
  144. %build
  145. # configure for particular platform
  146. options=''
  147. case "%{l_platform -t}" in
  148. *-freebsd* ) options="--enable-flock --disable-fcntl" ;;
  149. esac
  150. CC="%{l_cc}" \
  151. CFLAGS="%{l_cflags -O}" \
  152. %if "%{with_ncurses}" == "yes"
  153. CPPFLAGS="%{l_cppflags ncurses libidn .}" \
  154. %else
  155. CPPFLAGS="%{l_cppflags libidn .}" \
  156. %endif
  157. LDFLAGS="-Limap %{l_ldflags}" \
  158. ./configure \
  159. --prefix=%{l_prefix} \
  160. --sysconfdir=%{l_prefix}/etc/mutt \
  161. --with-docdir=%{l_prefix}/share/mutt \
  162. %if "%{with_ncurses}" == "yes"
  163. --with-curses=%{l_prefix} \
  164. %else
  165. --with-slang=%{l_prefix} \
  166. %endif
  167. --with-ssl=%{l_prefix} \
  168. --enable-pop \
  169. --enable-imap \
  170. %if "%{with_comp}" == "yes"
  171. --enable-compressed \
  172. %endif
  173. %if "%{with_nntp}" == "yes"
  174. --enable-nntp \
  175. %endif
  176. --enable-buffy-size \
  177. --disable-warnings \
  178. --with-iconv \
  179. --disable-nls \
  180. $options
  181. # perform standard build procedure
  182. %{l_make} %{l_mflags}
  183. %install
  184. rm -rf $RPM_BUILD_ROOT
  185. # perform standard installation procedure
  186. %{l_shtool} subst \
  187. -e "s;chmod 2755;true;" \
  188. -e "s;chgrp mail;true;" \
  189. Makefile
  190. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  191. # strip down installation tree
  192. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mutt/[A-Za-d]*
  193. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mutt/patch-notes.txt
  194. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/html
  195. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/mutt/samples
  196. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/flea
  197. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/flea.1
  198. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/muttbug
  199. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/muttbug.1
  200. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  201. # install additional files
  202. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  203. %{SOURCE muttrc} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/Muttrc
  204. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  205. %{SOURCE mailcap} $RPM_BUILD_ROOT%{l_prefix}/etc/mutt/mailcap
  206. # determine installation files
  207. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  208. %{l_files_std} \
  209. '%config %{l_prefix}/etc/mutt/*'
  210. %files -f files
  211. %clean
  212. rm -rf $RPM_BUILD_ROOT