[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Installing compressed info files
From: |
Bernd Jendrissek |
Subject: |
Re: Installing compressed info files |
Date: |
Tue, 27 May 2008 12:09:54 +0200 |
On Mon, May 26, 2008 at 9:29 PM, Ralf Wildenhues <address@hidden> wrote:
> * Bernd Jendrissek wrote on Thu, May 08, 2008 at 09:41:36PM CEST:
>> On Wed, May 7, 2008 at 1:07 PM, John Darrington <address@hidden> wrote:
>> > How can I change it so that compressed versions are installed instead?
>>
>> Same for man pages. Back when I kept a private set of build scripts
>> for half a zillion packages, I had an m4 macro that expanded to a
>> shell command that would compress these resources, after 'make
>> install' had finished. It was a bit fragile with TEXINFOS though,
>> since the info files didn't all have the same filename extension. (I
>> recall having some fun with info itself, as it would install it's
>> documentation named info.info. My naive filename glob broke on that.)
>
> Care to post your m4 macro nonetheless?
This was not an autoconf macro - it was one of a set of macros that
would expand to either an RPM spec file or a shell script (or, with
some work, any other package manager control file). I forget the
details; it expanded to something like
gzip -9 /usr/share/info/*.info*
divert(42)dnl 42 is the diversion for %postinstall scriptage
/sbin/install-info PACKAGE.gz
divert(0)dnl
> Did you think about using install-hook to compress files after
> installation?
No - I wanted to avoid having to patch each and every package for
which I wanted build+package scripts. It had to be done *outside* the
existing makefiles.
>> It would have been nice if automake had been able to generate rules
>> that would install the compressed documentation.
>
> Wait; I'm not sure I completely understand what you two are after. Do
> you care about compression only for installed files or even for the
> uninstalled ones? Or are you aiming at something like 'configure
> --enable-compressed-mans' or 'make install-doc-compressed' or similar?
Yes, I would love to see something like AM_COMPRESSED_DOCS which would
teach ./configure about --enable-compressed-mans and
--enable-compressed-infos (or just --enable-compressed-docs?) and
would compress the respective files during 'make install'.
I think Automake is the only component in the build toolchain that
KNOWS the name of the input and output files. Perhaps texinfos.am
could contain conditional-like sections:
@AM_COMPRESSED_DOCS_TRUE@ gzip -9 "$$relfile"; \
@AM_COMPRESSED_DOCS_TRUE@ relfile="$$relfile.gz"; \
> Not all system's man programs cope with compressed manpages. I know
> some (most? all?) GNU/Linux distributions install compressed manpages,
> I assume it's rpm/deb/... features that compress them, right?
I assume so too. I think non-archaic rpm has some nice macros that
make building autoconfiscated packages easy. My bet would be that
those rpm macros compress the docs.