From ff0acda289b298fe9d9e27c41d5ed4d1fa165ed0 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Mon, 18 Jan 2021 13:19:32 +0000 Subject: [PATCH] Build a Debian package --- .gitlab-ci.yml | 1 + debian/changelog | 5 ++++ debian/compat | 1 + debian/control | 12 ++++++++++ debian/copyright | 29 ++++++++++++++++++++++++ debian/docs | 0 debian/jitsi-prometheus-exporter.service | 19 ++++++++++++++++ debian/rules | 9 ++++++++ debian/source/format | 1 + go.mod | 3 +++ 10 files changed, 80 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/jitsi-prometheus-exporter.service create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 go.mod diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f9d4632 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1 @@ +include: "https://git.autistici.org/ai3/build-deb/raw/master/ci-common.yml" diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..3d3e716 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +jitsi-prometheus-exporter (0.1) unstable; urgency=low + + * Initial Release. + + -- ale <ale@incal.net> Mon, 17 Jan 2021 13:17:23 +0000 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..460437e --- /dev/null +++ b/debian/control @@ -0,0 +1,12 @@ +Source: jitsi-prometheus-exporter +Section: admin +Priority: optional +Maintainer: ale <ale@incal.net> +Build-Depends: debhelper (>= 9), dh-golang, golang-any +Standards-Version: 3.9.6 + +Package: jitsi-prometheus-exporter +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Jitsi prometheus exporter + Exports Jitsi usage metrics to Prometheus. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..c9e1969 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,29 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: jitsi-prometheus-exporter +Source: <url://example.com> + +Files: * +Copyright: 2020 <ale@incal.net> +License: GPL-3.0+ + +Files: debian/* +Copyright: 2017 ale <ale@incal.net> +License: GPL-3.0+ + +License: GPL-3.0+ + 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 package 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. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e69de29 diff --git a/debian/jitsi-prometheus-exporter.service b/debian/jitsi-prometheus-exporter.service new file mode 100644 index 0000000..23626de --- /dev/null +++ b/debian/jitsi-prometheus-exporter.service @@ -0,0 +1,19 @@ +[Unit] +Description=Jitsi Prometheus exporter + +[Service] +User=nobody +ExecStart=/usr/bin/jitsi-prometheus-exporter +Restart=always +RestartSec=3 + +NoNewPrivileges=yes +PrivateTmp=yes +PrivateDevices=yes +ProtectHome=yes +ProtectSystem=full +ReadOnlyDirectories=/ + +[Install] +WantedBy=multi-user.target + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..50f07cd --- /dev/null +++ b/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +export DH_GOPKG := git.autistici.org/ai3/tools/jitsi-prometheus-exporter + +%: + dh $@ --buildsystem=golang --with=golang --with=systemd + +override_dh_auto_install: + dh_auto_install -- --no-source diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..aa34d24 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.autistici.org/ai3/tools/jitsi-prometheus-exporter + +go 1.14 -- GitLab