| 1312 |
|
|
| 1313 |
<p>If you don't need this, remove the file. |
<p>If you don't need this, remove the file. |
| 1314 |
|
|
| 1315 |
<sect id="manpage">manpage.1.ex, manpage.sgml.ex |
<sect id="manpage">manpage.1.ex, manpage.sgml.ex, manpage.xml.ex |
| 1316 |
|
|
| 1317 |
<p>Your program(s) should have a manual page. If they don't, each of these |
<p>Your program(s) should have a manual page. If they don't, each of these |
| 1318 |
files is a template that you can fill out. |
files is a template that you can fill out. |
| 1319 |
|
|
| 1320 |
<p>Manual pages are normally written in <manref name="nroff" section="1">. |
<taglist> |
| 1321 |
|
|
| 1322 |
|
<tag><file/manpage.1.ex/ |
| 1323 |
|
<item><p>Manual pages are normally written in <manref name="nroff" section="1">. |
| 1324 |
The <tt/manpage.1.ex/ example is written in nroff, too. |
The <tt/manpage.1.ex/ example is written in nroff, too. |
| 1325 |
See the <manref name="man" section="7"> manual page |
See the <manref name="man" section="7"> manual page |
| 1326 |
for a brief description of how to edit such a file. |
for a brief description of how to edit such a file. |
| 1327 |
|
|
|
<p>If on the other hand you prefer writing SGML instead of nroff, you can |
|
|
use the <tt/manpage.sgml.ex/ template. If you do this, you have to: |
|
|
<list> |
|
|
<item>install the <package/docbook-to-man/ package |
|
|
<item>add <tt/docbook-to-man/ to the <tt/Build-Depends/ line in the |
|
|
<tt/control/ file |
|
|
<item>remove the comment from the docbook-to-man invocation in the |
|
|
`build' rule of your <tt/rules/ file |
|
|
</list> |
|
|
|
|
|
<p>And remember to rename the file to something like <tt/gentoo.sgml/! |
|
|
|
|
| 1328 |
<p>The final manual page file name should include the name of the program |
<p>The final manual page file name should include the name of the program |
| 1329 |
it is documenting, so we will rename it from "manpage" to "gentoo". |
it is documenting, so we will rename it from "manpage" to "gentoo". |
| 1330 |
The file name also includes ".1" as the first suffix, which means it's a |
The file name also includes ".1" as the first suffix, which means it's a |
| 1348 |
can tack on another "x" to the section, i.e. <tt/gentoo.1x/. |
can tack on another "x" to the section, i.e. <tt/gentoo.1x/. |
| 1349 |
There was no gentoo.1 man page in the original source so I wrote |
There was no gentoo.1 man page in the original source so I wrote |
| 1350 |
it using information from the example and from upstream docs. |
it using information from the example and from upstream docs. |
| 1351 |
|
|
| 1352 |
|
<tag><file/manpage.sgml.ex/ |
| 1353 |
|
<item><p>If on the other hand you prefer writing SGML instead of nroff, you can |
| 1354 |
|
use the <tt/manpage.sgml.ex/ template. If you do this, you have to: |
| 1355 |
|
|
| 1356 |
|
<list> |
| 1357 |
|
<item>install the <package/docbook-to-man/ package |
| 1358 |
|
<item>add <tt/docbook-to-man/ to the <tt/Build-Depends/ line in the |
| 1359 |
|
<tt/control/ file |
| 1360 |
|
<item>remove the comment from the docbook-to-man invocation in the |
| 1361 |
|
`build' target of your <tt/rules/ file |
| 1362 |
|
</list> |
| 1363 |
|
|
| 1364 |
|
<p>And remember to rename the file to something like <tt/gentoo.sgml/! |
| 1365 |
|
|
| 1366 |
|
<tag><file/manpage.xml.ex/ |
| 1367 |
|
<item><p>If you prefer XML over SGML, you can use the <tt/manpage.xml.ex/ template. |
| 1368 |
|
If you do this, you have two choices: |
| 1369 |
|
|
| 1370 |
|
<list> |
| 1371 |
|
<item>install the <package/docbook-xsl/ package and an XSLT processor like |
| 1372 |
|
<package/xsltproc/ (recommended) |
| 1373 |
|
<item>add the <tt/docbook-xsl/, <tt/docbook-xml/ and <tt/xsltproc/ packages to the |
| 1374 |
|
<tt/Build-Depends/ line in the <tt/control/ file |
| 1375 |
|
<item>add a rule to the `build' target of your <tt/rules/ file: |
| 1376 |
|
<example> |
| 1377 |
|
xsltproc --nonet \ |
| 1378 |
|
--param make.year.ranges 1 \ |
| 1379 |
|
--param make.single.year.ranges 1 \ |
| 1380 |
|
--param man.charmap.use.subset 0 \ |
| 1381 |
|
-o debian/ \ |
| 1382 |
|
/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \ |
| 1383 |
|
debian/manpage.xml |
| 1384 |
|
</example> |
| 1385 |
|
</item> |
| 1386 |
|
</list> |
| 1387 |
|
|
| 1388 |
|
<p>Alternatively: |
| 1389 |
|
|
| 1390 |
|
<list> |
| 1391 |
|
<item>install the <package/docbook2x/ package |
| 1392 |
|
<item>add the <tt/docbook2x/ package to the <tt/Build-Depends/ line in the |
| 1393 |
|
<tt/control/ file |
| 1394 |
|
<item>add a rule to the `build' target of your <tt/rules/ file: |
| 1395 |
|
<example> |
| 1396 |
|
docbook2man debian/manpage.xml |
| 1397 |
|
</example> |
| 1398 |
|
</item> |
| 1399 |
|
</list> |
| 1400 |
|
|
| 1401 |
|
<p>Rename the source file(s) to something like <tt/gentoo.1.xml/ or so and check |
| 1402 |
|
the package documentations for stylesheet parameters and output options. |
| 1403 |
|
|
| 1404 |
|
</taglist> |
| 1405 |
|
|
| 1406 |
<sect id="menu">menu.ex |
<sect id="menu">menu.ex |
| 1407 |
|
|