Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into testing
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed May 20, 2024
2 parents 77225e3 + 54b8ced commit 4fb122d
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 43 deletions.
20 changes: 0 additions & 20 deletions spec_files/jupiter-fan-control/fan_fix.patch

This file was deleted.

43 changes: 30 additions & 13 deletions spec_files/jupiter-fan-control/fedora.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
diff -ur usr/share/jupiter-fan-control/fancontrol.py usr/share/jupiter-fan-control/fancontrol.py
--- usr/share/jupiter-fan-control/fancontrol.py 2022-12-23 13:14:48.861887067 -0800
+++ usr/share/jupiter-fan-control/fancontrol.py 2022-12-23 00:42:03.223412367 -0800
@@ -1,4 +1,4 @@
-#!/usr/bin/python -u
+#!/usr/bin/python3 -u
"""jupiter-fan-controller"""
import signal
import os
diff -ur usr/share/jupiter-fan-control/PID.py usr/share/jupiter-fan-control/PID.py
--- usr/share/jupiter-fan-control/PID.py 2022-12-23 13:14:48.861887067 -0800
+++ usr/share/jupiter-fan-control/PID.py 2022-12-23 00:42:03.222412347 -0800
diff --git a/usr/lib/systemd/system/jupiter-fan-control.service b/usr/lib/systemd/system/jupiter-fan-control.service
index e3e9e34..cff45a7 100644
--- a/usr/lib/systemd/system/jupiter-fan-control.service
+++ b/usr/lib/systemd/system/jupiter-fan-control.service
@@ -4,8 +4,8 @@ Description=Jupiter fan control
[Service]
Type=simple

-ExecStart=/usr/share/jupiter-fan-control/fancontrol.py --run
-ExecStopPost=/usr/share/jupiter-fan-control/fancontrol.py --stop
+ExecStart=/usr/libexec/jupiter-fan-control/fancontrol.py --run
+ExecStopPost=/usr/libexec/jupiter-fan-control/fancontrol.py --stop

# disable buffering so STDOUT and STDERR show up immediately in logs
Environment=PYTHONUNBUFFERED=1
diff --git a/usr/share/jupiter-fan-control/PID.py b/usr/share/jupiter-fan-control/PID.py
index d52123e..c5786ff 100644
--- a/usr/share/jupiter-fan-control/PID.py
+++ b/usr/share/jupiter-fan-control/PID.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# This file is part of IvPID.
# Copyright (C) 2015 Ivmech Mechatronics Ltd. <[email protected]>
@@ -64,7 +64,7 @@
@@ -64,7 +64,7 @@ class PID:
"""Calculates PID value for given reference feedback

.. math::
Expand All @@ -25,3 +32,13 @@ diff -ur usr/share/jupiter-fan-control/PID.py usr/share/jupiter-fan-control/PID.

.. figure:: images/pid_1.png
:align: center
diff --git a/usr/share/jupiter-fan-control/fancontrol.py b/usr/share/jupiter-fan-control/fancontrol.py
index 5829d5e..c797954 100755
--- a/usr/share/jupiter-fan-control/fancontrol.py
+++ b/usr/share/jupiter-fan-control/fancontrol.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -u
+#!/usr/bin/python3 -u
"""jupiter-fan-controller"""
import signal
import os
16 changes: 8 additions & 8 deletions spec_files/jupiter-fan-control/jupiter-fan-control.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Source: https://gitlab.com/evlaV/%{name}/-/archive/main/%{name}-main.tar
BuildArch: noarch

Patch0: fedora.patch
# Valve does the funny (Thanks RodoMa92)
Patch1: fan_fix.patch

Requires: python3

Expand All @@ -23,14 +21,16 @@ SteamOS 3.0 Steam Deck Fan Controller
%define debug_package %{nil}

%prep
%autosetup -n %{name}-main -p0
%autosetup -n %{name}-main -p1

%build

%install
mkdir -p %{buildroot}%{_unitdir}/
mkdir -p %{buildroot}%{_datadir}/
cp -rv usr/share/* %{buildroot}%{_datadir}
mkdir -p %{buildroot}%{_datadir}/jupiter-fan-control
mkdir -p %{buildroot}%{_libexecdir}/jupiter-fan-control
cp -v usr/share/jupiter-fan-control/*.yaml %{buildroot}%{_datadir}/jupiter-fan-control/
cp -v usr/share/jupiter-fan-control/*.py %{buildroot}%{_libexecdir}/jupiter-fan-control/
cp -v usr/lib/systemd/system/jupiter-fan-control.service %{buildroot}%{_unitdir}/jupiter-fan-control.service

# Do post-installation
Expand All @@ -49,9 +49,9 @@ cp -v usr/lib/systemd/system/jupiter-fan-control.service %{buildroot}%{_unitdir}
# are going to be installed into target system where the rpm is installed.
%files
%doc README.md
%{_datadir}/jupiter-fan-control/fancontrol.py
%{_datadir}/jupiter-fan-control/*-config.yaml
%{_datadir}/jupiter-fan-control/PID.py
%{_libexecdir}/jupiter-fan-control/fancontrol.py
%{_libexecdir}/jupiter-fan-control/PID.py
%{_datadir}/jupiter-fan-control/*.yaml
%{_unitdir}/jupiter-fan-control.service

# Finally, changes from the latest release of your application are generated from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ install-emudeck:
chmod +x $HOME/Desktop/EmuDeck.AppImage
fi

# Install Boxtron, a Steam Play compatibility tool to run DOS games using native Linux DOSBox
install-boxtron: distrobox-check-fedora
distrobox enter -n fedora -- bash -c '\
sudo dnf install dosbox-staging inotify-tools timidity++ fluid-soundfont-gm -y && \
cd ~/.steam/root/compatibilitytools.d/ && \
curl -L https://github.com/dreamer/boxtron/releases/download/v0.5.4/boxtron.tar.xz | tar xJf - && \
distrobox-export --bin /usr/bin/dosbox'

alias get-wootility := install-wootility

# Install Wootility for configuring Wooting Keyboards
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ setup-cdemu ACTION="":
OPTION={{ ACTION }}
if [ "$CDEMU_STATE" == "" ]; then
CDEMU_STATE="${red}${b}Not Installed${n}"
CDEMU_STATE_FLAG="0"
else
CDEMU_STATE="${green}${b}Installed${n}"
CDEMU_STATE_FLAG="1"
fi
if [ "$OPTION" == "help" ]; then
echo "Usage: ujust setup-cdemu <option>"
Expand All @@ -25,7 +27,7 @@ setup-cdemu ACTION="":
OPTION=$(Choose "Install CDEmu" "Remove CDEmu" "Remove GUI Helper")
fi
if [[ "${OPTION,,}" =~ ^install ]]; then
if [[ "$CDEMU_STATE" != "" ]]; then
if [[ "$CDEMU_STATE_FLAG" == "1" ]]; then
echo "${red} CDEmu has already been installed!"
exit 0
fi
Expand All @@ -41,7 +43,7 @@ setup-cdemu ACTION="":
systemctl start --user cdemu-daemon.service
echo "CDEmu is installed!"
elif [[ "${OPTION,,}" =~ ^(remove|uninstall) ]]; then
if [[ "$CDEMU_STATE" == "" ]]; then
if [[ "$CDEMU_STATE_FLAG" == "0" ]]; then
echo "${red} CDEmu has already been removed!"
exit 0
fi
Expand Down

0 comments on commit 4fb122d

Please sign in to comment.