Skip to content

Commit 900feec

Browse files
committed
docs: Add documentation for the %install_license macro
Signed-off-by: Evan Maddock <[email protected]>
1 parent b3ab8ab commit 900feec

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

docs/packaging/package.yml.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ Macros are prefixed with `%`, and are substituted before your script is executed
165165
| **%apply_patches** | Applies all patches listed in the `series` file in `./files` folder. |
166166
| **%reconfigure** | Updates build scripts such as `./configure` and proceeds to run `%configure`. |
167167
| **%symlink_check** | Checks for broken symlinks in the install directory and aborts the build if any are found. Must run after install macros. |
168+
| **%install_license** | Installs any files after the macro to `$installdir/usr/share/licenses/$package/`. |
168169

169170
### Haskell actionable macros
170171

docs/packaging/packaging-changes.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ This page is meant to serve as a changelog of sorts for the Solus packaging envi
1313

1414
## 2025
1515

16+
### December
17+
18+
#### Mandate installation of license files
19+
20+
- Packages must now have license files installed so we are compliant.
21+
- License files can be easily installed with the new `%install_license` macro.
22+
```yaml
23+
install : |
24+
%ninja_install
25+
%install_license LICENSE
26+
%install_license LICENSES/*
27+
```
28+
1629
### November
1730
1831
#### Initial language server integration for `package.yml` files

docs/packaging/packaging-practices.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ All new packages or updates to packages should abide by the [SPDX 3.x](https://s
9090

9191
- `-only` licenses, such as `GPL-2.0-only`, should **only be declared** as such when the upstream explicitly states "only", otherwise it should always be `-or-later`.
9292

93+
License files that are present in an upstream project must also be installed with the package. This can be easily done with the `%install_license` macro. The macro will install any files passed to it to the system licenses directory, `$installdir/usr/share/licenses/$package/`. The files passed to the macro are expected to be relative to the project's source root.
94+
95+
```yaml
96+
install : |
97+
%ninja_install
98+
%install_license LICENSE
99+
%install_license LICENSES/*
100+
```
101+
93102
## Build dependencies
94103
95104
:::note

0 commit comments

Comments
 (0)