Kaydet (Commit) 92bdb716 authored tarafından Hakan Dündar's avatar Hakan Dündar

Updated translations

üst 82f18a1b
# Maintainer: Hakan Dündar <hakandundar34coding@gmail.com>
pkgname=system-monitoring-center
_pkgver=2.4.0
pkgver=${_pkgver//-/.}
pkgrel=1
pkgdesc="Multi-featured system monitor"
arch=('any')
url="https://github.com/hakandundar34coding/system-monitoring-center"
license=('GPL3')
depends=('dmidecode' 'gtk4' 'hwdata' 'iproute2' 'polkit'
'python-cairo' 'python-gobject' 'util-linux')
makedepends=('python-setuptools')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$_pkgver.tar.gz")
sha256sums=('5355bd05023260ad8f90dadb3cb039ad3f8a36e334409a1293f95101878cb87d')
build() {
cd "$pkgname-$_pkgver"
python setup.py build
}
package() {
cd "$pkgname-$_pkgver"
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}
......@@ -21,6 +21,6 @@ Depends: ${misc:Depends},
python3-gi,
python3-gi-cairo,
util-linux (>=2.31)
Description: Multi-featured system monitor.
Description: Multi-featured system monitor
Provides information about CPU/RAM/Disk/Network/GPU performance, sensors,
processes, users, services and system.
#!/usr/bin/env python3
from setuptools import setup, find_packages, os
import sys, shutil
with open(os.path.dirname(os.path.realpath(__file__)) + "/src/__version__") as reader:
version = reader.read().strip()
def files_in_folder(folder):
file_paths = []
for file in [filename for filename in os.listdir(folder)]:
file_paths.append(folder + file)
return file_paths
def files_in_locale_folder(folder):
file_paths = []
for file in [filename for filename in os.listdir(folder) if filename.split(".")[-1] not in ["pot", "sh"]]:
file_paths.append(folder + file + "/LC_MESSAGES/system-monitoring-center.mo")
return file_paths
def data_files_in_locale_folder(target_folder, folder):
data_files_in_locale_folder = []
for file in [filename for filename in os.listdir(folder) if filename.split(".")[-1] not in ["pot", "sh"]]:
data_files_in_locale_folder.append((target_folder + file + "/LC_MESSAGES/", [folder + file + "/LC_MESSAGES/system-monitoring-center.mo"]))
return data_files_in_locale_folder
# Flatpak package
if "--flatpak_package" in sys.argv:
package_type_var = "flatpak_package"
sys.argv.remove("--flatpak_package")
# Python package
elif "egg_info" in sys.argv or "sdist" in sys.argv or "bdist_wheel" in sys.argv:
for argv in sys.argv:
if "/in_process/_in_process.py" in argv:
package_type_var = "python_package"
# Debian, RPM, Arch Linux another other package
else:
package_type_var = "debian_rpm_archlinux_or_another_package"
print("\n" + "_____package_type: " + package_type_var + "_____" + "\n")
if package_type_var == "debian_rpm_archlinux_or_another_package":
install_requires=["PyGObject"]
entry_points={}
os.chmod("integration/io.github.hakandundar34coding.system-monitoring-center.desktop", 0o644)
for file in files_in_locale_folder("locale/"):
os.chmod(file, 0o644)
for file in files_in_folder("database/"):
os.chmod(file, 0o644)
for file in files_in_folder("src/"):
os.chmod(file, 0o644)
for file in files_in_folder("icons/hicolor/scalable/actions/"):
os.chmod(file, 0o644)
os.chmod("icons/hicolor/scalable/apps/system-monitoring-center.svg", 0o644)
data_files = [
("/usr/share/applications/", ["integration/io.github.hakandundar34coding.system-monitoring-center.desktop"]),
("/usr/share/polkit-1/actions/", ["integration/io.github.hakandundar34coding.system-monitoring-center.policy"]),
("/usr/share/system-monitoring-center/database/", files_in_folder("database/")),
("/usr/share/system-monitoring-center/src/", files_in_folder("src/")),
("/usr/share/system-monitoring-center/icons/hicolor/scalable/actions/", files_in_folder("icons/hicolor/scalable/actions/")),
("/usr/share/system-monitoring-center/icons/hicolor/scalable/apps/", ["icons/hicolor/scalable/apps/system-monitoring-center.svg"]),
("/usr/share/icons/hicolor/scalable/apps/", ["icons/hicolor/scalable/apps/system-monitoring-center.svg"]),
("/usr/share/man/man1/", ["man/system-monitoring-center.1.gz"]),
("/usr/bin/", ["integration/system-monitoring-center"])
] + data_files_in_locale_folder("/usr/share/system-monitoring-center/locale/", "locale/")
if package_type_var == "flatpak_package":
install_requires=["PyGObject"]
entry_points={}
shutil.copy2("icons/hicolor/scalable/apps/system-monitoring-center.svg", "icons/hicolor/scalable/apps/io.github.hakandundar34coding.system-monitoring-center.svg")
with open("integration/io.github.hakandundar34coding.system-monitoring-center.desktop") as reader:
desktop_file_content = reader.read()
desktop_file_content = desktop_file_content.replace("Icon=system-monitoring-center", "Icon=io.github.hakandundar34coding.system-monitoring-center")
with open("integration/io.github.hakandundar34coding.system-monitoring-center.desktop", "w") as writer:
writer.write(desktop_file_content)
with open("integration/system-monitoring-center") as reader:
script_file_content = reader.read()
script_file_content = script_file_content.replace("/usr/share/system-monitoring-center/src/", "/app/share/system-monitoring-center/src/")
script_file_content = script_file_content.replace("#!/usr/bin/env python3", "#!/usr/bin/python3")
with open("integration/system-monitoring-center", "w") as writer:
writer.write(script_file_content)
data_files = [
("/app/share/applications/", ["integration/io.github.hakandundar34coding.system-monitoring-center.desktop"]),
("/app/share/polkit-1/actions/", ["integration/io.github.hakandundar34coding.system-monitoring-center.policy"]),
("/app/share/system-monitoring-center/database/", files_in_folder("database/")),
("/app/share/system-monitoring-center/src/", files_in_folder("src/")),
("/app/share/system-monitoring-center/icons/hicolor/scalable/actions/", files_in_folder("icons/hicolor/scalable/actions/")),
("/app/share/system-monitoring-center/icons/hicolor/scalable/apps/", ["icons/hicolor/scalable/apps/system-monitoring-center.svg"]),
("/app/share/icons/hicolor/scalable/apps/", ["icons/hicolor/scalable/apps/io.github.hakandundar34coding.system-monitoring-center.svg"]),
("/app/share/man/man1/", ["man/system-monitoring-center.1.gz"]),
("/app/share/appdata/", ["io.github.hakandundar34coding.system-monitoring-center.appdata.xml"]),
("/app/bin/", ["integration/system-monitoring-center"])
] + data_files_in_locale_folder("/app/share/system-monitoring-center/locale/", "locale/")
if package_type_var == "python_package":
install_requires=["PyGObject", "pycairo"]
entry_points={"gui_scripts": ["system-monitoring-center = systemmonitoringcenter.start:start_app"]}
data_files = [
("/systemmonitoringcenter/integration/", ["integration/io.github.hakandundar34coding.system-monitoring-center.desktop"]),
("/systemmonitoringcenter/database/", files_in_folder("database/")),
("/systemmonitoringcenter/src/", files_in_folder("src/")),
("/systemmonitoringcenter/icons/hicolor/scalable/actions/", files_in_folder("icons/hicolor/scalable/actions/")),
("/systemmonitoringcenter/icons/hicolor/scalable/apps/", ["icons/hicolor/scalable/apps/system-monitoring-center.svg"]),
] + data_files_in_locale_folder("/systemmonitoringcenter/locale/", "locale/")
setup(
name="system-monitoring-center",
version=version,
description="Multi-featured system monitor",
long_description="Provides information about CPU/RAM/Disk/Network/GPU performance, sensors, processes, users, services and system.",
author="Hakan Dündar",
author_email="hakandundar34coding@gmail.com",
url="https://github.com/hakandundar34coding/system-monitoring-center",
keywords="system monitor task manager performance cpu ram swap memory disk network gpu processes users services",
license="GPLv3",
install_requires=install_requires,
python_requires=">=3.6",
packages=find_packages(),
data_files=data_files,
entry_points=entry_points,
classifiers=[
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX :: Linux",
"Topic :: System :: Monitoring",
],
)
......@@ -503,7 +503,7 @@ class MainWindow():
self.about_dialog.set_transient_for(self.main_window)
self.about_dialog.set_program_name(_tr("System Monitoring Center"))
self.about_dialog.set_logo_icon_name("system-monitoring-center")
self.about_dialog.set_comments(_tr("Multi-featured system monitor."))
self.about_dialog.set_comments(_tr("Multi-featured system monitor"))
self.about_dialog.set_authors(["Hakan Dündar"])
self.about_dialog.set_version(software_version)
self.about_dialog.set_copyright("© 2023 Hakan Dündar")
......
Name: system-monitoring-center
Version: 2.4.0
Release: 1%{?dist}
Summary: Multi-featured system monitor
License: GPLv3
URL: https://github.com/hakandundar34coding/system-monitoring-center
BuildArch: noarch
BuildRequires: python3-setuptools
Requires: dmidecode
Requires: hwdata
Requires: iproute
Requires: python3 >= 3.6
Requires: python3-cairo
# python3-gobject is installed on Fedora (python3-gi on Debian-like systems)
Requires: python3-gobject
Requires: util-linux >= 2.31
%description
Provides information about CPU/RAM/Disk/Network/GPU performance, sensors, processes, users, services and system.
%prep
# pass
%build
# pass
%install
python3 setup.py install --user --rpm_package --%{?buildroot}
%post
sudo chown -R $USER /usr/share/system-monitoring-center/src/Main.py
%files
%defattr(-,root,root,-)
/usr/share/applications/io.github.hakandundar34coding.system-monitoring-center.desktop
/usr/share/polkit-1/actions/io.github.hakandundar34coding.system-monitoring-center.policy
/usr/share/system-monitoring-center/database/*
/usr/share/system-monitoring-center/icons/hicolor/scalable/actions/system-monitoring-center*
/usr/share/system-monitoring-center/icons/hicolor/scalable/apps/system-monitoring-center*
/usr/share/system-monitoring-center/locale/*/LC_MESSAGES/system-monitoring-center.mo
/usr/share/system-monitoring-center/*
/usr/share/icons/hicolor/scalable/apps/system-monitoring-center*
/usr/share/man/man1/system-monitoring-center.1.gz
/usr/bin/system-monitoring-center
%changelog
# pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment