From 474e578319c06ffd6f807bf042f52078302f66ed Mon Sep 17 00:00:00 2001 From: "Ward Nakchbandi (Cosmic Fusion)" <83735213+CosmicFusion@users.noreply.github.com> Date: Sun, 23 Jun 2024 00:54:09 +0300 Subject: [PATCH] optimizations --- Cargo.toml | 7 +++++++ fedora-kernel-manager.spec | 27 ++++++++++++++------------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0211405..d1df5c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,3 +22,10 @@ rust-i18n = "3.0.1" [build-dependencies] glib-build-tools = "0.19.0" + +[profile.release] +opt-level = 'z' # Optimize for size +lto = true # Enable link-time optimization +codegen-units = 1 # Reduce number of codegen units to increase optimizations +panic = 'abort' # Abort on panic +strip = true # Strip symbols from binary* diff --git a/fedora-kernel-manager.spec b/fedora-kernel-manager.spec index 5a28580..650c8ef 100644 --- a/fedora-kernel-manager.spec +++ b/fedora-kernel-manager.spec @@ -3,7 +3,7 @@ Name: fedora-kernel-manager Version: %{pkg_release} -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Libraries Summary: A Libadwaita rust based application for managing and installing kernels. @@ -37,18 +37,6 @@ Recommends: sched-ext-scx %description A Libadwaita rust based application for managing and installing kernels. -%package cachyos-config -Summary: Config files to enable coprs/bieszczaders/kernel-cachyos in fedora-kernel-manager -Requires: fedora-kernel-manager - -%description cachyos-config -Config files to enable coprs/bieszczaders/kernel-cachyos in fedora-kernel-manager - -%files cachyos-config -%{_prefix}/lib/fedora-kernel-manager/kernel_branches/kernel-cachyos.json -%{_datadir}/polkit-1/actions/fkm.kernel.cachyos.init.policy -%{_datadir}/polkit-1/rules.d/99-fkm.kernel.cachyos.init.rules - %prep %autosetup -p1 -n fedora-kernel-manager @@ -62,3 +50,16 @@ DESTDIR=%{buildroot} make install %{_datadir}/icons/hicolor/scalable/apps/*.svg %{_datadir}/polkit-1/actions/fkm.change.scx.policy %{_datadir}/polkit-1/actions/fkm.modify.package.policy +%exclude %{_prefix}/lib/fedora-kernel-manager/kernel_branches/kernel-cachyos.json + +%package cachyos-config +Summary: Config files to enable coprs/bieszczaders/kernel-cachyos in fedora-kernel-manager +Requires: fedora-kernel-manager + +%description cachyos-config +Config files to enable coprs/bieszczaders/kernel-cachyos in fedora-kernel-manager + +%files cachyos-config +%{_prefix}/lib/fedora-kernel-manager/kernel_branches/kernel-cachyos.json +%{_datadir}/polkit-1/actions/fkm.kernel.cachyos.init.policy +%{_datadir}/polkit-1/rules.d/99-fkm.kernel.cachyos.init.rules \ No newline at end of file