joost 2b900f0f0a Merged revisions 12487 via svnmerge from %!s(int64=16) %!d(string=hai) anos
..
examples d1b4bdae25 Merged revisions 8943-8944,8950,8986,8992,8998,9000-9006,9011-9012,9021,9025,9033,9035,9059,9074,9076-9082,9084,9086,9088-9090,9096,9108,9114-9115,9121,9123,9126,9132-9133,9168,9183,9185-9186,9211,9215,9217,9233,9236-9238,9240,9247,9255-9260,9262,9266,9269-9272,9276-9278,9282,9284-9285,9295,9305-9308,9310,9314,9322,9337,9340,9343-9344,9355,9359,9373-9375,9387,9396,9399,9401-9402,9434,9450-9456,9459-9463,9466,9468-9469,9472-9473,9476-9477,9480,9491-9492,9529,9536,9550,9566-9568,9571,9573,9576-9577,9579,9583,9587,9632-9637,9654-9656,9658,9688 via svnmerge from %!s(int64=17) %!d(string=hai) anos
lnet d1b4bdae25 Merged revisions 8943-8944,8950,8986,8992,8998,9000-9006,9011-9012,9021,9025,9033,9035,9059,9074,9076-9082,9084,9086,9088-9090,9096,9108,9114-9115,9121,9123,9126,9132-9133,9168,9183,9185-9186,9211,9215,9217,9233,9236-9238,9240,9247,9255-9260,9262,9266,9269-9272,9276-9278,9282,9284-9285,9295,9305-9308,9310,9314,9322,9337,9340,9343-9344,9355,9359,9373-9375,9387,9396,9399,9401-9402,9434,9450-9456,9459-9463,9466,9468-9469,9472-9473,9476-9477,9480,9491-9492,9529,9536,9550,9566-9568,9571,9573,9576-9577,9579,9583,9587,9632-9637,9654-9656,9658,9688 via svnmerge from %!s(int64=17) %!d(string=hai) anos
Makefile 787c6101aa * Updated makefiles to version 2.2.4rc1 %!s(int64=16) %!d(string=hai) anos
Makefile.fpc 787c6101aa * Updated makefiles to version 2.2.4rc1 %!s(int64=16) %!d(string=hai) anos
README 0ae96d1a3b Merged revisions 9834,9837-9850,9852,9855-9856,9858,9862-9864,9867,9872,9874-9876,9890,9918-9919,9938,10013,10075-10076,10078,10082,10129-10130,10132 via svnmerge from %!s(int64=17) %!d(string=hai) anos
fpmake.pp d1b4bdae25 Merged revisions 8943-8944,8950,8986,8992,8998,9000-9006,9011-9012,9021,9025,9033,9035,9059,9074,9076-9082,9084,9086,9088-9090,9096,9108,9114-9115,9121,9123,9126,9132-9133,9168,9183,9185-9186,9211,9215,9217,9233,9236-9238,9240,9247,9255-9260,9262,9266,9269-9272,9276-9278,9282,9284-9285,9295,9305-9308,9310,9314,9322,9337,9340,9343-9344,9355,9359,9373-9375,9387,9396,9399,9401-9402,9434,9450-9456,9459-9463,9466,9468-9469,9472-9473,9476-9477,9480,9491-9492,9529,9536,9550,9566-9568,9571,9573,9576-9577,9579,9583,9587,9632-9637,9654-9656,9658,9688 via svnmerge from %!s(int64=17) %!d(string=hai) anos
fpmkunitsrc.inc b4f4176b34 Merged revisions 12169,12171 via svnmerge from %!s(int64=17) %!d(string=hai) anos
fppkg.lpi 0307d69da8 Merged revisions 10182-10184,10187-10188,10191-10192,10200-10201,10203-10204,10206,10214,10220,10232,10234,10238-10241,10243-10244,10247,10251,10253-10254,10264,10266,10271,10273,10276-10280 via svnmerge from %!s(int64=17) %!d(string=hai) anos
fppkg.pp 6d5f976ce0 Merged revisions 12456,12459 via svnmerge from %!s(int64=16) %!d(string=hai) anos
fprepos.pp 29fe1167d2 Merged revisions 12480 via svnmerge from %!s(int64=16) %!d(string=hai) anos
fpxmlrep.pp b4f4176b34 Merged revisions 12169,12171 via svnmerge from %!s(int64=17) %!d(string=hai) anos
pkgcommands.pp 2b900f0f0a Merged revisions 12487 via svnmerge from %!s(int64=16) %!d(string=hai) anos
pkgdownload.pp e8e4e090a5 Merged revisions 10348,10352-10356,10358-10360,10364-10366,10369-10370,10373-10374,10376-10381,10387-10391,10393-10394,10398,10400,10402-10403,10423,10427,10430,10436,10441,10444-10446,10452,10472,10477,10486,10489-10491,10503,10507,10509-10515,10522,10525-10527,10530-10531,10534,10537-10540,10543,10547,10553,10555,10561-10563,10565-10566,10570,10592-10596,10606,10610 via svnmerge from %!s(int64=17) %!d(string=hai) anos
pkgfpmake.pp d66504e48c Merged revisions 12160 via svnmerge from %!s(int64=17) %!d(string=hai) anos
pkgglobals.pp b4f4176b34 Merged revisions 12169,12171 via svnmerge from %!s(int64=17) %!d(string=hai) anos
pkghandler.pp b4f4176b34 Merged revisions 12169,12171 via svnmerge from %!s(int64=17) %!d(string=hai) anos
pkglnet.pp 0ae96d1a3b Merged revisions 9834,9837-9850,9852,9855-9856,9858,9862-9864,9867,9872,9874-9876,9890,9918-9919,9938,10013,10075-10076,10078,10082,10129-10130,10132 via svnmerge from %!s(int64=17) %!d(string=hai) anos
pkgmessages.pp 041ed53f08 Merged revisions 11953-11954,11956 via svnmerge from %!s(int64=17) %!d(string=hai) anos
pkgmkconv.pp e8e4e090a5 Merged revisions 10348,10352-10356,10358-10360,10364-10366,10369-10370,10373-10374,10376-10381,10387-10391,10393-10394,10398,10400,10402-10403,10423,10427,10430,10436,10441,10444-10446,10452,10472,10477,10486,10489-10491,10503,10507,10509-10515,10522,10525-10527,10530-10531,10534,10537-10540,10543,10547,10553,10555,10561-10563,10565-10566,10570,10592-10596,10606,10610 via svnmerge from %!s(int64=17) %!d(string=hai) anos
pkgoptions.pp 041ed53f08 Merged revisions 11953-11954,11956 via svnmerge from %!s(int64=17) %!d(string=hai) anos
pkgrepos.pp 6d5f976ce0 Merged revisions 12456,12459 via svnmerge from %!s(int64=16) %!d(string=hai) anos
pkgwget.pp 0ae96d1a3b Merged revisions 9834,9837-9850,9852,9855-9856,9858,9862-9864,9867,9872,9874-9876,9890,9918-9919,9938,10013,10075-10076,10078,10082,10129-10130,10132 via svnmerge from %!s(int64=17) %!d(string=hai) anos

README

This is the FPC packager.

The architecture is as follows:

A mirror list is maintained with FPC repositories.
The packager will download the mirror list and store
it somewhere locally

From a mirror, a repository is chosen (using it's name)

From the repository the repository file is downloaded.
It contains all known packages. The fprepos.pp unit contains the
functionality to read and maintain the package file.

The packager maintains a local repository file. when needed
it will download a package and install it. It does so recursively.

Each package contains a fpmake.pp driver. It contains all that
is needed to compile, install and zip a package. It can also
create a manifest file (in XML) to import in a repository.

All packager functionality will be implemented in units so
these units can be used in command-line and GUI package managers.

All packager command handling is implemented in descendents fom
TPackageHandler (pkghandler.pp). All messages emitted by these
handlers are in pkgmessages.

Units:
-----

fprepos:
A unit that describes a repository.
It is mainly a collection of packages.
fpxmlrep
A unit to read/write a repository to XML. It can be used to read a
manifest file as produced by the fpmake driver.
pkgropts
A unit to maintain settings for the packager it reads/writes
options from/to an ini file.
fpmkunit
this is the unit that implements all the functionality a fpmake driver
needs.
fpmktype
types and constants shared by fpmkunit and fprepos
rep2xml
test program for the fprepos unit.
reptest
creates some test packages for use in the rep2xml test program.
fppkg
the package manager application
fpmkconv
Makefile.fpc to fpmake converter.
pkgmessages
the messages used in pkghandler and below.
pkghandler
the base for all fppkg command handlers
pkgdownload
a base implementation for download functionality in fppkg
pkgwget
a downloader based on spawning wget.
pkgsynapse
a downloader based on Synapse. Do not put in makefile, as Synapse is
not distributed by default with FPC.
pkglibcurl
a downloader based on LibCurl (plain C library).
pkgocurl
a downloader based on CurlPas (object version). Do not put in makefile,
as CurlPas is not distributed with FPC.
pkglnet
a downloader based on lNet. The library is distributed in "lnet" subdir
of fppkg root.


Options supported in packager config file:
------------------------------------------

LocalMirrors
Local file with list of mirrors.
RemoteMirrors
URL with location of remote mirrors file.
RemoteRepository
Name of repository as found in LocalMirrors file.
LocalRepository
Location of local repository file.
InstallDir
Directory to install packages/units to
BuildDir
Directory where to unpack and build packages
Compiler
Compiler binary to be used
OS
Default OS
CPU
Default CPU

Defaults can be found in pkgropts


Helpfull commands for building packages:
----------------------------------------

* Generate AddInclude and AddUnit lines from an existing PPU file:

ppudump | awk "/^Source/ { printf(\"AddInclude('%s');\\n\",\$5); } /^Uses unit/ { printf(\"AddUnit('%s');\\n\",tolower(\$3)); }"

* Testing if building a package from archive works:

fpc fpmake && fpmake archive && fppkg build *.zip

* Comparing units directories and generate AddUnit lines for missing .ppu files in :

diff -q | awk "/^Only.*ppu/ { gsub(\".ppu\",\".pp\"); printf(\"T:=P.Targets.AddUnit('%s');\n\",\$NF); }"