build(debian): add a Debian and Ubuntu package definition
Add a debhelper-free debian/ tree so a .deb can be built with the Go toolchain and dpkg-dev alone. debian/rules compiles the binary with -trimpath and the version from debian/changelog, then stages the binary, the lazyntfy(1) man page, the license, and the README. The package Depends on ca-certificates for TLS to the ntfy server.
This commit is contained in:
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
lazyntfy (0.1.0) unstable; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Amir Husayn Panahifar <ahp@panahifar.ir> Sun, 11 Oct 2026 12:00:00 +0330
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
Source: lazyntfy
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: Amir Husayn Panahifar <ahp@panahifar.ir>
|
||||
Build-Depends: golang-go (>= 2:1.26)
|
||||
Standards-Version: 4.7.0
|
||||
Homepage: https://src.panahifar.ir/ahp/lazyntfy
|
||||
Vcs-Git: https://src.panahifar.ir/ahp/lazyntfy.git
|
||||
Vcs-Browser: https://src.panahifar.ir/ahp/lazyntfy
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: lazyntfy
|
||||
Architecture: any
|
||||
Depends: ca-certificates
|
||||
Description: lazygit-style terminal client for ntfy
|
||||
lazyntfy is a terminal user interface for the ntfy pub-sub notification
|
||||
service, laid out like lazygit: topics in the left pane, messages in the
|
||||
middle pane, and the selected message in the right pane.
|
||||
.
|
||||
It speaks the ntfy HTTP API directly, subscribes to several topics over a
|
||||
single stream, reconnects automatically, summarizes Grafana and Alertmanager
|
||||
webhook bodies, and remembers topics and messages between runs in a small
|
||||
SQLite database.
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: lazyntfy
|
||||
Source: https://src.panahifar.ir/ahp/lazyntfy
|
||||
|
||||
Files: *
|
||||
Copyright: 2026 Amir Husayn Panahifar <ahp@panahifar.ir>
|
||||
License: GPL-3.0-or-later
|
||||
This program is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation, either version 3 of the License, or (at your
|
||||
option) any later version.
|
||||
.
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
.
|
||||
On Debian systems the full text of the GNU General Public License can be
|
||||
found in /usr/share/common-licenses/GPL-3.
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/make -f
|
||||
# Debian packaging without debhelper: the Go toolchain builds the binary and
|
||||
# the rules stage it by hand. This keeps the build dependencies to just Go.
|
||||
|
||||
export CGO_ENABLED = 0
|
||||
|
||||
PACKAGE := lazyntfy
|
||||
VERSION := $(shell dpkg-parsechangelog -SVersion)
|
||||
PKGDIR := debian/$(PACKAGE)
|
||||
|
||||
.PHONY: clean build build-arch build-indep binary binary-arch binary-indep
|
||||
|
||||
clean:
|
||||
rm -rf $(PKGDIR) $(PACKAGE)
|
||||
rm -f debian/files
|
||||
|
||||
build: build-arch build-indep
|
||||
|
||||
build-arch: $(PACKAGE)
|
||||
|
||||
build-indep:
|
||||
|
||||
$(PACKAGE):
|
||||
go build -trimpath -ldflags "-s -w -X main.version=$(VERSION)" -o $(PACKAGE) ./cmd/$(PACKAGE)
|
||||
|
||||
binary: binary-arch binary-indep
|
||||
|
||||
binary-arch: build-arch
|
||||
install -d $(PKGDIR)/DEBIAN
|
||||
install -Dm755 $(PACKAGE) $(PKGDIR)/usr/bin/$(PACKAGE)
|
||||
install -Dm644 man/lazyntfy.1 $(PKGDIR)/usr/share/man/man1/lazyntfy.1
|
||||
install -Dm644 LICENSE $(PKGDIR)/usr/share/doc/$(PACKAGE)/copyright
|
||||
install -Dm644 README.md $(PKGDIR)/usr/share/doc/$(PACKAGE)/README.md
|
||||
dpkg-gencontrol -p$(PACKAGE) -P$(PKGDIR)
|
||||
dpkg-deb --build --root-owner-group $(PKGDIR) ..
|
||||
|
||||
binary-indep:
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
3.0 (native)
|
||||
Reference in New Issue
Block a user