[Lazarus] An online package manager

Michael Van Canneyt michael at freepascal.org
Mon Aug 10 16:29:40 CEST 2015



On Mon, 10 Aug 2015, Juha Manninen wrote:

> On Mon, Aug 10, 2015 at 1:15 PM, Michael Van Canneyt
> <michael at freepascal.org> wrote:
>> Why not ? fppkg just needs a zip file, and expects a fpmake.pp.
>> The fpmake.pp is easily translatable to lazarus package and vice versa.
>
> Now I have a gap in my knowledge.
> I thought that fpmake is a replacement for "make", not for Lazarus packages.
> I want to understand this topic better.

It is both.

Sources are divided in packages. 
A package is defined as a set of units that are built together.

fpmake does 2 things:
- It enumerates the units that make up the package.
- It has some metadata: author, version, description.
- It provides exact build instructions for the units.
- As part of the build instructions, dependencies between packages but also between units can (and must) be specified.

As you can see, this is the equivalent of a lazarus package, and even a little better 
since lazarus (currently) does not manage dependencies between units.

fpmake can also
- Compile the units/programs
- Create a manifest file (this is the equivalent of a package file, it's also XML)
- Create a source zip 
- Onstall the units where the compiler can find them (this would not be needed for lazarus packages)
- Create the documentation.
- I have an extension (uncommitted) where it also can compile and run a testsuite.

This is currently the domain of the lazarus IDE or lazbuild.

So,

one possible working scheme that was originally though of:
- use fpmake/fppkg as package format
- Inside lazarus, let fpmake generate a lazarus package (should be a no-brainer)
- Lazarus loads/compiles the generated package
Another possible working scheme is:
- use fpmake/fppkg as package format
- Lazarus packager detects fpmake and calls it to compile everything as well as generate a lazarus package.
- Lazarus loads the generated package

A third (but very improbable, I suspect ;) ) possibility is that lazarus switches building of packages to fppkg.
It was designed to make this possible.

Probably there are some variations possible.

Michael.




More information about the Lazarus mailing list