odoc.8 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. .TH ODOC 8 "July 17, 2005" "" "OpenPKG"
  2. .SH NAME
  3. \fBodoc \fP- create index.html doc files
  4. .SH SYNOPSIS
  5. .nf
  6. .fam C
  7. \fB%{l_odoc}\fP [<opts>] %{SOURCE %{name}.spec}
  8. \fBodoc\fP -s
  9. .fam T
  10. .fi
  11. .SH DESCRIPTION
  12. \fBodoc\fP helps to create index.html files
  13. .SH OPTIONS
  14. .TP
  15. .B
  16. -t tmpl
  17. uses the given file as template html the special names odoc_aux,
  18. odoc_man, odoc_ex and odoc_sum are used to generate standard
  19. templates for auxilliary, mandatory and summary documentation
  20. .TP
  21. .B
  22. -w tag
  23. specify "working location" in output file (searches for <!--!tag-->)
  24. it is also used by some options to identify a section with
  25. additional info in odoc.inf
  26. .TP
  27. .B
  28. -i
  29. insert text section (see -w) from odoc.inf
  30. .TP
  31. .B
  32. -I file
  33. specify location of odoc.inf (default: %{SOURCE odoc.inf})
  34. .TP
  35. .B
  36. -r file
  37. insert content of <file> at working location
  38. .TP
  39. .B
  40. -l dir
  41. insert directory list at working location only basename, looks in
  42. odoc.inf (see -w) for additional per file info
  43. .TP
  44. .B
  45. -L
  46. create symlinks in %prefix/doc/<pkg> that point
  47. to ../../share/<pkg>/{docs,examples}, when those dirs exist
  48. .TP
  49. .B
  50. -h url
  51. adds link "home"-><url>
  52. .TP
  53. .B
  54. -o file
  55. name of output file (default: tmpl from -t)
  56. .TP
  57. .B
  58. -R
  59. prepend $RPM_BUILD_ROOT on paths that start with %prefix
  60. .TP
  61. .B
  62. -a
  63. -t odoc_aux -w adoc -l %prefix/doc/<pkg> -LR \
  64. -h ../../../..%prefix/share/openpkg/docs/index.html \
  65. -o %prefix/doc/<pkg>/index.html"
  66. .TP
  67. .B
  68. -m
  69. -t odoc_man -w mdoc -l %prefix/share/<pkg>/docs -R \
  70. -o %prefix/share/<pkg>/docs/index.html"
  71. .TP
  72. .B
  73. -e
  74. -t odoc_ex -w edoc -l %prefix/share/<pkg>/examples -R \
  75. -o %prefix/share/<pkg>/examples/index.html
  76. .TP
  77. .B
  78. -s
  79. -t odoc_sum -w sdoc \
  80. -o %prefix/share/openpkg/docs/index.html
  81. create summary info in %prefix/share/openpkg/docs
  82. .TP
  83. .B
  84. -v
  85. verbose
  86. .TP
  87. .B
  88. -F
  89. calls the command "false"; this way it is possible to detect whether a
  90. "real" odoc is installed or just a stub, that calls 'true'
  91. .RE
  92. .PP
  93. The options -a, -m and -e can be used together and result in three index.html
  94. files. The -a, -m, -e and -s options are mutually exclusive to every other
  95. option except -v.
  96. %{SOURCE odoc.inf} can hold additional info for \fBodoc\fP operations.
  97. The file consists of sections, that start with <section id="tag">
  98. and end with </section>.
  99. To access the docs over an apache httpd add the line "include %prefix/share/openpkg/docs/odoc.apache" to httpd.conf.
  100. .SH FILES
  101. odoc.inf
  102. .SH EXAMPLES
  103. .nf
  104. sample odoc.inf:
  105. ----------------
  106. <section id="tag">
  107. This is <b>html</b> text to be included with -i.<br>
  108. And this is a second line.
  109. <!--!canAddLaterMoreHere-->
  110. </section>
  111. <section id="anotherTag">
  112. file1 - description of file1 (also <b>html</b>)
  113. file5 : description of file5
  114. </section>
  115. .PP
  116. sample commands:
  117. ----------------
  118. mv mdocs/* $RPM_BUILD_ROOT%{l_prefix}/share/pkg/docs
  119. mv examples/* $RPM_BUILD_ROOT%{l_prefix}/share/pkg/examples
  120. if %{l_odoc} -F
  121. then echo "WARNING: no aux docs will be packaged" 1>&2
  122. else mv adocs/* $RPM_BUILD_ROOT%{l_docdir}/pkg
  123. %{l_odoc} -ame %{SOURCE %{name}.spec}
  124. %{l_odoc} -w arem -i tag -t $RPM_BUILD_ROOT%{l_docdir}/pkg/index.html
  125. fi
  126. .PP
  127. "arem" is one insert point that is put in the standard template odoc_aux
  128. (similiar tags "mrem", "erem" and "srem" are in odoc_man, odoc_ex and
  129. odoc_sum).
  130. For the example above "odoc.inf" has to have a section "arem" and can
  131. have the sections "adoc", "mdoc" and "edoc" with informations that are
  132. selected using the filenames.
  133. The command %{l_odoc} -F checks, whether %{l_odoc} is just a stub that
  134. calls 'true'.
  135. .SH AUTHOR
  136. Matthias Kurz <mk@openpkg.net>