tidy.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ##
  2. ## tidy.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_opkg 20050816
  26. %define V_src 050817
  27. %define V_doc 050705
  28. # package information
  29. Name: tidy
  30. Summary: HTML Tidy
  31. URL: http://tidy.sourceforge.net/
  32. Vendor: Dave Raggett
  33. Packager: OpenPKG
  34. Distribution: OpenPKG
  35. Class: PLUS
  36. Group: Text
  37. License: GPL
  38. Version: %{V_opkg}
  39. Release: 20050819
  40. # list of sources
  41. Source0: http://tidy.sourceforge.net/src/tidy_src_%{V_src}.tgz
  42. Source1: http://tidy.sourceforge.net/docs/tidy_docs_%{V_doc}.tgz
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, libxslt
  47. PreReq: OpenPKG, openpkg >= 20040130
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. This is a HTML/XHTML markup code cleaning tool.
  52. %track
  53. prog tidy:src = {
  54. version = %{V_src}
  55. url = http://tidy.sourceforge.net/src/
  56. regex = tidy_src_(__VER__)\.tgz
  57. }
  58. prog tidy:doc = {
  59. version = %{V_doc}
  60. url = http://tidy.sourceforge.net/docs/
  61. regex = tidy_docs_(__VER__)\.tgz
  62. }
  63. %prep
  64. %setup -q -n tidy
  65. %setup -q -n tidy -T -D -a 1
  66. %build
  67. ( cd build/gmake
  68. %{l_make} %{l_mflags} \
  69. CC="%{l_cc} %{l_cflags -O}"
  70. ) || exit $?
  71. ( cd tidy/htmldoc
  72. ../../bin/tidy -xml-help >tidy.xml
  73. ../../bin/tidy -xml-config >tidy-config.xml
  74. %{l_prefix}/bin/xsltproc tidy1.xsl tidy.xml >tidy.1
  75. ) || exit $?
  76. %install
  77. rm -rf $RPM_BUILD_ROOT
  78. %{l_shtool} mkdir -f -p -m 755 \
  79. $RPM_BUILD_ROOT%{l_prefix}/bin \
  80. $RPM_BUILD_ROOT%{l_prefix}/include/tidy \
  81. $RPM_BUILD_ROOT%{l_prefix}/lib \
  82. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  83. %{l_shtool} install -c -s -m 755 \
  84. bin/tidy $RPM_BUILD_ROOT%{l_prefix}/bin/
  85. %{l_shtool} install -c -m 644 \
  86. lib/libtidy.a $RPM_BUILD_ROOT%{l_prefix}/lib/
  87. %{l_shtool} install -c -m 644 \
  88. include/*.h $RPM_BUILD_ROOT%{l_prefix}/include/tidy/
  89. %{l_shtool} install -c -m 644 \
  90. tidy/htmldoc/tidy.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  91. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  92. %files -f files
  93. %clean
  94. rm -rf $RPM_BUILD_ROOT