You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/packaging/packaging-practices.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -306,6 +306,7 @@ The `patterns` key expects a `dict(s)` argument. The default key for each patter
306
306
307
307
There are two ways to name a pattern. Say you have a package named `foo`, and you want to create a subpackage `foo-bar`. You can do this by creating a pattern with the key `bar`. The name of the key will be appended to the name of the package.
308
308
309
+
<!-- prettier-ignore -->
309
310
```yaml
310
311
name : foo
311
312
patterns :
@@ -315,6 +316,7 @@ patterns :
315
316
316
317
If you don't want the name of the subpackage to start with the name of the main package, you can do that, too. Keys starting with a `^` character will not prepend the base package name to the name of the subpackage. If you want to create a package named `bar` from the `foo` package, it would look like this:
317
318
319
+
<!-- prettier-ignore -->
318
320
```yaml
319
321
name : foo
320
322
patterns :
@@ -328,6 +330,7 @@ Often with subpackages, you will want a different component, summary, descriptio
328
330
329
331
If you have package `foo` and subpackage `foo-bar`, changing the properties would look like this:
330
332
333
+
<!-- prettier-ignore -->
331
334
```yaml
332
335
name : foo
333
336
license :
@@ -357,13 +360,15 @@ Usually, packages will automatically depend on created subpackages by default. C
357
360
358
361
In this example from `libjpeg-turbo`, we move all documentation into the `docs` subpackage:
359
362
363
+
<!-- prettier-ignore -->
360
364
```yaml
361
365
patterns :
362
366
- docs : [/usr/share/man]
363
367
```
364
368
365
369
This example, taken from the `wayland` package, ensures the binaries from `/usr/bin` and the directory `/usr/share/wayland` are located in the `devel` subpackage:
366
370
371
+
<!-- prettier-ignore -->
367
372
```yaml
368
373
patterns :
369
374
- devel :
@@ -373,6 +378,7 @@ patterns :
373
378
374
379
To create a header-only package, like `spirv-headers`, create a pattern that matches all files. This can also be used in cases where you don't want any automatically-generated subpackages.
375
380
381
+
<!-- prettier-ignore -->
376
382
```yaml
377
383
patterns :
378
384
- /*
@@ -388,7 +394,8 @@ The `replaces` ypkg key uses the `dict(s)` type, and the default key is assumed
388
394
389
395
In this example, we rename the `libgeoclue*` packages to use the correct names, and ensure a working upgrade path.
0 commit comments