diff --git a/pkg/doc.txt b/pkg/doc.txt index e0d3025e41..57446f1114 100644 --- a/pkg/doc.txt +++ b/pkg/doc.txt @@ -72,5 +72,34 @@ * * commit your changes using `git commit` * * create the patch files using `git format-patch -n riot-port` * * move the resulting patch files to the patches directory of your package. + * + * Packages outside of RIOTPKG + * --------------------------- + * It can be beneficial to create packages outside of the RIOT tree. For example + * if one is working on new packages that aren't ready to be committed to + * upstream or if an application needs its own unique packages. For this, one + * can use the `EXTERNAL_PKG_DIRS` make variable. It works similar to the way + * [external modules](src/creating-modules.html#modules-outside-of-riotbase) are + * handled. In your application's Makefile, in addition to adding the package + * name to `USEPKG` as shown above, add the path to a folder that contains your + * external packages: + * + * ~~~~~~~~ {.mk} + * EXTERNAL_PKG_DIRS += + * ~~~~~~~~ + * + * The path is allowed to be relative to the application's directory. + * + * ***NOTE:*** The name of an external package must be unique (both in regard to + * other external packages, as well to native RIOT packages). Additionally, the + * directory containing the packages must match the package name, e.g. package + * `foo`must be located in `/foo`. + * + * An example can be found in + * [`tests/external_pkg_dirs`](https://github.com/RIOT-OS/RIOT/tree/master/tests/external_pkg_dirs) + * + * RIOT welcomes new and useful packages. If you'd like to share your work, + * consider [contributing](https://github.com/RIOT-OS/RIOT/tree/master/CONTRIBUTING.md). + * * @} */