English
Different Kinds of Packages
*https://drupal.org/project/modules[Modules]*: Modules extend and customize Drupal functionality.
*https://drupal.org/project/themes[Themes]*: Themes allow users to change the look and feel of their Drupal site.
Naming Scheme
Every package *MUST* be named `+drupal7-+`__`+<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/__`+<drupal_machine_name+`__`+>+`).
Macros and Scriptlets
Macros provided by the `+drupal7-rpmbuild+` package:
|Macro |Value |Description
|`+%drupal7+` |`+%{_datadir}/drupal7+` |Drupal 7 base directory
|`+%drupal7_modules+` |`+%{drupal7}/modules+` |Drupal 7 modules directory
|`+%drupal7_themes+` |`+%{drupal7}/themes+` |Drupal 7 themes directory
|`+%drupal7_libraries+` |`+%{_sysconfdir}/drupal7/all/libraries+` |Drupal 7 libraries directory
|`+%drupal7_find_provides_and_requires+` |_Fedora:_
`+%{nil}+` +
+
_EPEL 5/6:_ +
`+%{expand: \+` +
`+%global _use_internal_dependency_generator 0+` +
`+%global __find_provides %{_rpmconfigdir}/drupal7.prov %{version}+` +
`+%global __find_requires %{_rpmconfigdir}/drupal7.req+` +
`+}+` |_Fedora_:
No-op macro to allow spec compatibility with RPM < 4.9 (no fileattrs) +
+
_EPEL 5/6_: +
Macro to allow spec compatibility with RPM < 4.9 (no fileattrs)
File Placement
*Modules*: A module package *MUST* be placed in the `+%drupal7_modules+` directory
*Themes*: A theme package *MUST* be placed in the `+%drupal7_themes+` directory
*Libraries*: A library package *MUST* be placed in the `+%drupal7_libraries+` directory
Requires and Provides
Every package *MUST* require "`+drupal7(+``+)+`" virtual resources instead of "`+drupal7-+`" packages.
Every package *MUST* include the following in its' spec:
The `+drupal7-rpmbuild+` package automatically requires `+drupal7(core)+` and scans files for provides (from *.info files) and automatically adds them to the package during build time as "`+drupal7(+``+)+`" virtual resources. https://drupal.org/node/542202#hidden[Hidden projects] are ignored. The use of virtual provides and requires helps alleviate the confusion of sub-modules and which modules actually provide those sub-modules.
BuildRequires: drupal7-rpmbuild &gt;= 7.23-3
For compatibility with RPM < 4.9 (i.e. EPEL 5/6):
%{?drupal7_find_provides_and_requires}
Every package *MUST NOT*: