From efa379e778fb2d9e2f74e25e10817ab0275de6e7 Mon Sep 17 00:00:00 2001 From: Luke Jones Date: Fri, 21 Feb 2025 17:03:15 +1300 Subject: [PATCH] Add opensuse CI --- CHANGELOG.md | 5 + Cargo.lock | 28 ++--- Cargo.toml | 2 +- distro-packaging/fedora/asusctl.spec | 14 --- distro-packaging/opensuse/asusctl.spec | 144 +++++++++++++++++++++++++ distro-packaging/opensuse/workflow.yml | 10 ++ 6 files changed, 174 insertions(+), 29 deletions(-) create mode 100644 distro-packaging/opensuse/asusctl.spec create mode 100644 distro-packaging/opensuse/workflow.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d84004c..13ccd83f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## [Unreleased] +## [v6.1.8] + +### Changed +- Testing CI for opensuse RPM build + ## [v6.1.7] ### Changed diff --git a/Cargo.lock b/Cargo.lock index be18a5d1..14d854c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -250,7 +250,7 @@ checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" [[package]] name = "asusctl" -version = "6.1.7" +version = "6.1.8" dependencies = [ "dmi_id", "env_logger", @@ -269,7 +269,7 @@ dependencies = [ [[package]] name = "asusd" -version = "6.1.7" +version = "6.1.8" dependencies = [ "cargo-husky", "concat-idents", @@ -296,7 +296,7 @@ dependencies = [ [[package]] name = "asusd-user" -version = "6.1.7" +version = "6.1.8" dependencies = [ "config-traits", "dirs", @@ -1084,7 +1084,7 @@ dependencies = [ [[package]] name = "config-traits" -version = "6.1.7" +version = "6.1.8" dependencies = [ "log", "ron", @@ -1476,7 +1476,7 @@ dependencies = [ [[package]] name = "dmi_id" -version = "6.1.7" +version = "6.1.8" dependencies = [ "log", "udev 0.8.0", @@ -4743,7 +4743,7 @@ dependencies = [ [[package]] name = "rog-control-center" -version = "6.1.7" +version = "6.1.8" dependencies = [ "asusd", "concat-idents", @@ -4774,7 +4774,7 @@ dependencies = [ [[package]] name = "rog_anime" -version = "6.1.7" +version = "6.1.8" dependencies = [ "dmi_id", "gif 0.12.0", @@ -4788,7 +4788,7 @@ dependencies = [ [[package]] name = "rog_aura" -version = "6.1.7" +version = "6.1.8" dependencies = [ "dmi_id", "log", @@ -4799,7 +4799,7 @@ dependencies = [ [[package]] name = "rog_dbus" -version = "6.1.7" +version = "6.1.8" dependencies = [ "asusd", "rog_anime", @@ -4813,7 +4813,7 @@ dependencies = [ [[package]] name = "rog_platform" -version = "6.1.7" +version = "6.1.8" dependencies = [ "concat-idents", "inotify", @@ -4826,7 +4826,7 @@ dependencies = [ [[package]] name = "rog_profiles" -version = "6.1.7" +version = "6.1.8" dependencies = [ "log", "rog_platform", @@ -4837,7 +4837,7 @@ dependencies = [ [[package]] name = "rog_scsi" -version = "6.1.7" +version = "6.1.8" dependencies = [ "ron", "serde", @@ -4847,7 +4847,7 @@ dependencies = [ [[package]] name = "rog_simulators" -version = "6.1.7" +version = "6.1.8" dependencies = [ "log", "rog_anime", @@ -4857,7 +4857,7 @@ dependencies = [ [[package]] name = "rog_slash" -version = "6.1.7" +version = "6.1.8" dependencies = [ "dmi_id", "serde", diff --git a/Cargo.toml b/Cargo.toml index 54489f63..13b2f9fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "6.1.7" +version = "6.1.8" rust-version = "1.82" license = "MPL-2.0" readme = "README.md" diff --git a/distro-packaging/fedora/asusctl.spec b/distro-packaging/fedora/asusctl.spec index e2e3f866..a5c5f3e1 100755 --- a/distro-packaging/fedora/asusctl.spec +++ b/distro-packaging/fedora/asusctl.spec @@ -45,21 +45,14 @@ BuildRequires: cargo BuildRequires: cmake BuildRequires: rust BuildRequires: rust-std-static -# BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(gbm) -# BuildRequires: pkgconfig(dbus-1) -# BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libinput) BuildRequires: pkgconfig(libseat) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(libzstd) -# BuildRequires: pkgconfig(gtk+-3.0) -# BuildRequires: pkgconfig(gdk-3.0) BuildRequires: desktop-file-utils -# expat-devel pcre2-devel - %description asus-nb-ctrl is a utility for Linux to control many aspects of various ASUS laptops but can also be used with non-Asus laptops with reduced features. @@ -76,22 +69,15 @@ A one-stop-shop GUI tool for asusd/asusctl. It aims to provide most controls, a notification service, and ability to run in the background. %prep -#%setup -D -T -a 1 -c -n %{name}-%{version}-rc4/vendor -#%setup -D -T -a 0 -c -n %{name}-%{version}-rc4 %autosetup -#%setup -D -T -a 1 -# mv Cargo.lock{,.bak} %cargo_prep -# mv Cargo.lock{.bak,} sed -i 's|offline = true|offline = false|' .cargo/config.toml sed -i 's|source.crates-io|source.ignore_this|' .cargo/config.toml -# cat %{SOURCE2} >> .cargo/config.toml %build export RUSTFLAGS="%{rustflags}" %cargo_build -# cargo build --release --frozen --offline --config .cargo/config.toml %install export RUSTFLAGS="%{rustflags}" diff --git a/distro-packaging/opensuse/asusctl.spec b/distro-packaging/opensuse/asusctl.spec new file mode 100644 index 00000000..655f95a4 --- /dev/null +++ b/distro-packaging/opensuse/asusctl.spec @@ -0,0 +1,144 @@ +# +# spec file for package asusctl +# +# Copyright (c) 2020-2021 Luke Jones +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. +# + + +%if %{defined fedora} +%global debug_package %{nil} +%endif + +%define version 6.1.7 +%define specrelease %{?dist} +%define pkg_release 8%{specrelease} + +# Use hardening ldflags. +%global rustflags -Clink-arg=-Wl,-z,relro,-z,now +Name: asusctl +Version: %{version} +Release: %{pkg_release} +Summary: Control fan speeds, LEDs, graphics modes, and charge levels for ASUS notebooks +License: MPL-2.0 + +URL: https://gitlab.com/asus-linux/asusctl +Source0: %{name}-%{version}.tar.gz + +%if %{defined fedora} +BuildRequires: rust-packaging +BuildRequires: systemd-rpm-macros +%else +BuildRequires: cargo-packaging +%endif +BuildRequires: git +BuildRequires: clang-devel +BuildRequires: cargo +BuildRequires: cmake +BuildRequires: rust +BuildRequires: rust-std-static +BuildRequires: pkgconfig(gbm) +BuildRequires: pkgconfig(libinput) +BuildRequires: pkgconfig(libseat) +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(libzstd) +BuildRequires: desktop-file-utils + +Requires: libappindicator-gtk3 + +%description +asusctl is a utility for Linux to control many aspects of various ASUS laptops +but can also be used with non-Asus laptops with reduced features. + +It provides an interface for rootless control of some system functions such as +fan speeds, keyboard LEDs, battery charge level, and graphics modes. +asusctl enables third-party apps to use the above with dbus methods. + +%package rog-gui +Summary: An experimental GUI for %{name} + +%description rog-gui +A one-stop-shop GUI tool for asusd/asusctl. It aims to provide most controls, +a notification service, and ability to run in the background. + +%prep +%autosetup +%if %{defined fedora} +%cargo_prep +%endif +sed -i 's|offline = true|offline = false|' .cargo/config.toml +sed -i 's|source.crates-io|source.ignore_this|' .cargo/config.toml + +%build +export RUSTFLAGS="%{rustflags}" +%cargo_build + +%install +export RUSTFLAGS="%{rustflags}" +mkdir -p "%{buildroot}/%{_bindir}" "%{buildroot}%{_docdir}" +%make_install + +install -D -m 0644 README.md %{buildroot}/%{_docdir}/%{name}/README.md +install -D -m 0644 rog-anime/README.md %{buildroot}/%{_docdir}/%{name}/README-anime.md +install -D -m 0644 rog-anime/data/diagonal-template.png %{buildroot}/%{_docdir}/%{name}/diagonal-template.png + +desktop-file-validate %{buildroot}/%{_datadir}/applications/rog-control-center.desktop + +%pre +%service_add_pre asusd.service + +%post +%service_add_post asusd.service + +%preun +%service_del_preun asusd.service + +%postun +%service_del_postun asusd.service + +%files +%license LICENSE +%{_bindir}/asusd +%{_bindir}/asusd-user +%{_bindir}/asusctl +%{_unitdir}/asusd.service +%{_userunitdir}/asusd-user.service +%{_udevrulesdir}/99-asusd.rules +#%dir %{_sysconfdir}/asusd/ +%{_datadir}/asusd/aura_support.ron +%{_datadir}/dbus-1/system.d/asusd.conf +%{_datadir}/icons/hicolor/512x512/apps/asus_notif_yellow.png +%{_datadir}/icons/hicolor/512x512/apps/asus_notif_green.png +%{_datadir}/icons/hicolor/512x512/apps/asus_notif_red.png +%{_datadir}/icons/hicolor/512x512/apps/asus_notif_blue.png +%{_datadir}/icons/hicolor/512x512/apps/asus_notif_orange.png +%{_datadir}/icons/hicolor/512x512/apps/asus_notif_white.png +%{_datadir}/icons/hicolor/scalable/status/gpu-compute.svg +%{_datadir}/icons/hicolor/scalable/status/gpu-hybrid.svg +%{_datadir}/icons/hicolor/scalable/status/gpu-integrated.svg +%{_datadir}/icons/hicolor/scalable/status/gpu-nvidia.svg +%{_datadir}/icons/hicolor/scalable/status/gpu-vfio.svg +%{_datadir}/icons/hicolor/scalable/status/notification-reboot.svg +%{_docdir}/%{name}/ +%{_datadir}/asusd/ + +%files rog-gui +%{_bindir}/rog-control-center +%{_datadir}/applications/rog-control-center.desktop +%{_datadir}/icons/hicolor/512x512/apps/rog-control-center.png +%{_datadir}/rog-gui + +%changelog diff --git a/distro-packaging/opensuse/workflow.yml b/distro-packaging/opensuse/workflow.yml new file mode 100644 index 00000000..9968ee62 --- /dev/null +++ b/distro-packaging/opensuse/workflow.yml @@ -0,0 +1,10 @@ +workflow: + steps: + - trigger_services: + project: home:luke_nukem:asus + package: asusctl + - rebuild_package: + project: home:luke_nukem:asus + package: asusctl + filters: + event: tag_push