[PLUG] Another rebuild error
Paul Heinlein
heinlein at attbi.com
Thu Jun 6 14:08:52 UTC 2002
On Wed, 5 Jun 2002, Rich Shepard wrote:
> Never mind. Errors in the .spec file. When I look at the directory
> structure, I see that the info/ and man/ directores are up one
> level. That is, under /usr/ and not under /usr/share/.
Right. Documentation is all doing under /usr/share these days. Red Hat
made the switch in a couple stages from 6.2 to 7.1.
It seem to me the 'right' way to build portable .spec files is to use
the _infodir and _mandir variables for info and man pages
%files
%{_prefix}/bin/foo
%doc %{_infodir}/foo*.info.gz
%doc %{_mandir}/man1/foo.gz
rather than storing them relative to _prefix
%files
%{_prefix}/bin/foo
%doc %{_prefix}/share/info/foo*.info.gz
%doc %{_prefix}/share/man/man1/foo.gz
The same is true when running configure:
CFLAGS="%{optflags}" \
./configure \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir}
That way, it doesn't matter if you build for 5.x, 6.x, or 7.x -- all
the documentation goes to the right spot.
--Paul Heinlein <heinlein at attbi.com>
More information about the PLUG
mailing list