html2text.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ##
  2. ## html2text.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 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 information
  25. Name: html2text
  26. Summary: Advanced HTML To Text Converter
  27. URL: http://userpage.fu-berlin.de/~mbayer/tools/html2text.html
  28. Vendor: Arno Unkrig
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: EVAL
  32. Group: HTML
  33. License: GPL
  34. Version: 1.3.2a
  35. Release: 20061011
  36. # list of sources
  37. Source0: ftp://ftp.ibiblio.org/pub/linux/apps/www/converters/html2text-%{version}.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, gzip
  42. PreReq: OpenPKG, openpkg >= 20040130
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. A command line utility written in C++, html2text converts HTML
  47. documents (HTML 3.2) into plain text (ISO 8859-1). Each HTML
  48. document is loaded from a location indicated by an URI or read from
  49. standard input, and formatted into a stream of plain text characters
  50. that is written to standard output or into an output-file. The
  51. input-URI may specify a remote site, from that the documents are
  52. loaded with the Hypertext Transfer Protocol (HTTP).
  53. %track
  54. prog html2text = {
  55. version = %{version}
  56. url = ftp://ftp.ibiblio.org/pub/linux/apps/www/converters/
  57. regex = html2text-(__VER__)\.tar\.gz
  58. }
  59. %prep
  60. %setup -q
  61. # make configure use CXX from environment
  62. %{l_shtool} subst \
  63. -e 's;CXX=unknown;CXX=${CXX-unknown};' \
  64. -e 's;\("CC"\);"${CXX}" \1;' \
  65. configure
  66. # avoid warning about antiquated C++ headers
  67. %{l_shtool} subst \
  68. -e 's;^\(CXXFLAGS *= *\);\1%{l_cxxflags} -Wno-deprecated ;' \
  69. Makefile.in
  70. # simulate deprecated strstream.h
  71. %{l_shtool} subst \
  72. -e 's;<strstream.h>;<strstream>;' \
  73. -e 's;ostrstream;std::ostrstream;g' \
  74. format.C
  75. %build
  76. CXX="%{l_cxx}" \
  77. ./configure
  78. %{l_make} %{l_mflags -O}
  79. %install
  80. rm -rf $RPM_BUILD_ROOT
  81. %{l_prefix}/bin/gunzip html2text.1.gz html2textrc.5.gz
  82. %{l_shtool} mkdir -f -p -m 755 \
  83. $RPM_BUILD_ROOT%{l_prefix}/bin \
  84. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  85. $RPM_BUILD_ROOT%{l_prefix}/man/man5
  86. %{l_shtool} install -c -m 755 \
  87. html2text $RPM_BUILD_ROOT%{l_prefix}/bin/
  88. %{l_shtool} install -c -m 644 \
  89. html2text.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  90. %{l_shtool} install -c -m 644 \
  91. html2textrc.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/
  92. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  93. %files -f files
  94. %clean
  95. rm -rf $RPM_BUILD_ROOT