Sugar Network/Recipe Specification: Difference between revisions
| Line 275: | Line 275: | ||
== Recipes == | == Recipes == | ||
In some cases, e.g., to save storage space or bandwidth, it is useful to split a packaged application into several | In some cases, e.g., to save storage space or bandwidth, it is useful to split a packaged application into several tarballs when some tarballs will contain any-arch data, that are common for all platforms, and other will contain binaries for particular platform. Thus, if an application supports several platforms and any-arch data is big (various media, text, etc. files), there will not be duplicate tarballs. | ||
The key differences between recipes and sub packages: | |||
* Sub packages are logically independent parts of the package; | |||
* Each sub package is identified by unique 0install url, all recipe components are identified by recipe url; | |||
* Tarballs for different sub packages will be extracted to different directories, recipe component tarballs, within the same recipe, will be extracted to the same directory. | |||
Use the ''recipe'' option to declare a (sub)package(s) as a recipe: | Use the ''recipe'' option to declare a (sub)package(s) as a recipe: | ||
| Line 289: | Line 294: | ||
Being a recipe, the package section cannot contain files-related options (since package itself does not contain any tarballs directly, only via recipe components), these options could be set only in components: | Being a recipe, the package section cannot contain files-related options (since package itself does not contain any tarballs directly, only via recipe components), these options could be set only in components: | ||
* langs | * langs | ||
* arch | * arch | ||
* include | * include | ||
* exclude | * exclude | ||
* exec | * exec | ||
* slots | * slots | ||
The same component could be a part of different recipes. In that case, different package implementations will contain the same recipe component tarball. | The same component could be a part of different recipes. In that case, different package implementations will contain the same recipe component tarball. | ||
== Slots == | == Slots == | ||