adding-packages-directory.txt 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. Package directory
  2. -----------------
  3. First of all, create a directory under the +package+ directory for
  4. your software, for example +libfoo+.
  5. Some packages have been grouped by topic in a sub-directory:
  6. +multimedia+, +java+, +x11r7+, and +games+. If your package fits in
  7. one of these categories, then create your package directory in these.
  8. +Config.in+ file
  9. ~~~~~~~~~~~~~~~~
  10. Then, create a file named +Config.in+. This file will contain the
  11. option descriptions related to our +libfoo+ software that will be used
  12. and displayed in the configuration tool. It should basically contain :
  13. ---------------------------
  14. config BR2_PACKAGE_LIBFOO
  15. bool "libfoo"
  16. help
  17. This is a comment that explains what libfoo is.
  18. http://foosoftware.org/libfoo/
  19. ---------------------------
  20. Of course, you can add other options to configure particular things in
  21. your software. You can look at examples in other packages. The syntax
  22. of the +Config.in+ file is the same as the one for the kernel Kconfig
  23. file. The documentation for this syntax is available at
  24. http://lxr.free-electrons.com/source/Documentation/kbuild/kconfig-language.txt[]
  25. Finally you have to add your new +libfoo/Config.in+ to
  26. +package/Config.in+ (or in a category subdirectory if you decided to
  27. put your package in one of the existing categories). The files
  28. included there are 'sorted alphabetically' per category and are 'NOT'
  29. supposed to contain anything but the 'bare' name of the package.
  30. --------------------------
  31. source "package/libfoo/Config.in"
  32. --------------------------
  33. The +.mk+ file
  34. ~~~~~~~~~~~~~~
  35. Finally, here's the hardest part. Create a file named +libfoo.mk+. It
  36. describes how the package should be downloaded, configured, built,
  37. installed, etc.
  38. Depending on the package type, the +.mk+ file must be written in a
  39. different way, using different infrastructures:
  40. * *Makefiles for generic packages* (not using autotools): These are
  41. based on an infrastructure similar to the one used for
  42. autotools-based packages, but requires a little more work from the
  43. developer. They specify what should be done for the configuration,
  44. compilation, installation and cleanup of the package. This
  45. infrastructure must be used for all packages that do not use the
  46. autotools as their build system. In the future, other specialized
  47. infrastructures might be written for other build systems. We cover
  48. them through in a xref:gentargets-tutorial[tutorial] and a
  49. xref:gentargets-reference[reference].
  50. * *Makefiles for autotools-based software* (autoconf, automake, etc.):
  51. We provide a dedicated infrastructure for such packages, since
  52. autotools is a very common build system. This infrastructure 'must'
  53. be used for new packages that rely on the autotools as their build
  54. system. We cover them through a xref:autotargets-tutorial[tutorial]
  55. and xref:autotargets-reference[reference].
  56. * *Hand-written Makefiles:* These are currently obsolete, and no new
  57. manual Makefiles should be added. However, since there are still
  58. many of them in the tree, we keep them documented in a
  59. xref:handwritten-tutorial[tutorial].