|
From: Eric B. <eb...@cy...> - 2000-10-18 10:23:31
|
laszlo kovacs wrote:
>
> Hi Eric,
>
> Thanks for this, but I don't know much about packaging in general so I
> don't have much clue about what you are suggesting.
Let me explain you.
In Linux world, it's not the same person that programs the software and
that packages the software, unlike in Windows world.
The software programmer produces a Makefile. This makefile has an
"install" section that is enough to install the software locally.
The packager takes this makefile, runs it on his own computer, and sees
what comes of it. He usually gets a set of files that will go into some
list and be distributed.
The problem appears when the makefile does not simply create a
standalone file, but *modifies* a centralized database. That's exactly
what will happen with scrollkeeper-install. There's no resulting file
that can simply be thrown into the distribution: the result is a
*portion* of a file. So the packager puts the corresponding instructions
in what is called a "post-installation" script. The packager builds the
package on his own computer, but he knows the post-installation script
will be run on the end-user's computer.
This is why Dan's setup would simply not have worked.
The most efficient solution and that will not require too much changes
in existing makefiles and specfiles is to split the script in two:
- one part, called in "install" section of the makefile, gathers all the
OMF info into a "metainformation snippet"
- another part, called in the post-installation script of the specfile
(or whatever equivalent), merges this snippet with the existing
database, which holds both the contents list and the OMF information.
> Anyway the install
> and uninstall scripts are very easy to change as they are small so any
> change can be done quickly.
Better so. Here is in short what I propose.
Before:
> --------------------------------
> In the Makefile:
> > install:
> > cp foo.sgml $(DOCDIR)
> > cp foo-omf $(DOCDIR)
> > scrollkeeper-install $(DOCDIR)/foo.sgml $(DOCDIR)/foo-omf
> --------------------------------
3 lines *per document* in the Makefile
After:
> --------------------------------
> In the Makefile:
> > install:
> > cp foo.sgml $(DOCDIR)
> > scrollkeeper-preinstall $(DOCDIR)/foo.sgml foo.omf > $(DOCDIR)/doc-contents.omf
>
> In the SPEC file:
> > %Post
> > scrollkeeper-install $DOCDIR/doc-contents.omf
> >
> > %Postun
> > scrollkeeper-uninstall $DOCDIR/doc-contents.omf
> >
> > %Files
> > $DOCDIR/doc-contents.omf
> --------------------------------
2 lines *per document* in the makefile
3 lines *for all documents* in the specfile
--
Éric Bischoff - mailto:eb...@cy...
__________________________________________________
\^o~_.
.~. ______ /( __ )
/V\ Toys story \__ \/ ( V
// \\ \__| (__=v
/( )\ |\___/ )
^^-^^ \_____( )
Tux Konqui \__=v
__________________________________________________
|