README.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. This is the FPC packager.
  2. The architecture is as follows:
  3. A mirror list is maintained with FPC repositories.
  4. The packager will download the mirror list and store
  5. it somewhere locally
  6. From a mirror, a repository is chosen (using it's name)
  7. From the repository the repository file is downloaded.
  8. It contains all known packages. The fprepos.pp unit contains the
  9. functionality to read and maintain the package file.
  10. The packager maintains a local repository file. when needed
  11. it will download a package and install it. It does so recursively.
  12. Each package contains a fpmake.pp driver. It contains all that
  13. is needed to compile, install and zip a package. It can also
  14. create a manifest file (in XML) to import in a repository.
  15. All packager functionality will be implemented in units so
  16. these units can be used in command-line and GUI package managers.
  17. All packager command handling is implemented in descendents fom
  18. TPackageHandler (pkghandler.pp). All messages emitted by these
  19. handlers are in pkgmessages.
  20. Units:
  21. -----
  22. fprepos:
  23. A unit that describes a repository.
  24. It is mainly a collection of packages.
  25. fpxmlrep
  26. A unit to read/write a repository to XML. It can be used to read a
  27. manifest file as produced by the fpmake driver.
  28. pkgropts
  29. A unit to maintain settings for the packager it reads/writes
  30. options from/to an ini file.
  31. fpmkunit
  32. this is the unit that implements all the functionality a fpmake driver
  33. needs.
  34. fpmktype
  35. types and constants shared by fpmkunit and fprepos
  36. rep2xml
  37. test program for the fprepos unit.
  38. reptest
  39. creates some test packages for use in the rep2xml test program.
  40. fppkg
  41. the package manager application
  42. fpmkconv
  43. Makefile.fpc to fpmake converter.
  44. pkgmessages
  45. the messages used in pkghandler and below.
  46. pkghandler
  47. the base for all fppkg command handlers
  48. pkgdownload
  49. a base implementation for download functionality in fppkg
  50. pkgwget
  51. a downloader based on spawning wget.
  52. pkgsynapse
  53. a downloader based on Synapse. Do not put in makefile, as Synapse is
  54. not distributed by default with FPC.
  55. pkglibcurl
  56. a downloader based on LibCurl (plain C library).
  57. pkgocurl
  58. a downloader based on CurlPas (object version). Do not put in makefile,
  59. as CurlPas is not distributed with FPC.
  60. pkglnet
  61. a downloader based on lNet. The library is distributed in "lnet" subdir
  62. of fppkg root.
  63. Options supported in packager config file:
  64. ------------------------------------------
  65. LocalMirrors
  66. Local file with list of mirrors.
  67. RemoteMirrors
  68. URL with location of remote mirrors file.
  69. RemoteRepository
  70. Name of repository as found in LocalMirrors file.
  71. LocalRepository
  72. Location of local repository file.
  73. InstallDir
  74. Directory to install packages/units to
  75. BuildDir
  76. Directory where to unpack and build packages
  77. Compiler
  78. Compiler binary to be used
  79. OS
  80. Default OS
  81. CPU
  82. Default CPU
  83. Defaults can be found in pkgropts
  84. Helpfull commands for building packages:
  85. ----------------------------------------
  86. * Generate AddInclude and AddUnit lines from an existing PPU file:
  87. ppudump <unit> | awk "/^Source/ { printf(\"AddInclude('%s');\\n\",\$5); } /^Uses unit/ { printf(\"AddUnit('%s');\\n\",tolower(\$3)); }"
  88. * Testing if building a package from archive works:
  89. fpc fpmake && fpmake archive && fppkg build *.zip
  90. * Comparing units directories and generate AddUnit lines for missing .ppu files in <newunitdir>:
  91. diff -q <oldunitdir> <newunitdir> | awk "/^Only.*ppu/ { gsub(\".ppu\",\".pp\"); printf(\"T:=P.Targets.AddUnit('%s');\n\",\$NF); }"