icon | description |
---|---|
wrench |
How to write an .SBUILD |
-
Yes, really. Do it Now: https://soar.qaidvoid.dev/install
{% hint style="info" %}
- bash, b3sum, curl, coreutils, file, findutils (find, xargs), fuse3 (fusermount3), gettext, grep, jq, sed, shellcheck, wget, yj, yq
- Some of these can be installed with
Soar
soar add 'bash/bash#base' \
'b3sum#bin' \
'curl#bin' \
'findutils/find#base' \
'grep/grep#base' \
'jq#bin' \
'sed#bin' \
'shellcheck#bin' \
'findutils/xargs#base' \
'yj#bin' \
'yq#bin' --yes
-
But if Possible, Use your Distro's own PKG Manager to avoid breaking stuff {% endhint %}
-
Read the
Spec
: https://docs.pkgforge.dev/sbuild/specification -
View some Examples : https://github.com/pkgforge/soarpkgs/tree/main/packages
- Copy the Generic Template: https://github.com/pkgforge/soarpkgs/blob/main/templates/generic.SBUILD.yaml
- Use the Repology Fetcher: https://raw.githubusercontent.com/pkgforge/metadata/main/soarpkgs/scripts/repology_fetcher.sh
{% code overflow="wrap" %}
!#Assuming You have READ & VERIFIED what the script contains source <(curl -qfsSL "https://raw.githubusercontent.com/pkgforge/metadata/main/soarpkgs/scripts/repology_fetcher.sh") #The function itself is `repology_fetcher` but is aliased to `repology-fetcher` for convenience #If you don't want to source it, just download and save it somewhere in $PATH !#Run it with the app/pkg_name repology-fetcher "pkg_name" #Example: repology-fetcher "librewolf"{% endcode %}
- Start Filling in the Generic Template by Consulting an Example or the SPEC
- After you are done, you can validate it using the sbuild-linter: https://github.com/pkgforge/sbuilder
{% code overflow="wrap" %}
!#Add it using Soar soar add "sbuild-linter" "shellcheck" #Or Download manually & Add to Path: https://github.com/pkgforge/sbuilder/releases !#Run it with /path/to/your/SBUILD sbuild-linter "./example.SBUILD" #If it's not successful, fix your errors !#To get pkgver sbuild-linter "./example.SBUILD" --pkgver{% endcode %}
- If your
SBUILD
gets validated successfully, Congrats! You can now create aPull Request
or anIssue
, Remember to Link/Copy&Paste the.validated
version of yourSBUILD
{% hint style="warning" %} It is recommended you setup a sandbox or containerized environment before running arbitrary SBUILDs that have NOT been approved by a maintainer into pkgforge/soarpkgs {% endhint %}
!#Add it using Soar
soar add "sbuild" "shellcheck"
#Or Download manually & Add to Path: https://github.com/pkgforge/sbuilder/releases
!#Run it with /path/to/your/SBUILD
sbuild "./example.SBUILD" --log-level "verbose" --keep --outdir "./SBUILD-TEST"
#If it's not successful, fix your errors
Footnotes
-
Only needed if you intend to use the Automation Scripts.
Otherwise, you may skip this & just do everything manually ↩