From: meator <meator@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: auto-cpufreq-2.2.0
Date: Tue, 20 Feb 2024 22:43:54 +0100 [thread overview]
Message-ID: <20240220214354.DAAAC2B8FA@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-48854@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]
There is an updated pull request by meator against master on the void-packages repository
https://github.com/meator/void-packages auto-cpufreq
https://github.com/void-linux/void-packages/pull/48854
New package: auto-cpufreq-2.2.0
<!-- Uncomment relevant sections and delete options which are not applicable -->
`auto-cpufreq` is doing some weeeeird stuff in `auto_cpufreq/core.py`. I will likely have to patch out a lot of things there.
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/48854.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-auto-cpufreq-48854.patch --]
[-- Type: text/x-diff, Size: 6065 bytes --]
From f6f6bc7a368983647b04aaff219e541e31d29c7f Mon Sep 17 00:00:00 2001
From: meator <meator.dev@gmail.com>
Date: Tue, 20 Feb 2024 21:14:04 +0100
Subject: [PATCH] New package: auto-cpufreq-2.2.0
---
srcpkgs/auto-cpufreq/files/auto-cpufreq/run | 3 ++
.../disable_poetry_dynamic_versioning.patch | 25 +++++++++++++
.../patches/fix_icon_n_style_locations.patch | 15 ++++++++
.../patches/fix_other_icon_path.patch | 13 +++++++
srcpkgs/auto-cpufreq/template | 35 +++++++++++++++++++
5 files changed, 91 insertions(+)
create mode 100644 srcpkgs/auto-cpufreq/files/auto-cpufreq/run
create mode 100644 srcpkgs/auto-cpufreq/patches/disable_poetry_dynamic_versioning.patch
create mode 100644 srcpkgs/auto-cpufreq/patches/fix_icon_n_style_locations.patch
create mode 100644 srcpkgs/auto-cpufreq/patches/fix_other_icon_path.patch
create mode 100644 srcpkgs/auto-cpufreq/template
diff --git a/srcpkgs/auto-cpufreq/files/auto-cpufreq/run b/srcpkgs/auto-cpufreq/files/auto-cpufreq/run
new file mode 100644
index 0000000000000..e30c3badae655
--- /dev/null
+++ b/srcpkgs/auto-cpufreq/files/auto-cpufreq/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+exec auto-cpufreq --daemon
diff --git a/srcpkgs/auto-cpufreq/patches/disable_poetry_dynamic_versioning.patch b/srcpkgs/auto-cpufreq/patches/disable_poetry_dynamic_versioning.patch
new file mode 100644
index 0000000000000..ad7cc733a9446
--- /dev/null
+++ b/srcpkgs/auto-cpufreq/patches/disable_poetry_dynamic_versioning.patch
@@ -0,0 +1,25 @@
+The pyproject.toml already sets the correct version, so the version detection
+system doesn't even have to be replaced.
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -32,18 +32,12 @@
+ poetry = "^1.6.1"
+
+ [build-system]
+-requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
+-build-backend = "poetry_dynamic_versioning.backend"
++requires = ["poetry-core>=1.0.0"]
++build-backend = "poetry.core.masonry.api"
+
+ [tool.poetry.scripts]
+ auto-cpufreq = "auto_cpufreq.bin.auto_cpufreq:main"
+ auto-cpufreq-gtk = "auto_cpufreq.bin.auto_cpufreq_gtk:main"
+
+-# https://github.com/mtkennerly/poetry-dynamic-versioning
+-[tool.poetry-dynamic-versioning]
+-enable = true
+-vcs = "git"
+-format = "v{base}+{commit}"
+-
+ # SideNote
+ # Regarding zip_safe = https://setuptools.pypa.io/en/latest/deprecated/zip_safe.html
diff --git a/srcpkgs/auto-cpufreq/patches/fix_icon_n_style_locations.patch b/srcpkgs/auto-cpufreq/patches/fix_icon_n_style_locations.patch
new file mode 100644
index 0000000000000..18f4b04e8b7eb
--- /dev/null
+++ b/srcpkgs/auto-cpufreq/patches/fix_icon_n_style_locations.patch
@@ -0,0 +1,15 @@
+This patch is taken from
+https://aur.archlinux.org/cgit/aur.git/tree/001-fix-icon-n-style-locations.patch?h=auto-cpufreq&id=2cb3f7935e7e0252e15d8dbcf1309ab246e143cf
+--- a/auto_cpufreq/gui/app.py
++++ b/auto_cpufreq/gui/app.py
+@@ -20,8 +20,8 @@
+ ICON_FILE = "/snap/auto-cpufreq/current/icon.png"
+ CSS_FILE = "/snap/auto-cpufreq/current/style.css"
+ else:
+- ICON_FILE = "/usr/local/share/auto-cpufreq/images/icon.png"
+- CSS_FILE = "/usr/local/share/auto-cpufreq/scripts/style.css"
++ ICON_FILE = "/usr/share/pixmaps/auto-cpufreq.png"
++ CSS_FILE = "/usr/share/auto-cpufreq/scripts/style.css"
+
+ HBOX_PADDING = 20
+ PKEXEC_ERROR = "Error executing command as another user: Not authorized\n\nThis incident has been reported.\n"
diff --git a/srcpkgs/auto-cpufreq/patches/fix_other_icon_path.patch b/srcpkgs/auto-cpufreq/patches/fix_other_icon_path.patch
new file mode 100644
index 0000000000000..a982d60e688bd
--- /dev/null
+++ b/srcpkgs/auto-cpufreq/patches/fix_other_icon_path.patch
@@ -0,0 +1,13 @@
+This patch is taken from
+https://aur.archlinux.org/cgit/aur.git/tree/002-fix-other-icon-path.patch?h=auto-cpufreq&id=2cb3f7935e7e0252e15d8dbcf1309ab246e143cf
+--- a/auto_cpufreq/gui/objects.py
++++ b/auto_cpufreq/gui/objects.py
+@@ -221,7 +221,7 @@
+ self.add_button("Close", Gtk.ResponseType.CLOSE)
+ self.set_default_size(400, 350)
+ img_buffer = GdkPixbuf.Pixbuf.new_from_file_at_scale(
+- filename="/usr/local/share/auto-cpufreq/images/icon.png",
++ filename="/usr/share/pixmaps/auto-cpufreq.png",
+ width=150,
+ height=150,
+ preserve_aspect_ratio=True)
diff --git a/srcpkgs/auto-cpufreq/template b/srcpkgs/auto-cpufreq/template
new file mode 100644
index 0000000000000..12546d2a0188d
--- /dev/null
+++ b/srcpkgs/auto-cpufreq/template
@@ -0,0 +1,35 @@
+# Template file for 'auto-cpufreq'
+pkgname=auto-cpufreq
+version=2.2.0
+revision=1
+build_style=python3-pep517
+# auto-cpufreq is executed in post_install() to get completions, so masterdir
+# needs part of $depends installed
+_core_deps="python3-click python3-psutil python3-distro python3-requests"
+hostmakedepends="python3-poetry-core $_core_deps"
+depends="$_core_deps dmidecode python3-gobject gtk+3"
+short_desc="Automatic CPU speed & power optimizer for Linux"
+maintainer="meator <meator.dev@gmail.com>"
+license="LGPL-3.0-only"
+homepage="https://github.com/AdnanHodzic/auto-cpufreq"
+distfiles="https://github.com/AdnanHodzic/auto-cpufreq/archive/refs/tags/v2.2.0.tar.gz"
+checksum=d84d45a1638f5bff72b5ce7c1653886143cdbb4c6b198e63e054b6a18f7ade68
+
+post_patch() {
+ patch -Np1 < nix/patches/prevent-install-and-copy.patch
+}
+
+post_install() {
+ vsconf auto-cpufreq.conf-example auto-cpufreq.conf
+ vinstall scripts/auto-cpufreq-gtk.desktop 644 usr/share/applications
+ vinstall images/icon.png 644 usr/share/pixmaps auto-cpufreq.png
+ vinstall scripts/style.css 644 usr/share/auto-cpufreq/scripts
+ vbin scripts/cpufreqctl.sh cpufreqctl.auto-cpufreq
+ vsv auto-cpufreq
+ vinstall scripts/org.auto-cpufreq.pkexec.policy 644 usr/share/polkit-1/actions
+
+ for completion in bash fish zsh; do
+ PYTHONPATH=$DESTDIR/$py3_sitelib _AUTO_CPUFREQ_COMPLETE=${completion}_source ${DESTDIR}/usr/bin/auto-cpufreq > auto-cpufreq.$completion
+ vcompletion auto-cpufreq.$completion $completion
+ done
+}
next prev parent reply other threads:[~2024-02-20 21:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 20:17 [PR PATCH] " meator
2024-02-20 20:32 ` [PR PATCH] [Updated] " meator
2024-02-20 20:48 ` meator
2024-02-20 21:06 ` meator
2024-02-20 21:43 ` meator [this message]
2024-02-20 21:53 ` meator
2024-02-20 23:17 ` meator
2024-02-20 23:22 ` meator
2024-02-21 0:17 ` abenson
2024-02-21 5:52 ` [PR REVIEW] " Luciogi
2024-02-21 5:55 ` Luciogi
2024-02-21 7:54 ` meator
2024-02-21 7:56 ` [PR PATCH] [Updated] " meator
2024-02-21 7:57 ` meator
2024-02-21 8:06 ` meator
2024-02-21 11:38 ` [PR REVIEW] " Luciogi
2024-02-21 11:40 ` Luciogi
2024-02-21 18:40 ` meator
2024-05-09 11:15 ` [PR PATCH] [Updated] " meator
2024-08-08 1:52 ` github-actions
2024-08-22 1:53 ` [PR PATCH] [Closed]: " github-actions
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240220214354.DAAAC2B8FA@inbox.vuxu.org \
--to=meator@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).