From 0817bea2bb18880bea0710aa0214eff7088fa04b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=8D=9A=E4=BB=81=28Buo-ren=20Lin=29?= Date: Sun, 3 Mar 2019 00:13:33 +0800 Subject: [PATCH] Implement snap packaging, snaps are universal linux packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch implements the necessary details to package gotop as a snap that can be installed on various GNU/Linux distributions supported by Snapd. Signed-off-by: ๆž—ๅšไป(Buo-ren Lin) --- .gitignore | 8 ++++++++ snap/snapcraft.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 snap/snapcraft.yaml diff --git a/.gitignore b/.gitignore index 9b247b8..e310733 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,10 @@ dist/ gotop* + +# snap packaging specific +/parts/ +/prime/ +/stage/ +/*.snap +/snap/.snapcraft/ +/*_source.tar.bz2 diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000..bb81316 --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,38 @@ +name: gotop-cjbassi +base: core18 +version: determined-by-version-script +version-script: git describe --always --tags --dirty +summary: A terminal based graphical activity monitor inspired by gtop and vtop +description: | + Another terminal based graphical activity monitor, inspired by [gtop](https://github.com/aksakalli/gtop) and [vtop](https://github.com/MrRio/vtop), this time written in [Go](https://golang.org/)! + +grade: stable +confinement: strict +icon: assets/logo.png +license: AGPL-3.0 + +parts: + gotop: + source: . + plugin: go + go-importpath: github.com/cjbassi/gotop + build-packages: + - git-core + - gcc + +plugs: + # Required by the "Temperatures" widget + hardware-observe: + + # Required by the "Disk Usage" widget + mount-observe: + + # Required by the "Processes" widget + system-observe: + +apps: + gotop-cjbassi: + command: bin/gotop + environment: + LANG: C.UTF-8 + LC_ALL: C.UTF-8