Blame system76-keyboard-configurator.spec

1acee50
%bcond_without check
1acee50
63553e6
%global tag      v1.3.10
1acee50
%global forgeurl https://github.com/pop-os/keyboard-configurator
63553e6
Version:         1.3.10
1acee50
%forgemeta
1acee50
1acee50
Name:          system76-keyboard-configurator
8e5c203
Release:       %autorelease
1acee50
Summary:       System76 Keyboard Configurator
1acee50
e231d24
# * system76-keyboard-configurator: GPL-3.0-or-later
e231d24
# * Rust crate dependencies:
e231d24
#   (MIT OR Apache-2.0) AND Unicode-DFS-2016
e231d24
#   Apache-2.0
e231d24
#   Apache-2.0 OR BSL-1.0
e231d24
#   Apache-2.0 OR MIT
e231d24
#   Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
e231d24
#   MIT
e231d24
#   MIT OR Apache-2.0
e231d24
#   Unicode-DFS-2016
e231d24
#   Unlicense OR MIT
e231d24
# LICENSE.dependencies contains a full license breakdown
e231d24
License:       GPL-3.0-or-later AND Apache-2.0 AND MIT AND Unicode-DFS-2016 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Unlicense OR MIT)
1acee50
URL:           %{forgeurl}
1acee50
Source:        %{forgesource}
1acee50
92cca54
Patch0:        fix-target-dependencies.patch
4e7c585
# Submitted for inclusion upstream.
4e7c585
# https://github.com/pop-os/keyboard-configurator/pull/117
4e7c585
Patch1:        update-palette-0.6.patch
1acee50
e3fb8c2
BuildRequires: cargo-rpm-macros >= 24
9f8773e
BuildRequires: desktop-file-utils
92cca54
BuildRequires: /usr/bin/appstream-util
1acee50
1acee50
1acee50
%description
d387023
Application for configuration of System76 keyboard firmware.
1acee50
1acee50
1acee50
%prep
1acee50
%forgeautosetup -p1
1acee50
%cargo_prep
edd5031
edd5031
92cca54
%generate_buildrequires
e3fb8c2
%cargo_generate_buildrequires
1acee50
1acee50
1acee50
%build
1acee50
%cargo_build
e231d24
%{cargo_license_summary}
e231d24
%{cargo_license} > LICENSE.dependencies
1acee50
1acee50
1acee50
%install
1acee50
%cargo_install
a9e3d0b
%__install -D -m 0644 -vp linux/com.system76.keyboardconfigurator.desktop                %{buildroot}%{_datadir}/applications/com.system76.keyboardconfigurator.desktop
a9e3d0b
%__install -D -m 0644 -vp linux/com.system76.keyboardconfigurator.appdata.xml            %{buildroot}%{_datadir}/metainfo/com.system76.keyboardconfigurator.appdata.xml
a9e3d0b
%__install -D -m 0644 -vp data/icons/scalable/apps/com.system76.keyboardconfigurator.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/com.system76.keyboardconfigurator.svg    
a709cd2
%__install -D -m 0644 -vp debian/com.system76.pkexec.keyboardconfigurator.policy         %{buildroot}%{_datadir}/polkit-1/actions/com.system76.pkexec.keyboardconfigurator.policy 
1acee50
1acee50
1acee50
%if %{with check}
1acee50
%check
1acee50
%cargo_test
5956dd1
desktop-file-validate                 linux/com.system76.keyboardconfigurator.desktop
5956dd1
appstream-util validate-relax --nonet linux/com.system76.keyboardconfigurator.appdata.xml
1acee50
%endif
1acee50
1acee50
1acee50
%files
e231d24
%license LICENSE
e231d24
%license LICENSE.dependencies
e231d24
%doc README.md
1acee50
%{_bindir}/%{name}
a9e3d0b
%{_datadir}/applications/com.system76.keyboardconfigurator.desktop
a9e3d0b
%{_datadir}/metainfo/com.system76.keyboardconfigurator.appdata.xml
a9e3d0b
%{_datadir}/icons/hicolor/scalable/apps/com.system76.keyboardconfigurator.svg
a709cd2
%{_datadir}/polkit-1/actions/com.system76.pkexec.keyboardconfigurator.policy
1acee50
1acee50
1acee50
%changelog
8e5c203
%autochangelog