From d7c66a0484cae736e9cc8d75933b4e2eedf9e1c7 Mon Sep 17 00:00:00 2001 From: vyvir <135277623+vyvir@users.noreply.github.com> Date: Fri, 23 Aug 2024 19:10:15 +0300 Subject: [PATCH] althea --- AltLinux/DEBIAN/postinst | 11 ----------- .../usr/share/applications/AltLinux.desktop | 9 --------- altlinux.spec => althea.spec | 4 ++-- {AltLinux => althea}/DEBIAN/control | 6 +++--- althea/DEBIAN/postinst | 11 +++++++++++ althea/usr/share/applications/althea.desktop | 9 +++++++++ .../usr/share/icons/althea.png | Bin build.sh | 14 +++++++------- build_rpm.sh | 17 ----------------- resources/AutoStart.sh | 12 ++++++------ 10 files changed, 38 insertions(+), 55 deletions(-) delete mode 100755 AltLinux/DEBIAN/postinst delete mode 100755 AltLinux/usr/share/applications/AltLinux.desktop rename altlinux.spec => althea.spec (96%) rename {AltLinux => althea}/DEBIAN/control (82%) create mode 100755 althea/DEBIAN/postinst create mode 100755 althea/usr/share/applications/althea.desktop rename AltLinux/usr/share/icons/AltLinux.png => althea/usr/share/icons/althea.png (100%) delete mode 100755 build_rpm.sh diff --git a/AltLinux/DEBIAN/postinst b/AltLinux/DEBIAN/postinst deleted file mode 100755 index 8052b0a..0000000 --- a/AltLinux/DEBIAN/postinst +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -ex - -AltLinux_PATH="/usr/lib/altlinux" -USER=$SUDO_USER - -if [ -d "$AltLinux_PATH" ]; then - sudo chown -R "$USER:$USER" "$AltLinux_PATH" -fi -exit 0 diff --git a/AltLinux/usr/share/applications/AltLinux.desktop b/AltLinux/usr/share/applications/AltLinux.desktop deleted file mode 100755 index 7cf169b..0000000 --- a/AltLinux/usr/share/applications/AltLinux.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=AltLinux -Path=/usr/lib/altlinux -Exec=/usr/lib/altlinux/altlinux -Icon=/usr/share/icons/AltLinux.png -Terminal=false -Type=Application -Categories=Application -Name[en_US]=AltLinux diff --git a/altlinux.spec b/althea.spec similarity index 96% rename from altlinux.spec rename to althea.spec index 82cb79f..54d5914 100644 --- a/altlinux.spec +++ b/althea.spec @@ -36,7 +36,7 @@ exe = EXE( a.scripts, [], exclude_binaries=True, - name='altlinux', + name='althea', debug=False, bootloader_ignore_signals=False, strip=False, @@ -56,5 +56,5 @@ coll = COLLECT( strip=False, upx=True, upx_exclude=[], - name='altlinux', + name='althea', ) diff --git a/AltLinux/DEBIAN/control b/althea/DEBIAN/control similarity index 82% rename from AltLinux/DEBIAN/control rename to althea/DEBIAN/control index 9bbba8d..6f9a853 100755 --- a/AltLinux/DEBIAN/control +++ b/althea/DEBIAN/control @@ -1,9 +1,9 @@ -Package: AltLinux -Name: AltLinux +Package: althea +Name: althea Version: 0.5.0 Architecture: amd64 Author: vyvir Maintainer: vyvir Description: GUI for AltServerLinux -Homepage: https://github.com/i-love-altlinux/AltLinux +Homepage: https://github.com/vyvir/althea Depends: binutils, python3 (>= 3.8), gir1.2-appindicator3-0.1, usbmuxd, libimobiledevice6, libimobiledevice-utils, libavahi-compat-libdnssd-dev, unzip, usbutils, libhandy-1-0, libhandy-1-dev, curl, python3-requests, gir1.2-notify-0.7, psmisc diff --git a/althea/DEBIAN/postinst b/althea/DEBIAN/postinst new file mode 100755 index 0000000..40a8a9e --- /dev/null +++ b/althea/DEBIAN/postinst @@ -0,0 +1,11 @@ +#!/bin/bash + +set -ex + +althea_PATH="/usr/lib/althea" +USER=$SUDO_USER + +if [ -d "$althea_PATH" ]; then + sudo chown -R "$USER:$USER" "$althea_PATH" +fi +exit 0 diff --git a/althea/usr/share/applications/althea.desktop b/althea/usr/share/applications/althea.desktop new file mode 100755 index 0000000..f253181 --- /dev/null +++ b/althea/usr/share/applications/althea.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=althea +Path=/usr/lib/althea +Exec=/usr/lib/althea/althea +Icon=/usr/share/icons/althea.png +Terminal=false +Type=Application +Categories=Application +Name[en_US]=althea diff --git a/AltLinux/usr/share/icons/AltLinux.png b/althea/usr/share/icons/althea.png similarity index 100% rename from AltLinux/usr/share/icons/AltLinux.png rename to althea/usr/share/icons/althea.png diff --git a/build.sh b/build.sh index 4d614d2..6ac0064 100755 --- a/build.sh +++ b/build.sh @@ -2,17 +2,17 @@ cd "$(dirname "$0")" || exit -if [ -d "./AltLinux/usr/lib" ]; then +if [ -d "./althea/usr/lib" ]; then rm -rf "./AltServer/usr/lib" fi if [ -d "./dist" ]; then rm -rf "./dist" fi -pyinstaller altlinux.spec --clean -cp -R ./resources ./dist/altlinux -mkdir -p "./AltLinux/usr/lib" +pyinstaller althea.spec --clean +cp -R ./resources ./dist/althea +mkdir -p "./althea/usr/lib" -cp -R ./dist/altlinux ./AltLinux/usr/lib -chmod -R 0775 AltLinux -dpkg-deb --build --root-owner-group AltLinux AltLinux.deb +cp -R ./dist/althea ./althea/usr/lib +chmod -R 0775 althea +dpkg-deb --build --root-owner-group althea althea.deb diff --git a/build_rpm.sh b/build_rpm.sh deleted file mode 100755 index 0d455fc..0000000 --- a/build_rpm.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -cd "$(dirname "$0")" || exit - -if [ -d "./AltLinux/usr/lib" ]; then - rm -rf "./AltServer/usr/lib" -fi -if [ -d "./dist" ]; then - rm -rf "./dist" -fi - -pyinstaller altlinux.spec --clean -cp -R ./resources ./dist/altlinux -mkdir -p "./AltLinux/usr/lib" - -cp -R ./dist/altlinux ./AltLinux/usr/lib -chmod -R 0775 AltLinux diff --git a/resources/AutoStart.sh b/resources/AutoStart.sh index 35922cf..afd6ad8 100755 --- a/resources/AutoStart.sh +++ b/resources/AutoStart.sh @@ -2,16 +2,16 @@ cd "$(dirname "$0")" || exit -cat </dev/null +cat </dev/null [Desktop Entry] -Name=AltLinux +Name=althea GenericName=AltServer for Linux -Path=/usr/lib/altlinux -Exec=/usr/lib/altlinux/altlinux +Path=/usr/lib/althea +Exec=/usr/lib/althea/althea Terminal=false Type=Application X-GNOME-Autostart-enabled=true EOF -cp /home/$(whoami)/.local/share/altlinux/AltLinux.desktop /home/$(whoami)/.config/autostart/ -rm /home/$(whoami)/.local/share/altlinux/AltLinux.desktop +cp /home/$(whoami)/.local/share/althea/althea.desktop /home/$(whoami)/.config/autostart/ +rm /home/$(whoami)/.local/share/althea/althea.desktop