2
1

adding-packages-tips.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // -*- mode:doc; -*-
  2. Tips and tricks
  3. ~~~~~~~~~~~~~~~
  4. [[package-name-variable-relation]]
  5. Package name, config entry name and makefile variable relationship
  6. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  7. In Buildroot, there is some relationship between:
  8. * the _package name_, which is the package directory name (and the
  9. name of the +*.mk+ file);
  10. * the config entry name that is declared in the +Config.in+ file;
  11. * the makefile variable prefix.
  12. It is mandatory to maintain consistency between these elements,
  13. using the following rules:
  14. * the _make_ target name will be the _package name_ itself (e.g.:
  15. +foo-bar_boo+);
  16. * the config entry is the upper case _package name_ with `.` and `-`
  17. characters substituted with `_`, prefixed with +BR2_PACKAGE_+ (e.g.:
  18. +BR2_PACKAGE_FOO_BAR_BOO+);
  19. * the +*.mk+ file variable prefix is the upper case _package name_
  20. `.` and `-` characters substituted with `_` (e.g.:
  21. +FOO_BAR_BOO_VERSION+).
  22. [[github-download-url]]
  23. How to add package from github
  24. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  25. If the package has no release version, or its version cannot be
  26. identified using tag, then the sha1 of the particular commit should be
  27. used to identify the version (the first 7 characters of the sha1 are
  28. enough):
  29. ------------------------
  30. FOO_VERSION = 1234567
  31. FOO_SITE = http://github.com/<user>/<package>/tarball/<branch>
  32. ------------------------
  33. If the package version matches a tag, then this tag should be used to
  34. identify the version:
  35. ------------------------
  36. FOO_VERSION = v1.0
  37. FOO_SITE = http://github.com/<user>/<package>/tarball/$(FOO_VERSION)
  38. ------------------------