mirror of
https://oauth2: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@github.com/m1ngsama/TNT.git
synced 2026-06-26 05:44:38 +08:00
Add Homebrew service metadata
This commit is contained in:
parent
51f264bca2
commit
57d0f931b5
4 changed files with 21 additions and 0 deletions
|
|
@ -111,6 +111,8 @@
|
||||||
locale selection, matching the server CLI's i18n behavior.
|
locale selection, matching the server CLI's i18n behavior.
|
||||||
- Arch and Debian packaging drafts now create the `tnt` system user used by
|
- Arch and Debian packaging drafts now create the `tnt` system user used by
|
||||||
the packaged systemd unit, and release preflight checks that metadata.
|
the packaged systemd unit, and release preflight checks that metadata.
|
||||||
|
- The Homebrew formula draft now defines a `brew services` entry that runs the
|
||||||
|
installed `tnt` binary with state under `var/tnt`.
|
||||||
- Split UI-language parsing from localized text lookup: `src/i18n.c` now owns
|
- Split UI-language parsing from localized text lookup: `src/i18n.c` now owns
|
||||||
locale/code parsing, while `src/i18n_text.c` owns the table-driven text
|
locale/code parsing, while `src/i18n_text.c` owns the table-driven text
|
||||||
catalog with coverage checks for every message ID.
|
catalog with coverage checks for every message ID.
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ project tap first, not Homebrew core:
|
||||||
```sh
|
```sh
|
||||||
brew tap m1ngsama/tnt
|
brew tap m1ngsama/tnt
|
||||||
brew install tnt-chat
|
brew install tnt-chat
|
||||||
|
brew services start tnt-chat
|
||||||
```
|
```
|
||||||
|
|
||||||
Homebrew core should wait until TNT has stable releases and broader usage.
|
Homebrew core should wait until TNT has stable releases and broader usage.
|
||||||
|
|
@ -18,6 +19,7 @@ From a tap repository:
|
||||||
brew audit --strict --online tnt-chat
|
brew audit --strict --online tnt-chat
|
||||||
brew install --build-from-source ./Formula/tnt-chat.rb
|
brew install --build-from-source ./Formula/tnt-chat.rb
|
||||||
brew test tnt-chat
|
brew test tnt-chat
|
||||||
|
brew services run tnt-chat
|
||||||
```
|
```
|
||||||
|
|
||||||
For local syntax-only validation from this repository:
|
For local syntax-only validation from this repository:
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,17 @@ class TntChat < Formula
|
||||||
bin.install "#{buildpath}/stage#{prefix}/bin/tntctl"
|
bin.install "#{buildpath}/stage#{prefix}/bin/tntctl"
|
||||||
man1.install "#{buildpath}/stage#{prefix}/share/man/man1/tnt.1"
|
man1.install "#{buildpath}/stage#{prefix}/share/man/man1/tnt.1"
|
||||||
man1.install "#{buildpath}/stage#{prefix}/share/man/man1/tntctl.1"
|
man1.install "#{buildpath}/stage#{prefix}/share/man/man1/tntctl.1"
|
||||||
|
|
||||||
|
(var/"tnt").mkpath
|
||||||
|
(var/"log").mkpath
|
||||||
|
end
|
||||||
|
|
||||||
|
service do
|
||||||
|
run [opt_bin/"tnt", "-d", var/"tnt"]
|
||||||
|
keep_alive true
|
||||||
|
working_dir var/"tnt"
|
||||||
|
log_path var/"log/tnt.log"
|
||||||
|
error_log_path var/"log/tnt.log"
|
||||||
end
|
end
|
||||||
|
|
||||||
test do
|
test do
|
||||||
|
|
|
||||||
|
|
@ -179,6 +179,12 @@ grep -q '^u tnt ' packaging/arch/tnt-chat.sysusers ||
|
||||||
grep -q 'usr/lib/sysusers.d' packaging/arch/PKGBUILD ||
|
grep -q 'usr/lib/sysusers.d' packaging/arch/PKGBUILD ||
|
||||||
fail "PKGBUILD must install the sysusers.d file"
|
fail "PKGBUILD must install the sysusers.d file"
|
||||||
|
|
||||||
|
step "checking Homebrew service metadata"
|
||||||
|
grep -q "service do" packaging/homebrew/tnt-chat.rb ||
|
||||||
|
fail "Homebrew formula must define a brew services entry"
|
||||||
|
grep -q 'opt_bin/"tnt"' packaging/homebrew/tnt-chat.rb ||
|
||||||
|
fail "Homebrew service must run the installed tnt binary"
|
||||||
|
|
||||||
step "checking packaging syntax"
|
step "checking packaging syntax"
|
||||||
if command -v bash >/dev/null 2>&1; then
|
if command -v bash >/dev/null 2>&1; then
|
||||||
bash -n packaging/arch/PKGBUILD
|
bash -n packaging/arch/PKGBUILD
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue