buildrootschalter/docs/manual/adding-packages-tips.txt
Simon Dawson ecd2353555 manual: minor tweaks
Minor grammatical and spelling tweaks to the manual content.

Signed-off-by: Simon Dawson <spdawson@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-11-16 22:24:42 +01:00

55 lines
1.6 KiB
Plaintext

// -*- mode:doc; -*-
Tips and tricks
~~~~~~~~~~~~~~~
[[package-name-variable-relation]]
Package name, config entry name and makefile variable relationship
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In Buildroot, there is some relationship between:
* the _package name_, which is the package directory name (and the
name of the +*.mk+ file);
* the config entry name that is declared in the +Config.in+ file;
* the makefile variable prefix.
It is mandatory to maintain consistency between these elements,
using the following rules:
* the _make_ target name will be the _package name_ itself (e.g.:
+foo-bar_boo+);
* the config entry is the upper case _package name_ with `.` and `-`
characters substituted with `_`, prefixed with +BR2_PACKAGE_+ (e.g.:
+BR2_PACKAGE_FOO_BAR_BOO+);
* the +*.mk+ file variable prefix is the upper case _package name_
`.` and `-` characters substituted with `_` (e.g.:
+FOO_BAR_BOO_VERSION+).
[[github-download-url]]
How to add package from github
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If the package has no release version, or its version cannot be
identified using tag, then the sha1 of the particular commit should be
used to identify the version (the first 7 characters of the sha1 are
enough):
------------------------
FOO_VERSION = 1234567
FOO_SITE = http://github.com/<user>/<package>/tarball/<branch>
------------------------
If the package version matches a tag, then this tag should be used to
identify the version:
------------------------
FOO_VERSION = v1.0
FOO_SITE = http://github.com/<user>/<package>/tarball/$(FOO_VERSION)
------------------------