Building packages for Docs Project

From FedoraProject

Jump to: navigation, search
All current modules in Docs CVS already follow these policies. The information in this page needs to be subsumed into the Documentation Guide, and references redirected thereto.

How Docs Packaging Works

The majority of required files are in the docs-common module under the packaging folder. The packaging process uses a special rpm-info.xml file which contains document metadata such as copyright, licensing, authorship, revision information, and package changelog data. The DTD for this info is in docs-common/packaging/rpm-info.dtd as well, so you can edit with XML-aware editors and have your file validated properly.

The files needed are all created from the rpm-info.xml file using XSLT and stylesheets prepared by FDP contributors:

Thanks to the maintainers of Fedora's <code>yelp package, the official Fedora documentation will appear on the top-level index page.

To use the new build system, you will have to first prep your document .

The rpm-info.xml File

Although the DTD is the authoritative description for this file, the following information might be helpful to those contributors who are not comfortable reading it themselves. A proper rpm-info.xml file is constructed in this fashion, surrounded by <rpm-info> tags. Not all required attributes are discussed here, but important usage is noted.

It is not possible to "enforce" the date ordering or formatting in this file; the document maintainers are responsible for that. If it's not done right, the document might build, but RPM packages will not, so any problems will be apparent. Remember, newest change first!
Once you create a rpm-info.xml file, all revision history and RPM changelog information is entered into that file.

XSLT

We use XSLT (eXtensible Stylesheet Language Transformation), a language for transforming XML documents into other XML documents, to create all the other files required for an RPM package. The process uses the xsltproc program to process the rpm-info-xml file with an XSL stylesheet. If you want to learn more about XSLT, start here for an excellent tutorial, authored in part by Norman Walsh, the primary developer of Doc'Book.