diff options
| -rw-r--r-- | CLAUDE.md | 31 |
1 files changed, 30 insertions, 1 deletions
@@ -74,7 +74,36 @@ install data files rather than compiled binaries. No stripping needed. ## SlackBuild Scripting Guidelines -- Follow the [SBo template](https://slackbuilds.org/templates/) as the base +### Templates (source of truth) + +Local templates live in `~/Templates/SlackBuilds/`. **Always start from the +matching template there** rather than writing a SlackBuild or its accompanying +files from scratch or from memory. The directory holds: + +- Per-build-type SlackBuild templates: `autotools-template.SlackBuild`, + `cmake-template.SlackBuild`, `meson-template.SlackBuild`, + `go-template.SlackBuild`, `conraid-go-template.SlackBuild`, + `python-template.SlackBuild`, `perl-template.SlackBuild`, + `rubygem-template.SlackBuild`, `haskell-template.SlackBuild`. Pick the one + matching the package's build system. +- Shared support files: `slack-desc`, `template.info`, `doinst.sh`, + `douninst.sh`, `README`. Use these as the base for the corresponding files + in a package. + +When the local template and the upstream SBo template disagree, the local one +wins. Only fall back to the [SBo template](https://slackbuilds.org/templates/) +if no local template fits. + +### Copyright line + +In every `.SlackBuild`, the maintainer copyright line is exactly: + +``` +# Copyright <year> danix <danix@danix.xyz> +``` + +### General + - Use `set -e` to abort on errors - Honor `$TMP`, `$BUILD`, `$TAG`, `$OUTPUT`; provide defaults if unset - Use `$ARCH` detection with proper `SLKCFLAGS` and `LIBDIRSUFFIX` |
