[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[RFC] Packaging technology update



Hello, All!

As part of getting the RPM's built for the Fedora documents,  there
are a number of files necessarily that all must be consistent.  For
example, there is a revision history within the DocBook document
itself and a similar one for the RPM package.  There is an author /
editor / translator list for the DocBook information and a similar
list for the RPM.  The list goes on, but you get the idea.

Since I'm lazy and don't want to do the same task twice, I've
developed some XSLT stylesheets that will generate:

1) the <bookinfo> or <articleinfo> information in the DocBook itself;

2) the OMF file needed for the yelp integration;

3) the ".desktop" file needed for the GNOME menu system;

4) the ".spec" file needed for the RPM packaging.

All that is needed is for the authors, translators, and editors to
enter the information once in an "rpm-info.xml" file.  Then, the
document build system Makefile.common will be able to automatically
generate the derivative files as needed.

So that you can get an idea of how this will work, I've also added a
sample "rpm-info.xml" file to the Example Tutorial.  To see this
work, type the following command from the "example-tutorial/"
directory:

$ xsltproc --stringparam doctype articleinfo		\
	../docs-common/packaging/bookinfo.xsl rpm-info.txt

When we get this worked out, we will redirect this generated XML into
a file and the base document will include it rather than having the
<articleinfo> stuff hardcoded within it.

As new translations are added to the document, the translator just
adds the new locale to the Makefile ${LANGUAGES} macro and updates
"rpm-info.xml" with the translated document name and description.
Everything else adapts itself to the new information and out comes a
localized RPM package.  This is just the plan, we're not quite there
yet, but we're very close.

The rest of this is probably of interest only to KWADE and STICKSTER, but feel
free to read along.

In the "docs-common/packaging" directory are some new files:

rpm-info.dtd	-- DTD for the "rpm-info.xml" files
bookinfo.xsl	-- XSLT stylesheet to extract the <articleinfo> stuff
desktop.xsl	-- XSLT stylesheet to build the "{docbase}.desktop" file
omf.xsl		-- XSLT stylesheet to generate the OMF file
spec.xsl	-- XSLT stylesheet to generate an RPM ".spec" file

Of these XSLT stylesheets, "spec.xsl" is the most tentative.  I'm not
clear about how to structure the multi-language RPM generation yet,
so I've put in some stubs to suggest how this technology could
generate a customized SPEC file on the fly.  

Suggestions, praise and criticsm are all welcome!

Cheers

Attachment: pgpSVHuDPPC8t.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]