# 13.License

* [x] This is Optional & can be left empty or removed completely (**TYPE**: <mark style="color:blue;">**`NON_ENFORCED`**</mark>)
* [x] Is copied (installed) as [<mark style="color:orange;">**$APP\_PATH**</mark>](#user-content-fn-1)[^1]<mark style="color:orange;">**/**</mark><mark style="color:blue;">**LICENSE**</mark>
* [x] Use [**repology/projects/$pkg/information**](https://repology.org/projects/) to quickly fetch this Information
* [x] If used, it can only contain (One of these):

{% hint style="success" %}

* [x] <mark style="color:purple;">**`url`**</mark> : Is always preferred as the **1st Choice**, & **CAN NOT BE** used with others.
* [x] This refers to a raw url containing a <mark style="color:blue;">**`LICENSE`**</mark> file & is downloaded + saved at: <mark style="color:orange;">**`${SBUILD_OUTDIR}/LICENSE`**</mark>
* [x] If used, **only ONE entry is supported**

<pre class="language-yaml" data-overflow="wrap"><code class="lang-yaml">#Example ONLY
<strong>license:
</strong>  - id: "MIT"
    url: "https://raw.githubusercontent.com/pkgforge/soar/refs/heads/main/LICENSE" #Would be downloaded &#x26; saved as ${SBUILD_OUTDIR}/LICENSE
</code></pre>

{% endhint %}

{% hint style="success" %}

* [x] <mark style="color:purple;">**`file`**</mark> : Is ONLY preferred, if <mark style="color:purple;">**`url`**</mark> was NOT USED ( <mark style="color:orange;">**non-existent/empty**</mark>), as the **2nd Choice**
* [x] This refers to a direct path to a <mark style="color:blue;">**`LICENSE`**</mark> file produced during an sbuild.
* [x] While Multiple Entries are supported, the builder will stop checking upon the first successful find
* [x] The first valid <mark style="color:blue;">**`LICENSE`**</mark> file is copied to <mark style="color:orange;">**`${SBUILD_OUTDIR}/LICENSE`**</mark>

{% code overflow="wrap" %}

```yaml
#Example ONLY
# (All paths are assumed to be inside ${SBUILD_OUTDIR} i.e ${SBUILD_OUTDIR} == /
license:
  - id: "MIT"
    file: "/MIT.license" #Is assumed as ${SBUILD_OUTDIR}/MIT.license & copied to ${SBUILD_OUTDIR}/LICENSE
  - id: "GPL3"  
    file: "/SBUILD_TMPDIR/foo/bar.license" #Is assumed as ${SBUILD_OUTDIR}/SBUILD_TMPDIR/foo/bar.license & copied to ${SBUILD_OUTDIR}/LICENSE, IF & ONLY IF ${SBUILD_OUTDIR}/MIT.license wasn't found
```

{% endcode %}
{% endhint %}

{% hint style="warning" %}
If you can't find a direct URL to the <mark style="color:blue;">**`LICENSE`**</mark> file & it's also not produced during build anywhere inside <mark style="color:orange;">**`${SBUILD_OUTDIR}`**</mark> , then you may use:

* [x] [<mark style="color:purple;">**`spdx-identifier`**</mark>](https://spdx.org/licenses/): Any (or Multiple if applicable) of the identifiers listed at: <https://spdx.org/licenses/>, as the **3rd & Final Choice**

```yaml
#Example ONLY
license:
  - "GPL-2+"
  - "GPL-2.0"
  - "GPL-2.0-only"
  - "GPL-2.0-or-later"
  - "GPL2"
  - "GPLv3"
  - "Unfree"
```

{% endhint %}

[^1]: $APP\_PATH refers to the directory soar installs the respective APP


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pkgforge.dev/sbuild/specification/13.license.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
