xml2rfc.spec 4.0 KB

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