1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
# SlackBuild: gitea-cli (gitea CLI client, command "tea")
Date: 2026-07-06
Maintainer: danix
## Goal
Package the Gitea command-line client as a SlackBuild built from source, for the
personal repo. Upstream: https://gitea.com/gitea/tea
## Naming
The package is named `gitea-cli`, NOT `tea`: SBo already has an unrelated `tea`
package (a text editor) in the development category. The SlackBuild uses
`PRGNAM=gitea-cli` and `SRCNAM=tea`; the upstream tarball's top dir and the
installed binary (`/usr/bin/tea`) both keep the upstream name `tea`.
## Target: personal repo only
Network build (modules fetched at build time via GOPROXY). This is NOT
SBo-legal (SBo forbids network access during build and would require a vendored
source tarball). Decision: personal repo only, do not submit to SlackBuilds.org.
## Scope
Single package `tea`, version 0.14.2, x86_64, built via `go build`.
## Files
```
tea/
├── tea.SlackBuild
├── tea.info
├── README
└── slack-desc
```
Plus one entry in `.extras/nvchecker.toml`.
## Build script
Clone `gitleaks/gitleaks.SlackBuild` (existing Go template in this repo) verbatim,
with these changes:
- `PRGNAM=tea`, `VERSION=0.14.2`
- The gitea archive extracts to a top dir named `tea/`, NOT `tea-0.14.2/`.
So: `rm -rf $PRGNAM`, `tar xvf .../$PRGNAM-$VERSION.tar.gz`, `cd $PRGNAM`.
- Version stamp in ldflags (tea injects its version via a version package):
`LIB_LDFLAGS='-linkmode=external -s -w -X "gitea.dev/tea/modules/version.Version=$VERSION"'`
- Build: `go build -ldflags="$LIB_LDFLAGS" -o "$PKG"/usr/bin/tea .`
- Docs installed: `LICENSE README.md CONTRIBUTING.md`
Everything else (GOPATH sandbox, CGO flags, GOFLAGS, strip, makepkg) unchanged
from gitleaks.
## Environment facts
- **No `vendor/` dir** in the tarball. Build fetches modules over the network via
GOPROXY (`https://proxy.golang.org,direct`). Build host needs internet.
- **Requires Go 1.26.** Confirmed: Go 1.26.4 present on this machine and the
buildsystem VM. (Note: buildsystem also has a gccgo 1.18 at `/usr/bin/go` —
ignore it, the real toolchain is used.)
- Module path is `gitea.dev/tea`; `main.go` is at repo root, so `go build .`.
- Without the version ldflag, `tea --version` reports blank/dev.
## .info
```
PRGNAM="tea"
VERSION="0.14.2"
HOMEPAGE="https://gitea.com/gitea/tea"
DOWNLOAD="https://gitea.com/gitea/tea/archive/v0.14.2.tar.gz"
MD5SUM="b1f37f2cc43763a3a0c05f060b485768"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="google-go-lang"
MAINTAINER="danix"
EMAIL="danix@danix.xyz"
```
REQUIRES `google-go-lang`: the Go toolchain is needed to build. It is a
build-only dependency; the resulting binary is a static Go executable with no
runtime deps.
## slack-desc
11-line format. First line `tea: tea (Gitea command line tool)`. Body describes
tea: interact with Gitea/Forgejo servers from the CLI (issues, PRs, releases,
repos, etc).
## nvchecker
```toml
[tea]
source = "gitea"
gitea = "gitea/tea"
use_max_tag = true
```
No `host` key (only needed for self-hosted instances; default is gitea.com).
## Verification
1. `sbolint` clean on the 4 files.
2. `sbodl` reports md5sum matches OK.
3. Build on buildsystem VM (Go 1.26 + network). `sbopkglint` clean.
4. `tea --version` on installed binary shows `0.14.2`, not blank.
## Out of scope
- Multi-arch (arm/aarch64). x86_64 only.
- Prebuilt-binary variant (`tea-bin`).
- SBo submission (needs a vendored source tarball; not done here).
|