add rpm spec

This commit is contained in:
Ward from fusion-voyager-3 2024-06-22 20:43:00 +03:00
parent 9e5e1c6770
commit 9d33a1ea43
7 changed files with 125 additions and 0 deletions

View File

@ -19,6 +19,7 @@ install_no_build:
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/scalable/apps
cp -vf data/com.github.cosmicfusion.fedora-kernel-manager.svg $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/
cp -vf data/com.github.cosmicfusion.fedora-kernel-manager.desktop $(DESTDIR)/usr/share/applications/
cp -vf data/polkit-1 $(DESTDIR)/usr/share/
install:
mkdir -p $(DESTDIR)/usr/bin/
@ -35,3 +36,4 @@ install:
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/scalable/apps
cp -vf data/com.github.cosmicfusion.fedora-kernel-manager.svg $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/
cp -vf data/com.github.cosmicfusion.fedora-kernel-manager.desktop $(DESTDIR)/usr/share/applications/
cp -vf data/polkit-1 $(DESTDIR)/usr/share/

BIN
core Normal file

Binary file not shown.

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/software/polkit/policyconfig-1.dtd">
<policyconfig>
<action id="fdm.change.scx">
<message>Authentication is required to change the SCX Scheduler</message>
<icon_name>com.github.cosmicfusion.fedora-kernel-manager</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/lib/fedora-kernel-manager/scripts/scripts/change_scx.sh</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/software/polkit/policyconfig-1.dtd">
<policyconfig>
<action id="fdm.kernel.cachyos.init">
<message>Authentication is required to initialize the Cachyos kernel repo</message>
<icon_name>com.github.cosmicfusion.fedora-kernel-manager</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/lib/fedora-kernel-manager/scripts/scripts/kernel-cachyos-init.sh</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/software/polkit/policyconfig-1.dtd">
<policyconfig>
<action id="fdm.modify.package">
<message>Authentication is required to modify system packages</message>
<icon_name>com.github.cosmicfusion.fedora-kernel-manager</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/lib/fedora-kernel-manager/scripts/scripts/modify_package.sh</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@ -0,0 +1,6 @@
/* Allow passwordless auth for fdm.kernel.cachyos.init
polkit.addRule(function(action, subject) {
if (action.id == "fdm.kernel.cachyos.init" {
return polkit.Result.YES;
}
});

View File

@ -0,0 +1,60 @@
%define pkg_release 0.1.0
Name: fedora-kernel-manager
Version: %{pkg_release}
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Libraries
Summary: A Libadwaita rust based application for managing and installing kernels.
URL: https://github.com/CosmicFusion/fedora-kernel-manager
Source0: %{URL}/releases/download/%{pkg_release}/fedora-kernel-manager.tar.gz
BuildRequires: wget
BuildRequires: cargo
BuildRequires: gdk-pixbuf2-devel
BuildRequires: gtk4-devel
BuildRequires: gtk3-devel
BuildRequires: libadwaita-devel
BuildRequires: openssl-devel
Requires: /usr/bin/bash
Requires: gtk4
Requires: gtk3
Requires: libadwaita
Requires: glib2
Requires: util-linux
Requires: polkit
Requires: iputils
Requires: fedora-kernel-manager-cachyos-config
%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/fdm.kernel.cachyos.init.policy
%{_datadir}/polkit-1/rules.d/99-fdm.kernel.cachyos.init.rules
%prep
%autosetup -p1 -n nobara-drivers-gtk4
%build
DESTDIR=%{buildroot} make install
%files
%{_prefix}/lib/fedora-kernel-manager/*
%{_bindir}/*
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/scalable/apps/*.svg
%{_datadir}/polkit-1/actions/fdm.change.scx.policy
%{_datadir}/polkit-1/actions/fdm.modify.package.policy