xml2rfc.spec 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. ##
  2. ## xml2rfc.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_tool 1.33
  25. %define V_library 20080727
  26. # package information
  27. Name: xml2rfc
  28. Summary: Request For Comment (RFC) Authoring with XML
  29. URL: http://xml.resource.org/
  30. Vendor: Marshall T. Rose
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: PLUS
  34. Group: XML
  35. License: Open Source
  36. Version: %{V_tool}
  37. Release: 20080727
  38. # list of sources
  39. Source0: http://xml.resource.org/authoring/xml2rfc-%{V_tool}.tgz
  40. Source1: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/xml2rfc/bibxml-%{V_library}.tgz
  41. Source2: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/xml2rfc/bibxml2-%{V_library}.tgz
  42. Source3: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/xml2rfc/bibxml3-%{V_library}.tgz
  43. Source4: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/xml2rfc/bibxml4-%{V_library}.tgz
  44. Source5: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/xml2rfc/bibxml5-%{V_library}.tgz
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20030103
  49. PreReq: OpenPKG, openpkg >= 20030103, tcl
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. A handy little tool, xml2rfc, will allow you to take your XML
  54. source (using the format defined in RFC 2629) and see how the
  55. results look like in the original ASCII look-and-feel or the new
  56. modern HTML rendition of that look-and-feel.
  57. %track
  58. prog xml2rfc = {
  59. version = %{V_tool}
  60. url = http://xml.resource.org/authoring/
  61. regex = xml2rfc-(\d+\.\d+)\.tgz
  62. }
  63. prog xml2rfc:library = {
  64. version = %{V_library}
  65. url = ftp://ftp.openpkg.org/sources/CPY/VERSIONED/xml2rfc/
  66. regex = bibxml-(\d+)\.tgz
  67. }
  68. %prep
  69. %setup -q
  70. %build
  71. sed <xml2rfc.tcl >xml2rfc \
  72. -e 's;exec wish;exec %{l_prefix}/bin/tclsh;g' \
  73. -e 's;exec tclsh;exec %{l_prefix}/bin/tclsh;g' \
  74. -e '7s;^.*;set env(XML_LIBRARY) {%{l_prefix}/share/xml2rfc/reference};'
  75. %install
  76. rm -rf $RPM_BUILD_ROOT
  77. %{l_shtool} mkdir -f -p -m 755 \
  78. $RPM_BUILD_ROOT%{l_prefix}/bin \
  79. $RPM_BUILD_ROOT%{l_prefix}/share/xml2rfc/reference
  80. %{l_shtool} install -c -m 755 \
  81. xml2rfc $RPM_BUILD_ROOT%{l_prefix}/bin/xml2rfc
  82. %{l_shtool} install -c -m 644 \
  83. rfc2629.* draft-mrose-writing-rfcs.* \
  84. $RPM_BUILD_ROOT%{l_prefix}/share/xml2rfc/
  85. ( cd $RPM_BUILD_ROOT%{l_prefix}/share/xml2rfc/reference/
  86. %{l_gzip} -d <%{SOURCE1} | %{l_tar} xf -
  87. %{l_gzip} -d <%{SOURCE2} | %{l_tar} xf -
  88. %{l_gzip} -d <%{SOURCE3} | %{l_tar} xf -
  89. %{l_gzip} -d <%{SOURCE4} | %{l_tar} xf -
  90. %{l_gzip} -d <%{SOURCE5} | %{l_tar} xf -
  91. rm -f .htaccess browse.html index.xml
  92. ) || exit $?
  93. mv "$RPM_BUILD_ROOT%{l_prefix}/share/xml2rfc/reference/reference.I-D.lee-pce-wson-routing and wavelength.xml" \
  94. "$RPM_BUILD_ROOT%{l_prefix}/share/xml2rfc/reference/reference.I-D.lee-pce-wson-routing-and-wavelength.xml"
  95. mv "$RPM_BUILD_ROOT%{l_prefix}/share/xml2rfc/reference/reference.I-D.draft-lee-pce-wson-routing and wavelength-00.xml" \
  96. "$RPM_BUILD_ROOT%{l_prefix}/share/xml2rfc/reference/reference.I-D.draft-lee-pce-wson-routing-and-wavelength-00.xml"
  97. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  98. %files -f files
  99. %clean
  100. rm -rf $RPM_BUILD_ROOT