fpc/utils/fppkg
2010-11-14 19:29:26 +00:00
..
examples * another example 2007-11-14 23:16:55 +00:00
lnet * update lNet to 0.6.4 2010-05-13 21:19:47 +00:00
buildfppkg.pp + disable unimplemented stuff in fppkg for MorphOS/Amiga, so it builds at least 2010-10-21 03:25:15 +00:00
fpmkunitsrc.inc * Regenerated and added comment how to re-generate 2010-09-23 19:14:43 +00:00
fppkg.lpi * Session-info removed from Lazarus project-file 2010-09-19 10:39:49 +00:00
fppkg.pp * Added the ability to skip the rebuild of all packages which are dependent on the package being installed 2010-10-11 20:24:08 +00:00
fprepos.pp * Also check cpu and os when the package in the current directory is used 2010-05-11 19:42:42 +00:00
fpxmlrep.pp * replace showall with list command 2008-11-18 23:59:58 +00:00
Makefile + i386/iphonesim target for the new iPhoneSimulator in Xcode 3.2.4 and 2010-09-29 21:56:47 +00:00
Makefile.fpc + i386/iphonesim target for the new iPhoneSimulator in Xcode 3.2.4 and 2010-09-29 21:56:47 +00:00
pkgcommands.pp * Added -l/--showlocation option for the list command to show which packages are installed locally and globally 2010-05-10 08:31:33 +00:00
pkgdownload.pp * split repository in InstalledRepository and AvailableRepository 2008-04-06 21:00:24 +00:00
pkgfpmake.pp * Added FPMakeOptions to the global configuration file, to pass custom options to fpmake 2010-11-14 19:29:26 +00:00
pkgglobals.pp * Parse command-line options twice, so they can override values from the configuration files 2010-09-19 11:05:45 +00:00
pkghandler.pp * Flush text output before calling external programs 2010-08-29 13:08:07 +00:00
pkglnet.pp * report URL in download failure 2008-01-27 22:40:36 +00:00
pkgmessages.pp * Fixed spell error revealed by lintian. 2010-10-06 20:33:57 +00:00
pkgmkconv.pp * split repository in InstalledRepository and AvailableRepository 2008-04-06 21:00:24 +00:00
pkgoptions.pp * Added FPMakeOptions to the global configuration file, to pass custom options to fpmake 2010-11-14 19:29:26 +00:00
pkgrepos.pp * Added -l/--showlocation option for the list command to show which packages are installed locally and globally 2010-05-10 08:31:33 +00:00
pkgwget.pp * report URL in download failure 2008-01-27 22:40:36 +00:00
README.txt * added .txt extensions to all README, TODO and COPYING files 2009-02-28 17:34:08 +00:00

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 <unit> | 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 <newunitdir>:

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