forked from ubuntu/gnome-system-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
98 lines (90 loc) · 3.08 KB
/
snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: gnome-system-monitor
adopt-info: gnome-system-monitor
summary: System Monitor
description: |
GNOME System Monitor is a GNOME process viewer and system monitor with
an attractive, easy-to-use interface, It has features, such as a tree
view for process dependencies, icons for processes, the ability to hide
processes that you don't want to see, graphical time histories of
CPU/memory/swap usage, the ability to kill/renice processes needing root
access, as well as the standard features that you might expect from a
process viewer.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict
base: core20
plugs:
run-systemd-sessions:
interface: system-files
read:
- /run/systemd/sessions
slots:
# for GtkApplication registration
gnome-system-monitor:
interface: dbus
bus: session
name: org.gnome.SystemMonitor
apps:
gnome-system-monitor:
extensions: [ gnome-3-38 ]
command: usr/bin/gnome-system-monitor
plugs:
- unity7
- mount-observe
- network-observe
- hardware-observe
- system-observe
- process-control
- run-systemd-sessions
desktop: usr/share/applications/gnome-system-monitor.desktop
common-id: gnome-system-monitor.desktop
parts:
gnome-system-monitor:
source: https://gitlab.gnome.org/GNOME/gnome-system-monitor.git
source-type: git
source-branch: gnome-40
plugin: meson
meson-parameters:
- --prefix=/snap/gnome-system-monitor/current/usr
- -Dsystemd=true
organize:
snap/gnome-system-monitor/current/usr: usr
override-pull: |
snapcraftctl pull
snapcraftctl set-version $(git describe --tags --abbrev=10)
sed -i.bak -e 's|Icon=org.gnome.SystemMonitor$|Icon=${SNAP}/meta/gui/org.gnome.SystemMonitor.svg|g' gnome-system-monitor.desktop.in.in
sed -i.bak -E -e 's|^(NotShowIn=.*)$|# \1|g' gnome-system-monitor.desktop.in.in
override-build: |
snapcraftctl build
mkdir -p $SNAPCRAFT_PART_INSTALL/meta/gui/
cp $SNAPCRAFT_PART_BUILD/gnome-system-monitor.desktop $SNAPCRAFT_PART_INSTALL/meta/gui/
cp $SNAPCRAFT_PART_SRC/data/icons/public/hicolor/scalable/apps/org.gnome.SystemMonitor.svg $SNAPCRAFT_PART_INSTALL/meta/gui/
build-packages:
- desktop-file-utils
- docbook-to-man
- libgtop2-dev
- libsigc++-2.0-dev
- libsystemd-dev
- policykit-1
- yelp-tools
stage-packages:
- libsigc++-2.0-0v5
# workaround snapcraft trying to outsmart us by copying ldd listed libraries
libraries:
after: [gnome-system-monitor]
plugin: nil
stage-packages:
- libgtop-2.0-11
prime:
- "usr/lib/*/libgtop*"
- "usr/lib/*/libsigc-2.0.so.0*"
# Find files provided by the base and platform snap and ensure they aren't
# duplicated in this snap
cleanup:
after: [libraries]
plugin: nil
build-snaps: [core20, gnome-3-38-2004]
override-prime: |
set -eux
for snap in "core20" "gnome-3-38-2004"; do
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$SNAPCRAFT_PRIME/{}" \;
done