[csw-maintainers] GAR: building a package from loose files, with checksumming

Maciej (Matchek) Blizinski maciej at opencsw.org
Mon Oct 12 15:10:18 CEST 2009


I was trying to create a GAR build which would be done from loose
files, with checksumming. Image this existing directory structure:

$ tree
.
`-- opt
    `-- csw
        |-- bin
        |   `-- foo
        `-- share
            `-- foo
                |-- README
                `-- examples
                    `-- doing-it-right.conf

(In other words: loose files which are already in the corresponding
directories.)

Suppose I'd like to create a GAR package from such files. I'd like to
calculate a checksum of each single file.

I was thinking about doing something like this, although it only
allows to create a single checksum for all the files:

- create a fake download file in DESTDIR
- override its download target:
$(DOWNLOADDIR)/fakefile:
   ...copy the tree structure...
   ...touch $(DOWNLOADDIR)/fakefile to make GAR happy; optionally put
the checksums of all the copied files in there.
- in the extract step, copy the tree structure from $(DOWNLOADDIR) to
$(WORKSRC).
- skip the build step
- in the install step, copy files once again from $(WORKSRC) to $(DESTDIR)

That's my take, and it hardly works. Dago, how would you go about it?

Maciej



More information about the maintainers mailing list