snapcraft file refinement
This commit is contained in:
parent
93e7da4e4a
commit
83796c458c
|
@ -1,6 +1,6 @@
|
||||||
name: auto-cpufreq
|
name: auto-cpufreq
|
||||||
base: core18
|
base: core18
|
||||||
version: '1.0' # just for humans, typically '1.2+git' or '1.3.2'
|
version: '1.0'
|
||||||
summary: Automatic CPU speed & power optimizer for Linux
|
summary: Automatic CPU speed & power optimizer for Linux
|
||||||
description: |
|
description: |
|
||||||
Automatic CPU speed & power optimizer for Linux based on active
|
Automatic CPU speed & power optimizer for Linux based on active
|
||||||
|
@ -8,12 +8,11 @@ description: |
|
||||||
Ultimately allowing you to improve battery life without making
|
Ultimately allowing you to improve battery life without making
|
||||||
any compromises.
|
any compromises.
|
||||||
|
|
||||||
grade: devel # must be 'stable' to release into candidate/stable channels
|
grade: stable
|
||||||
confinement: devmode # use 'strict' once you have the right plugs and slots
|
confinement: classic
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
auto-cpufreq:
|
auto-cpufreq:
|
||||||
# See 'snapcraft plugins'
|
|
||||||
plugin: python
|
plugin: python
|
||||||
python-version: python3
|
python-version: python3
|
||||||
source: .
|
source: .
|
||||||
|
@ -38,4 +37,3 @@ apps:
|
||||||
LANG: C.UTF-8
|
LANG: C.UTF-8
|
||||||
PKG_MARKER: SNAP
|
PKG_MARKER: SNAP
|
||||||
daemon: simple
|
daemon: simple
|
||||||
|
|
|
@ -321,7 +321,7 @@ def sysinfo():
|
||||||
|
|
||||||
# get distro information in snap env.
|
# get distro information in snap env.
|
||||||
if os.getenv("PKG_MARKER") == "SNAP":
|
if os.getenv("PKG_MARKER") == "SNAP":
|
||||||
searchfile = open("/var/lib/snapd/hostfs/etc/os-release", "r")
|
searchfile = open("/usr/lib/os-release", "r")
|
||||||
for line in searchfile:
|
for line in searchfile:
|
||||||
if line.startswith('NAME='):
|
if line.startswith('NAME='):
|
||||||
distro = line[5:line.find('$')].strip("\"")
|
distro = line[5:line.find('$')].strip("\"")
|
||||||
|
|
Loading…
Reference in New Issue