36 lines
1.3 KiB
Markdown
36 lines
1.3 KiB
Markdown
# Deb Package Template
|
|
|
|
## Quick Start
|
|
|
|
1. Fork/copy this template
|
|
2. Edit `debian/control` — set Package, Version, Description
|
|
3. Add your files (scripts in `usr/local/bin/`, systemd units in `etc/systemd/system/`, etc.)
|
|
4. Add Gitea secrets:
|
|
- `KUBECONFIG`: base64-encoded kubeconfig for pkg-repo-ci SA
|
|
5. Tag a release: `git tag v1.0.0 && git push --tags`
|
|
6. CI builds .deb and publishes to repo.n0ball.tw
|
|
|
|
## Package Structure
|
|
|
|
```
|
|
your-package/
|
|
├── .gitea/workflows/build-deb.yaml # CI pipeline (do not modify)
|
|
├── debian/
|
|
│ ├── control # Package metadata
|
|
│ ├── install # (optional) file install mapping
|
|
│ ├── postinst # (optional) post-install script
|
|
│ └── changelog # (optional) changelog
|
|
├── usr/local/bin/ # Scripts
|
|
├── etc/systemd/system/ # Systemd units
|
|
└── etc/ # Config files
|
|
```
|
|
|
|
## Client Setup
|
|
|
|
```bash
|
|
curl https://repo.n0ball.tw/pubkey.gpg | gpg --dearmor | sudo tee /etc/apt/keyrings/n0ball.gpg > /dev/null
|
|
echo "deb [signed-by=/etc/apt/keyrings/n0ball.gpg] https://repo.n0ball.tw/debian trixie main" | sudo tee /etc/apt/sources.list.d/n0ball.list
|
|
sudo apt update
|
|
sudo apt install your-package
|
|
```
|