[Distutils] installing man pages in bdist_rpm

Steven Knight knight@baldmt.com
Mon Dec 10 19:11:02 2001


Distutils gurus--

In the absence of support for the commented-out "install-man" option,
how can I go about arranging for bdist_rpm to install and package a man
page properly?

Successfull packaging in this case should result in installing a script
in /usr/bin/scons, and the man page in /usr/man/man1/scons.1.gz.

Here's what I've tried:

    data_files = [('man/man1', ["scons.1"])]

        This fails when the INSTALLED_FILES file lists it as
        /usr/man/man1/scons.1, but RPM has installed the man page as
        scons.1.gz.

    data_files = [('man/man1', ["scons.1.gz"])]

	This doesn't fail, but /usr/man/man1/scons.1.gz doesn't
	end up in the resultant RPM.

    doc_files = scons.1.gz

	("doc_files" requires a patch to bdist_rpm to make this work.)

        scons.1.gz gets installed in /usr/share/doc/scons-0.01, not
        /usr/man/man1, because it's listed as "%doc scons.1.gz" in the
        .spec file.

    doc_files = /usr/man/man1/scons.1.gz

        This puts the path name on the same %doc line in the .spec file:

		%doc /usr/man/man1/scons.1.gz README.txt

	And RPM dies as follows:

		RPM build errors:
		    Two files on one line: /usr/man/man1/scons.1.gz
		    Can't mix special %doc with other forms: /usr/man/man1/scons.1.gz

    Same configuration, after hacking distutils to put each entry in
    doc_files on separate %doc lines in the .spec file:

	RPM dies as follows:

		RPM build errors:
		    File not found: /var/tmp/scons-buildroot/usr/man/man1/scons.1.gz

Okay, I'm out of ideas.  Is there any other distutils magic I can try?
Am I just SOL unless I hack distutils myself to support this?

	--SK