summaryrefslogtreecommitdiffstats
path: root/snap/snapcraft.yaml
blob: 9188d818272e9aea219962b2095b44fc08239e73 (plain)
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: glances
adopt-info: glances
summary: Glances an Eye on your system. A top/htop alternative.
description: |
  Glances is a cross-platform monitoring tool which aims to present
  a maximum of information in a minimum of space through a curses or
  Web based interface. It can adapt dynamically the displayed information
  depending on the user interface size.

base: core22
grade: stable
confinement: strict

apps:
  glances:
    command: bin/glances-launch $SNAP/bin/glances
    plugs:
      - network
      - system-observe
      - mount-observe
      - hardware-observe
      - log-observe
      - network-observe
      - physical-memory-observe
      - upower-observe
      - home
      - network-bind
    environment:
      LANG: C.UTF-8
      LC_ALL: C.UTF-8

plugs:
  home-glances-config:
    interface: personal-files
    read:
      - $HOME/.config/glances/glances.conf
  etc-glances-config:
    interface: system-files
    read:
      - /etc/glances/glances.conf

parts:

  glances:
    after:
    - selective-checkout
    plugin: python
    source: .
    # FIXME: Theoretically this also replaces `summary` and `description`
    #        keys, however due to the following bug we still need to keep
    #        them until it is fixed.
    #        https://bugs.launchpad.net/snapcraft/+bug/1813364
    parse-info: [setup.py]
    override-pull: |
      snapcraftctl pull
      "$SNAPCRAFT_STAGE"/scriptlets/selective-checkout

  bottle:
    plugin: python
    source: https://github.com/bottlepy/bottle.git
    source-branch: release-0.12
    source-depth: 1
    override-build: |
      mkdir -p $SNAPCRAFT_PART_BUILD/dist
      cp -r $SNAPCRAFT_PART_BUILD/dist $SNAPCRAFT_PART_INSTALL/bottle-dist
    organize:
      bottle-dist: bottle/dist

  docker:
    plugin: python
    source: https://github.com/docker/docker-py.git
    source-tag: '6.1.2'
    source-depth: 1
    override-build: |
      mkdir -p $SNAPCRAFT_PART_BUILD/dist
      cp -r $SNAPCRAFT_PART_BUILD/dist $SNAPCRAFT_PART_INSTALL/docker-dist
    organize:
      docker-dist: docker/dist

  python-dateutil:
    plugin: python
    source: https://github.com/dateutil/dateutil.git
    source-tag: '2.8.2'
    source-depth: 1
    override-build: |
      mkdir -p $SNAPCRAFT_PART_BUILD/dist
      cp -r $SNAPCRAFT_PART_BUILD/dist $SNAPCRAFT_PART_INSTALL/python-dateutil-dist
    organize:
      python-dateutil-dist: python-dateutil/dist

  six:
    plugin: python
    source: https://github.com/benjaminp/six.git
    source-tag: '1.16.0'
    source-depth: 1
    override-build: |
      mkdir -p $SNAPCRAFT_PART_BUILD/dist
      cp -r $SNAPCRAFT_PART_BUILD/dist $SNAPCRAFT_PART_INSTALL/six-dist
    organize:
      six-dist: six/dist

  podman:
    plugin: python
    source: https://github.com/containers/podman-py.git
    source-tag: '4.5.0'
    source-depth: 1
    override-build: |
      mkdir -p $SNAPCRAFT_PART_BUILD/dist
      cp -r $SNAPCRAFT_PART_BUILD/dist $SNAPCRAFT_PART_INSTALL/podman-dist
    organize:
      podman-dist: podman/dist

  packaging:
    plugin: python
    source: https://github.com/pypa/packaging.git
    source-tag: '23.1'
    source-depth: 1
    override-build: |
      mkdir -p $SNAPCRAFT_PART_BUILD/dist
      cp -r $SNAPCRAFT_PART_BUILD/dist $SNAPCRAFT_PART_INSTALL/packaging-dist
    organize:
      packaging-dist: packaging/dist

  launchers:
    source: snap/local/launchers
    plugin: dump
    organize:
      '*': bin/

  selective-checkout:
    plugin: nil
    build-packages:
    - git
    stage-snaps:
    - selective-checkout
    prime:
    - -*