Merge pull request #42 from kz6fittycent/main

Snap is published and running
This commit is contained in:
aristocratos 2021-09-26 21:07:59 +02:00 committed by GitHub
commit 9f870953c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 110 additions and 1 deletions

15
.gitignore vendored
View File

@ -1,3 +1,18 @@
# gitginore template for creating Snap packages
# website: https://snapcraft.io/
parts/
prime/
stage/
*.snap
# Snapcraft global state tracking data(automatically generated)
# https://forum.snapcraft.io/t/location-to-save-global-state/768
/snap/.snapcraft/
# Source archive packed by `snapcraft cleanbuild` before pushing to the LXD container
/*_source.tar.bz2
# Prerequisites
*.d

View File

@ -7,7 +7,7 @@
[![Donate](https://img.shields.io/badge/-Donate-yellow?logo=paypal)](https://paypal.me/aristocratos)
[![Sponsor](https://img.shields.io/badge/-Sponsor-red?logo=github)](https://github.com/sponsors/aristocratos)
[![Coffee](https://img.shields.io/badge/-Buy%20me%20a%20Coffee-grey?logo=Ko-fi)](https://ko-fi.com/aristocratos)
[![btop](https://snapcraft.io/btop/badge.svg)](https://snapcraft.io/btop)
## Index
@ -23,6 +23,7 @@
* [Keybindings](#help-menu)
* [Installation](#installation)
* [Manual compilation](#compilation)
* [Install the snap](#install-the-snap)
* [Configurability](#configurability)
* [License](#license)
@ -279,6 +280,21 @@ Also needs a UTF8 locale and a font that covers:
```bash
make help
```
## Install the snap
[![btop](https://snapcraft.io/btop/badge.svg)](https://snapcraft.io/btop)
`sudo snap install btop`
* **Connect the interfaces**
```
sudo snap connect btop:system-observe
sudo snap connect btop:physical-memory-observe
sudo snap connect btop:mount-observe
sudo snap connect btop:hardware-observe
sudo snap connect btop:network-observe
```
## Configurability

78
snap/snapcraft.yaml Normal file
View File

@ -0,0 +1,78 @@
name: btop
adopt-info: btop
summary: Resource monitor that shows usage and stats
description: |
Resource monitor that shows usage and stats for processor, memory, disks, network and processes.
C++ version and continuation of bashtop and bpytop.
license: Apache-2.0
assumes:
- command-chain
base: core20
grade: stable
confinement: strict
compression: lzo
architectures:
- build-on: amd64
- build-on: arm64
- build-on: armhf
- build-on: ppc64el
- build-on: s390x
package-repositories:
- type: apt
ppa: ubuntu-toolchain-r/test
apps:
btop:
command: usr/local/bin/btop
command-chain:
- bin/homeishome-launch
environment:
LC_ALL: C.UTF-8
LANG: C.UTF-8
plugs:
- mount-observe
- process-control
- system-observe
- hardware-observe
- network
- network-observe
- physical-memory-observe
- home
parts:
btop:
source: https://github.com/aristocratos/btop
source-type: git
plugin: make
make-parameters:
- PREFIX=/usr/local
build-packages:
- coreutils
- sed
- git
- build-essential
- gcc-11
- g++-11
stage-packages:
- coreutils
- sed
- git
- build-essential
- gcc-11
- g++-11
override-pull: |
snapcraftctl pull
snapcraftctl set-version "$(git describe --tags | sed 's/^v//' | cut -d "-" -f1)"
homeishome-launch:
plugin: nil
stage-snaps:
- homeishome-launch