blob: 0852b045f130be81596bb27780dcb2e8554e94de [file] [log] [blame]
Package directory
First of all, create a directory under the +package+ directory for
your software, for example +libfoo+.
Some packages have been grouped by topic in a sub-directory:
+multimedia+, +java+, +x11r7+, and +games+. If your package fits in
one of these categories, then create your package directory in these. file
Then, create a file named This file will contain the
option descriptions related to our +libfoo+ software that will be used
and displayed in the configuration tool. It should basically contain :
bool "libfoo"
This is a comment that explains what libfoo is.
The +bool+ line, +help+ line and other meta-informations about the
configuration option must be indented with one tab. The help text
itself should be indented with one tab and two spaces, and it must
mention the upstream URL of the project.
Of course, you can add other sub-options into a +if
BR2_PACKAGE_LIBFOO...endif+ statement to configure particular things
in your software. You can look at examples in other packages. The
syntax of the file is the same as the one for the kernel
Kconfig file. The documentation for this syntax is available at[]
Finally you have to add your new +libfoo/ to
+package/ (or in a category subdirectory if you decided to
put your package in one of the existing categories). The files
included there are 'sorted alphabetically' per category and are 'NOT'
source "package/libfoo/"
The file of your package must also ensure that
dependencies are enabled. Typically, Buildroot uses the following
* Use a +select+ type of dependency for dependencies on
libraries. These dependencies are generally not obvious and it
therefore make sense to have the kconfig system ensure that the
dependencies are selected. For example, the _libgtk2_ package uses
+select BR2_PACKAGE_LIBGLIB2+ to make sure this library is also
dependency for dependencies on toolchain options (large file
things, such as the system. In some cases, especially
dependency on toolchain options, it is recommended to add a
knows why the package is not available.
bool "acl"
depends on BR2_LARGEFILE
POSIX Access Control Lists, which are used to define more
fine-grained discretionary access rights for files and
This package also provides libacl.
comment "acl requires a toolchain with LARGEFILE support"
depends on !BR2_LARGEFILE
Note that such dependencies will make sure that the dependency option
The file
Finally, here's the hardest part. Create a file named It
describes how the package should be downloaded, configured, built,
installed, etc.
Depending on the package type, the file must be written in a
different way, using different infrastructures:
* *Makefiles for generic packages* (not using autotools or CMake):
These are based on an infrastructure similar to the one used for
autotools-based packages, but requires a little more work from the
developer. They specify what should be done for the configuration,
compilation, installation and cleanup of the package. This
infrastructure must be used for all packages that do not use the
autotools as their build system. In the future, other specialized
infrastructures might be written for other build systems. We cover
them through in a xref:gentargets-tutorial[tutorial] and a
* *Makefiles for autotools-based software* (autoconf, automake, etc.):
We provide a dedicated infrastructure for such packages, since
autotools is a very common build system. This infrastructure 'must'
be used for new packages that rely on the autotools as their build
system. We cover them through a xref:autotargets-tutorial[tutorial]
and xref:autotargets-reference[reference].
* *Makefiles for cmake-based software*: We provide a dedicated
infrastructure for such packages, as CMake is a more and more
commonly used build system and has a standardized behaviour. This
infrastructure 'must' be used for new packages that rely on
CMake. We cover them through a xref:cmaketargets-tutorial[tutorial]
and xref:cmaketargets-reference[reference].
* *Hand-written Makefiles:* These are currently obsolete, and no new
manual Makefiles should be added. However, since there are still
many of them in the tree, we keep them documented in a