mirror of
https://oauth2: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@github.com/m1ngsama/TNT.git
synced 2026-06-26 21:54:38 +08:00
packaging: add debian package draft
This commit is contained in:
parent
2490262332
commit
4c7b72e7a0
9 changed files with 98 additions and 4 deletions
|
|
@ -39,6 +39,8 @@
|
||||||
release for manual review instead of publishing immediately.
|
release for manual review instead of publishing immediately.
|
||||||
- The one-line installer now downloads `checksums.txt`, verifies the selected
|
- The one-line installer now downloads `checksums.txt`, verifies the selected
|
||||||
binary before installation, and fails fast on missing release assets.
|
binary before installation, and fails fast on missing release assets.
|
||||||
|
- Added a Debian packaging metadata draft for the future Ubuntu PPA path, with
|
||||||
|
lightweight validation in `make release-check`.
|
||||||
|
|
||||||
## 2026-05-18 - Interactive input polish
|
## 2026-05-18 - Interactive input polish
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,12 @@ any public registry.
|
||||||
|
|
||||||
- `arch/PKGBUILD` - AUR-ready draft for `tnt-chat`.
|
- `arch/PKGBUILD` - AUR-ready draft for `tnt-chat`.
|
||||||
- `homebrew/tnt-chat.rb` - Homebrew tap formula draft.
|
- `homebrew/tnt-chat.rb` - Homebrew tap formula draft.
|
||||||
- `debian/README.md` - Ubuntu PPA / Debian packaging notes.
|
- `debian/` - Ubuntu PPA / Debian packaging notes and draft metadata.
|
||||||
|
|
||||||
## Release checklist
|
## Release checklist
|
||||||
|
|
||||||
1. Confirm `TNT_VERSION` in `include/common.h` and the manpage version match.
|
1. Confirm `TNT_VERSION` in `include/common.h` and the manpage version match.
|
||||||
|
Also update package versions in Arch, Homebrew, and Debian drafts.
|
||||||
2. Create a GitHub release tag such as `v1.0.0`.
|
2. Create a GitHub release tag such as `v1.0.0`.
|
||||||
3. Build and upload release tarballs or rely on GitHub source archives.
|
3. Build and upload release tarballs or rely on GitHub source archives.
|
||||||
4. Replace placeholder checksums in package drafts.
|
4. Replace placeholder checksums in package drafts.
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,22 @@ Ubuntu distribution should start with a Launchpad PPA. Direct inclusion in
|
||||||
Debian or Ubuntu archives is a separate, slower process and should wait until
|
Debian or Ubuntu archives is a separate, slower process and should wait until
|
||||||
the project has a stable release cadence.
|
the project has a stable release cadence.
|
||||||
|
|
||||||
|
## Draft metadata
|
||||||
|
|
||||||
|
The `debian/` directory in this folder is a packaging draft. To test it against
|
||||||
|
an upstream release tree, copy it to the root of a clean source checkout:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cp -a packaging/debian/debian ./debian
|
||||||
|
dpkg-buildpackage -us -uc
|
||||||
|
```
|
||||||
|
|
||||||
|
For PPA uploads, build a signed source package instead:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
debuild -S
|
||||||
|
```
|
||||||
|
|
||||||
## Recommended path
|
## Recommended path
|
||||||
|
|
||||||
1. Keep the upstream project installable with:
|
1. Keep the upstream project installable with:
|
||||||
|
|
@ -12,14 +28,13 @@ the project has a stable release cadence.
|
||||||
make DESTDIR="$pkgdir" PREFIX=/usr install
|
make DESTDIR="$pkgdir" PREFIX=/usr install
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Create Debian packaging metadata from a release tarball:
|
2. Review Debian packaging metadata from a release tarball:
|
||||||
|
|
||||||
- `debian/control`
|
- `debian/control`
|
||||||
- `debian/rules`
|
- `debian/rules`
|
||||||
- `debian/changelog`
|
- `debian/changelog`
|
||||||
- `debian/copyright`
|
- `debian/copyright`
|
||||||
- `debian/install`
|
- `debian/source/format`
|
||||||
- optional `debian/tnt.service`
|
|
||||||
|
|
||||||
3. Build locally with `debuild` or `dpkg-buildpackage`.
|
3. Build locally with `debuild` or `dpkg-buildpackage`.
|
||||||
4. Upload the signed source package to a Launchpad PPA.
|
4. Upload the signed source package to a Launchpad PPA.
|
||||||
|
|
|
||||||
5
packaging/debian/debian/changelog
Normal file
5
packaging/debian/debian/changelog
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
tnt-chat (1.0.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Initial package draft.
|
||||||
|
|
||||||
|
-- M1ng <REPLACE_WITH_EMAIL> Thu, 21 May 2026 00:00:00 +0800
|
||||||
22
packaging/debian/debian/control
Normal file
22
packaging/debian/debian/control
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
Source: tnt-chat
|
||||||
|
Section: net
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: M1ng <REPLACE_WITH_EMAIL>
|
||||||
|
Build-Depends:
|
||||||
|
debhelper-compat (= 13),
|
||||||
|
libssh-dev,
|
||||||
|
make,
|
||||||
|
gcc
|
||||||
|
Standards-Version: 4.7.0
|
||||||
|
Homepage: https://github.com/m1ngsama/TNT
|
||||||
|
Rules-Requires-Root: no
|
||||||
|
|
||||||
|
Package: tnt-chat
|
||||||
|
Architecture: any
|
||||||
|
Depends:
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: SSH-native terminal chat server
|
||||||
|
TNT is a minimalist terminal chat server accessed over SSH. It provides a
|
||||||
|
Vim-style terminal interface, anonymous access by default, persistent message
|
||||||
|
history, and a small non-interactive SSH exec surface for scripts.
|
||||||
26
packaging/debian/debian/copyright
Normal file
26
packaging/debian/debian/copyright
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: TNT
|
||||||
|
Source: https://github.com/m1ngsama/TNT
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: 2026 M1ng
|
||||||
|
License: MIT
|
||||||
|
|
||||||
|
License: MIT
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
.
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
.
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
11
packaging/debian/debian/rules
Executable file
11
packaging/debian/debian/rules
Executable file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
override_dh_auto_build:
|
||||||
|
$(MAKE)
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
|
$(MAKE) DESTDIR=$(CURDIR)/debian/tnt-chat PREFIX=/usr install
|
||||||
|
$(MAKE) DESTDIR=$(CURDIR)/debian/tnt-chat PREFIX=/usr install-systemd
|
||||||
1
packaging/debian/debian/source/format
Normal file
1
packaging/debian/debian/source/format
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
3.0 (quilt)
|
||||||
|
|
@ -15,6 +15,7 @@ Default checks:
|
||||||
- unit tests
|
- unit tests
|
||||||
- staged install layout with PREFIX=/usr and DESTDIR
|
- staged install layout with PREFIX=/usr and DESTDIR
|
||||||
- installer shell syntax
|
- installer shell syntax
|
||||||
|
- Debian packaging metadata
|
||||||
- Arch/Homebrew packaging syntax
|
- Arch/Homebrew packaging syntax
|
||||||
|
|
||||||
Environment:
|
Environment:
|
||||||
|
|
@ -65,6 +66,10 @@ grep -q "^pkgver=$version$" packaging/arch/PKGBUILD ||
|
||||||
fail "packaging/arch/PKGBUILD pkgver does not match $version"
|
fail "packaging/arch/PKGBUILD pkgver does not match $version"
|
||||||
grep -q "v${version}.tar.gz" packaging/homebrew/tnt-chat.rb ||
|
grep -q "v${version}.tar.gz" packaging/homebrew/tnt-chat.rb ||
|
||||||
fail "packaging/homebrew/tnt-chat.rb URL does not match v$version"
|
fail "packaging/homebrew/tnt-chat.rb URL does not match v$version"
|
||||||
|
grep -q "^tnt-chat (${version}-1)" packaging/debian/debian/changelog ||
|
||||||
|
fail "packaging/debian/debian/changelog version does not match $version"
|
||||||
|
grep -q "^Source: tnt-chat$" packaging/debian/debian/control ||
|
||||||
|
fail "packaging/debian/debian/control Source is not tnt-chat"
|
||||||
|
|
||||||
step "building"
|
step "building"
|
||||||
make clean
|
make clean
|
||||||
|
|
@ -101,6 +106,12 @@ make DESTDIR="$tmpdir" PREFIX=/usr install-systemd
|
||||||
step "checking installer syntax"
|
step "checking installer syntax"
|
||||||
sh -n install.sh
|
sh -n install.sh
|
||||||
|
|
||||||
|
step "checking Debian packaging metadata"
|
||||||
|
[ -x packaging/debian/debian/rules ] ||
|
||||||
|
fail "packaging/debian/debian/rules must be executable"
|
||||||
|
grep -q "^3.0 (quilt)$" packaging/debian/debian/source/format ||
|
||||||
|
fail "unsupported Debian source format"
|
||||||
|
|
||||||
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