xml2rfc.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ##
  2. ## xml2rfc.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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. # package information
  26. Name: xml2rfc
  27. Summary: Request For Comment (RFC) Authoring with XML
  28. URL: http://xml.resource.org/
  29. Vendor: Marshall T. Rose
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: SGML
  34. License: Open Source
  35. Version: 1.24
  36. Release: 20040508
  37. # list of sources
  38. Source0: http://xml.resource.org/authoring/xml2rfc-%{version}.tgz
  39. Source1: http://xml.resource.org/public/rfc/bibxml.tgz
  40. Source2: http://xml.resource.org/public/rfc/bibxml2.tgz
  41. Source3: http://xml.resource.org/public/rfc/bibxml3.tgz
  42. Source4: http://xml.resource.org/public/rfc/bibxml4.tgz
  43. Source5: http://xml.resource.org/public/rfc/bibxml5.tgz
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20030103
  48. PreReq: OpenPKG, openpkg >= 20030103, tcl
  49. AutoReq: no
  50. AutoReqProv: no
  51. %description
  52. A handy little tool, xml2rfc, will allow you to take your XML
  53. source (using the format defined in RFC 2629) and see how the
  54. results look like in the original ASCII look-and-feel or the new
  55. modern HTML rendition of that look-and-feel.
  56. %track
  57. prog xml2rfc = {
  58. version = %{version}
  59. url = http://xml.resource.org/authoring/
  60. regex = xml2rfc-(\d+\.\d+)\.tgz
  61. }
  62. %prep
  63. %setup -q
  64. %build
  65. sed <xml2rfc.tcl >xml2rfc \
  66. -e 's;exec wish;exec %{l_prefix}/bin/tclsh;g' \
  67. -e 's;exec tclsh;exec %{l_prefix}/bin/tclsh;g' \
  68. -e '7s;^.*;set env(XML_LIBRARY) {%{l_prefix}/share/xml2rfc/reference};'
  69. %install
  70. rm -rf $RPM_BUILD_ROOT
  71. %{l_shtool} mkdir -f -p -m 755 \
  72. $RPM_BUILD_ROOT%{l_prefix}/bin \
  73. $RPM_BUILD_ROOT%{l_prefix}/share/xml2rfc/reference
  74. %{l_shtool} install -c -m 755 \
  75. xml2rfc $RPM_BUILD_ROOT%{l_prefix}/bin/xml2rfc
  76. %{l_shtool} install -c -m 644 \
  77. rfc2629.* draft-mrose-writing-rfcs.* \
  78. $RPM_BUILD_ROOT%{l_prefix}/share/xml2rfc/
  79. ( cd $RPM_BUILD_ROOT%{l_prefix}/share/xml2rfc/reference/
  80. %{l_gzip} -d <%{SOURCE1} | %{l_tar} xf -
  81. %{l_gzip} -d <%{SOURCE2} | %{l_tar} xf -
  82. %{l_gzip} -d <%{SOURCE3} | %{l_tar} xf -
  83. %{l_gzip} -d <%{SOURCE4} | %{l_tar} xf -
  84. %{l_gzip} -d <%{SOURCE5} | %{l_tar} xf -
  85. rm -f .htaccess browse.html index.xml
  86. ) || exit $?
  87. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  88. %files -f files
  89. %clean
  90. rm -rf $RPM_BUILD_ROOT