- 1 Guidelines for packaging Drupal 8 modules, themes, and profiles
Guidelines for packaging Drupal 8 modules, themes, and profiles
Different Kinds of Packages
- Modules: Modules extend and customize Drupal functionality.
- Themes: Themes allow users to change the look and feel of their Drupal site.
- Distributions/Profiles: Distributions provide site features and functions for a specific type of site.
Every package MUST be named
drupal8-<drupal_machine_name>. Drupal itself enforces unique machine names for each of its' projects and there is a single namespace for all modules, themes, and distributions/profiles. The
<drupal_machine_name> MUST match the drupal.org project name (i.e. drupal.org/project/
- Modules: A module package MUST be placed in the
%drupal8_modulesdirectory (base "
- Themes: A theme package MUST be placed in the
%drupal8_themesdirectory (base "
- Distributions/Profiles: A distribution/profile package MUST be placed in the
%drupal8_profilesdirectory (base "
- Libraries: A library package MUST be placed in the
%drupal8_librariesdirectory (base "
Requires and Provides
Every package MUST include the following in its' spec:
drupal8-rpmbuild package automatically scans files for provides  and requires  and automatically adds them to the package during build time as "
drupal8(<drupal_machine_name>)" virtual resources. The use of virtual provides and requires helps alleviate the confusion of sub-modules and which modules actually provide those sub-modules. They also help simplify spec files.
 From *.info filenames
 From *.info file "dependencies" entries
Requiring a Minimum PHP Version
Macros and Scriptlets
Macros provided by the
||8.0*|| Drupal 8 version.|
* Numeric value is dynamically updated by the Drupal 8 core package.
||Drupal 8 base directory.|
||Drupal 8 modules directory.|
||Drupal 8 profiles directory.|
||Drupal 8 themes directory.|
||Drupal 8 library directory.|