xml2rfc.spec 4.1 KB

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