-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sys-power/sntrack: new package, add 9999
- Loading branch information
1 parent
4a929b6
commit 8bf0a80
Showing
5 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
BDEPEND=>=dev-vcs/git-1.8.2.1[curl] | ||
DEFINED_PHASES=install setup unpack | ||
DEPEND=>=dev-python/matplotlib-3.5.0 systemd? ( sys-apps/systemd ) | ||
DESCRIPTION=Tracks the battery discharge rate during sleep | ||
EAPI=8 | ||
HOMEPAGE=https://github.com/xsmile/sntrack | ||
INHERIT=python-single-r1 git-r3 | ||
IUSE=systemd python_single_target_python3_10 python_single_target_python3_11 python_single_target_python3_12 | ||
LICENSE=GPL-3 | ||
PROPERTIES=live | ||
RDEPEND=>=dev-python/matplotlib-3.5.0 systemd? ( sys-apps/systemd ) python_single_target_python3_10? ( dev-lang/python:3.10 ) python_single_target_python3_11? ( dev-lang/python:3.11 ) python_single_target_python3_12? ( dev-lang/python:3.12 ) | ||
REQUIRED_USE=^^ ( python_single_target_python3_10 python_single_target_python3_11 python_single_target_python3_12 ) | ||
SLOT=0 | ||
_eclasses_=multiprocessing 30ead54fa2e2b5f9cd4e612ffc34d0fe toolchain-funcs e56c7649b804f051623c8bc1a1c44084 multilib c19072c3cd7ac5cb21de013f7e9832e0 python-utils-r1 042f4cc53680245bf99a84669b94155a python-single-r1 75118e916668a74c660a13b0ecb22562 git-r3 86fa1f157b70b9d2ff340c4633b1cf4b | ||
_md5_=74ef7bb9de48ba966fea58d9ad490efa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/main.py b/main.py | ||
index 3162bd6..989333d 100755 | ||
--- a/main.py | ||
+++ b/main.py | ||
@@ -289,7 +289,7 @@ def main() -> None: | ||
args = parse_args() | ||
logging.basicConfig(format=LOGGING_FORMAT, level=args.loglevel) | ||
|
||
- cur = init() | ||
+ cur = init(f'/var/lib/{__pkgname__}/history.db') | ||
fun_map[args.main_action](cur, args) | ||
cleanup(cur) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<name>Benjamin Neff</name> | ||
<email>[email protected]</email> | ||
</maintainer> | ||
<upstream> | ||
<remote-id type="github">xsmile/sntrack</remote-id> | ||
</upstream> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright 2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
PYTHON_COMPAT=( python3_{10..12} ) | ||
inherit python-single-r1 | ||
|
||
DESCRIPTION="Tracks the battery discharge rate during sleep" | ||
HOMEPAGE="https://github.com/xsmile/sntrack" | ||
|
||
inherit git-r3 | ||
EGIT_REPO_URI="${HOMEPAGE}.git" | ||
|
||
LICENSE="GPL-3" | ||
SLOT="0" | ||
IUSE="systemd" | ||
REQUIRED_USE="${PYTHON_REQUIRED_USE}" | ||
|
||
DEPEND=" | ||
>=dev-python/matplotlib-3.5.0 | ||
systemd? ( sys-apps/systemd ) | ||
" | ||
RDEPEND=" | ||
${DEPEND} | ||
${PYTHON_DEPS} | ||
" | ||
|
||
PATCHES=( "${FILESDIR}"/history-db-path.patch ) | ||
|
||
src_install() { | ||
exeinto /usr/bin | ||
newexe main.py ${PN} | ||
|
||
keepdir /var/lib/${PN} | ||
|
||
use systemd && dosym "/usr/bin/${PN}" /usr/lib/systemd/system-sleep/${PN} | ||
|
||
dodoc README.md | ||
} |