--- /dev/null
+
+prefix = /usr
+
+build:
+ # no-op
+clean:
+ # no-op
+
+install:
+ install -D extract/logcli-linux-$(DEB_BUILD_ARCH) $(DESTDIR)$(prefix)/bin/logcli
+
+.PHONY: install
--- /dev/null
+The Debian Package logcli
+----------------------------
+
+Packaging of https://grafana.com/docs/loki/v2.7.x/tools/logcli/
+
+ -- Michael Howe <michael@michaelhowe.org> Tue, 28 Feb 2023 18:08:57 +0000
--- /dev/null
+logcli for Debian
+----------------
+
+Packaged for internal consumption from the upstream binary. Not to be
+redistributed because it's horrible.
+
+ -- Michael Howe <michael@michaelhowe.org> Tue, 28 Feb 2023 18:08:57 +0000
--- /dev/null
+logcli for Debian
+----------------
+
+Use the update-version script to update the version of the logcli binary, bump
+the Debian changelog and build.
+
+
+ -- Michael Howe <michael@michaelhowe.org> Tue, 28 Feb 2023 18:08:57 +0000
+
--- /dev/null
+logcli (2.7.4) unstable; urgency=medium
+
+ * Initial Release.
+
+ -- Michael Howe <michael@michaelhowe.org> Tue, 28 Feb 2023 18:08:57 +0000
--- /dev/null
+Source: logcli
+Section: admin
+Priority: optional
+Maintainer: Michael Howe <michael@michaelhowe.org>
+Build-Depends: debhelper-compat (= 13)
+Standards-Version: 4.5.1
+Homepage: https://github.com/grafana/loki
+#Vcs-Browser: https://salsa.debian.org/debian/logcli
+#Vcs-Git: https://salsa.debian.org/debian/logcli.git
+Rules-Requires-Root: no
+
+Package: logcli
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: loki command line interface
+ Custom package of logcli, a command linke interface to loki
--- /dev/null
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: logcli
+Upstream-Contact: https://github.com/grafana/loki
+Source: https://github.com/grafana/loki
+
+Files: *
+Copyright: 2020-2023 Grafana Labs
+License: AGPL-3.0+
+
+Files: debian/*
+Copyright: 2023 Michael Howe <michael@michaelhowe.org>
+License: GPL-3.0+
--- /dev/null
+README.Debian
+README.source
+README
--- /dev/null
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+%:
+ dh $@
--- /dev/null
+3.0 (native)
--- /dev/null
+#!/bin/bash
+
+set -e
+set -u
+
+# eg v2.7.4
+VER=$1
+
+ARCHES=('amd64')
+
+mkdir -p extract/
+mkdir -p download/
+
+for arch in "${ARCHES[@]}"; do
+ DOWNLOAD_URL="https://github.com/grafana/loki/releases/download/${VER}/logcli-linux-${arch}.zip"
+ ZIPFILE="download/logcli-linux-${arch}-${VER}.zip"
+ wget -O "${ZIPFILE}" "${DOWNLOAD_URL}"
+ unzip "${ZIPFILE}" -d extract/
+done