1 |
Name: ckb-next |
2 |
Version: 0.4.4 |
3 |
Release: %mkrel 2 |
4 |
Summary: Corsair RGB keyboard driver for Linux and OS X |
5 |
Group: System/Configuration |
6 |
#bundled kissfft library is BSD |
7 |
License: GPLv2 and BSD |
8 |
|
9 |
URL: https://github.com/ckb-next/ckb-next |
10 |
Source0: https://github.com/ckb-next/ckb-next/archive/v%{version}/%{name}-%{version}.tar.gz |
11 |
|
12 |
# Upstream provides none of the following files |
13 |
Source1: ckb-next.appdata.xml |
14 |
Source2: ckb-next.1 |
15 |
Source3: 99-ckb-next.preset |
16 |
Source4: README.install.urpmi |
17 |
|
18 |
Patch0: ckb-next-0.4.2-fix-daemon-path.patch |
19 |
|
20 |
|
21 |
BuildRequires: cmake |
22 |
BuildRequires: cmake(Qt5Core) >= 5.5.1 |
23 |
BuildRequires: cmake(Qt5DBus) >= 5.5.1 |
24 |
BuildRequires: cmake(Qt5Gui) >= 5.5.1 |
25 |
BuildRequires: cmake(Qt5Network) >= 5.5.1 |
26 |
BuildRequires: cmake(Qt5Widgets) >= 5.5.1 |
27 |
BuildRequires: cmake(Qt5X11Extras) >= 5.5.1 |
28 |
BuildRequires: cmake(Qt5LinguistTools) >= 5.5.1 |
29 |
BuildRequires: cmake(QuaZip-Qt5) |
30 |
BuildRequires: pkgconfig(dbusmenu-qt5) |
31 |
BuildRequires: pkgconfig(openssl) |
32 |
BuildRequires: pkgconfig(gudev-1.0) |
33 |
BuildRequires: pkgconfig(systemd) |
34 |
BuildRequires: pkgconfig(libpulse) |
35 |
BuildRequires: pkgconfig(zlib) |
36 |
BuildRequires: desktop-file-utils |
37 |
BuildRequires: appstream-util |
38 |
BuildRequires: ImageMagick |
39 |
|
40 |
Requires(post): rpm-helper >= %{rpmhelper_required_version} |
41 |
Requires(preun): rpm-helper >= %{rpmhelper_required_version} |
42 |
Requires(postun): rpm-helper >= %{rpmhelper_required_version} |
43 |
|
44 |
%description |
45 |
ckb-next is an open-source driver for Corsair keyboards and mice. It aims to |
46 |
bring the features of their proprietary CUE software to the Linux and Mac |
47 |
operating systems. This project is currently a work in progress, but it already |
48 |
supports much of the same functionality, including full RGB animations. |
49 |
|
50 |
%files |
51 |
%license LICENSE |
52 |
%doc CHANGELOG.md FIRMWARE README.md README.install.urpmi |
53 |
%{_bindir}/* |
54 |
%{_libexecdir}/%{name}-* |
55 |
%{_unitdir}/ckb-next-daemon.service |
56 |
%{_presetdir}/99-ckb-next.preset |
57 |
%{_datadir}/applications/ckb-next.desktop |
58 |
%{_datadir}/appdata/ckb-next.appdata.xml |
59 |
%{_iconsdir}/hicolor/*/apps/ckb-next* |
60 |
%{_mandir}/man1/* |
61 |
%{_udevrulesdir}/*.rules |
62 |
%{_libdir}/cmake/ckb-next/ |
63 |
|
64 |
%prep |
65 |
%setup -q |
66 |
%autopatch -p1 |
67 |
|
68 |
%build |
69 |
# We force systemd since autodetection fail inside the buildsystem |
70 |
%cmake -DCMAKE_BUILD_TYPE=Release \ |
71 |
-DFORCE_INIT_SYSTEM=systemd \ |
72 |
-DSAFE_INSTALL=OFF \ |
73 |
-DSAFE_UNINSTALL=OFF \ |
74 |
-DCMAKE_INSTALL_PREFIX=%{_prefix} \ |
75 |
-DCMAKE_INSTALL_LIBEXECDIR=libexec \ |
76 |
-DDISABLE_UPDATER=1 \ |
77 |
-DUDEV_RULE_DIRECTORY=%{_udevrulesdir} |
78 |
|
79 |
%cmake_build |
80 |
|
81 |
%install |
82 |
%cmake_install |
83 |
|
84 |
%__install -Dpm 0644 %{SOURCE1} %{buildroot}%{_datadir}/appdata/ckb-next.appdata.xml |
85 |
%__install -Dpm 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/ckb-next.1 |
86 |
%__install -Dpm 0644 %{SOURCE3} %{buildroot}/%{_presetdir}/99-ckb-next.preset |
87 |
%__install -Dpm 0644 %{SOURCE4} README.install.urpmi |
88 |
|
89 |
%check |
90 |
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/ckb-next.appdata.xml |
91 |
|
92 |
%post |
93 |
%_post_service %{name}-daemon |
94 |
|
95 |
%preun |
96 |
%_preun_service %{name}-daemon |
97 |
|
98 |
%postun |
99 |
%systemd_postun_with_restart %{name}-daemon |