|
# Mageia RPM Spec |
|
|
%undefine _debugsource_packages |
|
|
|
|
1 |
Name: ckb-next |
Name: ckb-next |
2 |
Version: 0.3.2 |
Version: 0.4.4 |
3 |
Release: 8.189 |
Release: %mkrel 2 |
4 |
Summary: Corsair RGB keyboard driver for Linux and OS X |
Summary: Corsair RGB keyboard driver for Linux and OS X |
5 |
Group: Applications/System |
Group: System/Configuration |
6 |
License: GPLv2 |
#bundled kissfft library is BSD |
7 |
|
License: GPLv2 and BSD |
8 |
|
|
9 |
URL: https://github.com/ckb-next/ckb-next |
URL: https://github.com/ckb-next/ckb-next |
10 |
Source0: https://github.com/ckb-next/ckb-next/archive/v%{version}.tar.gz#/ckb-next-%{version}.tar.gz |
Source0: https://github.com/ckb-next/ckb-next/archive/v%{version}/%{name}-%{version}.tar.gz |
11 |
|
|
12 |
# Upstream provides none of the following files |
# Upstream provides none of the following files |
13 |
Source1: ckb-next.appdata.xml |
Source1: ckb-next.appdata.xml |
14 |
Source2: ckb-next.1 |
Source2: ckb-next.1 |
15 |
Source3: 99-ckb-next.preset |
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 |
BuildRequires: cmake |
22 |
BuildRequires: cmake(Qt5Core) >= 5.3 |
BuildRequires: cmake(Qt5Core) >= 5.5.1 |
23 |
BuildRequires: cmake(Qt5Gui) >= 5.3 |
BuildRequires: cmake(Qt5DBus) >= 5.5.1 |
24 |
BuildRequires: cmake(Qt5Network) >= 5.3 |
BuildRequires: cmake(Qt5Gui) >= 5.5.1 |
25 |
BuildRequires: cmake(Qt5Widgets) >= 5.3 |
BuildRequires: cmake(Qt5Network) >= 5.5.1 |
26 |
BuildRequires: quazip-devel |
BuildRequires: cmake(Qt5Widgets) >= 5.5.1 |
27 |
BuildRequires: openssl-devel |
BuildRequires: cmake(Qt5X11Extras) >= 5.5.1 |
28 |
BuildRequires: libgudev-devel |
BuildRequires: cmake(Qt5LinguistTools) >= 5.5.1 |
29 |
BuildRequires: libappindicator-devel |
BuildRequires: cmake(QuaZip-Qt5) |
30 |
BuildRequires: systemd-devel |
BuildRequires: pkgconfig(dbusmenu-qt5) |
31 |
BuildRequires: pulseaudio-devel |
BuildRequires: pkgconfig(openssl) |
32 |
BuildRequires: zlib-devel |
BuildRequires: pkgconfig(gudev-1.0) |
33 |
|
BuildRequires: pkgconfig(libsystemd) |
34 |
|
BuildRequires: pkgconfig(libpulse) |
35 |
|
BuildRequires: pkgconfig(zlib) |
36 |
BuildRequires: desktop-file-utils |
BuildRequires: desktop-file-utils |
37 |
BuildRequires: appstream-util |
BuildRequires: appstream-util |
38 |
BuildRequires: ImageMagick |
BuildRequires: ImageMagick |
|
%{?systemd_requires} |
|
39 |
|
|
40 |
Requires: qt5ct |
Requires(post): rpm-helper >= %{rpmhelper_required_version} |
41 |
Obsoletes: ckb |
Requires(preun): rpm-helper >= %{rpmhelper_required_version} |
42 |
|
Requires(postun): rpm-helper >= %{rpmhelper_required_version} |
43 |
|
|
44 |
%description |
%description |
45 |
ckb-next is an open-source driver for Corsair keyboards and mice. It aims to |
ckb-next is an open-source driver for Corsair keyboards and mice. It aims to |
47 |
operating systems. This project is currently a work in progress, but it already |
operating systems. This project is currently a work in progress, but it already |
48 |
supports much of the same functionality, including full RGB animations. |
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 |
%prep |
65 |
%setup -q -n ckb-next-%{version} |
%setup -q |
66 |
# Fedora uses /usr/libexec for daemons |
%autopatch -p1 |
|
sed -e '/^ExecStart/cExecStart=%{_libexecdir}/ckb-next-daemon' -i linux/systemd/ckb-next-daemon.service.in |
|
67 |
|
|
68 |
%build |
%build |
69 |
%cmake -DCMAKE_BUILD_TYPE=Release -DSAFE_INSTALL=OFF -DSAFE_UNINSTALL=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBEXECDIR=libexec -DDISABLE_UPDATER=1 |
# We force systemd since autodetection fail inside the buildsystem |
70 |
#cd build |
%cmake -DCMAKE_BUILD_TYPE=Release \ |
71 |
%make_build |
-DFORCE_INIT_SYSTEM=systemd \ |
72 |
#cd .. |
-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 |
# Color freeze fix |
%cmake_build |
|
sed -e '/^Exec=/cExec=env QT_QPA_PLATFORMTHEME=qt5ct /usr/bin/ckb-next' -i src/gui/ckb-next.desktop |
|
80 |
|
|
81 |
%install |
%install |
82 |
install -m 644 -D linux/udev/99-ckb-daemon.rules %{buildroot}%{_udevrulesdir}/99-ckb-daemon.rules |
%cmake_install |
83 |
install -D -m 755 build/bin/ckb-next %{buildroot}%{_bindir}/ckb-next |
|
84 |
install -D -m 755 build/bin/ckb-next-daemon %{buildroot}%{_libexecdir}/ckb-next-daemon |
%__install -Dpm 0644 %{SOURCE1} %{buildroot}%{_datadir}/appdata/ckb-next.appdata.xml |
85 |
install -d %{buildroot}%{_libexecdir}/ckb-next-animations |
%__install -Dpm 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/ckb-next.1 |
86 |
install -D -m 755 build/bin/gradient %{buildroot}%{_libexecdir}/ckb-next-animations/gradient |
%__install -Dpm 0644 %{SOURCE3} %{buildroot}/%{_presetdir}/99-ckb-next.preset |
87 |
install -D -m 755 build/bin/heat %{buildroot}%{_libexecdir}/ckb-next-animations/heat |
%__install -Dpm 0644 %{SOURCE4} README.install.urpmi |
88 |
install -D -m 755 build/bin/mviz %{buildroot}%{_libexecdir}/ckb-next-animations/mviz |
|
89 |
install -D -m 755 build/bin/pinwheel %{buildroot}%{_libexecdir}/ckb-next-animations/pinwheel |
%check |
90 |
install -D -m 755 build/bin/rain %{buildroot}%{_libexecdir}/ckb-next-animations/rain |
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/ckb-next.appdata.xml |
|
install -D -m 755 build/bin/random %{buildroot}%{_libexecdir}/ckb-next-animations/random |
|
|
install -D -m 755 build/bin/ripple %{buildroot}%{_libexecdir}/ckb-next-animations/ripple |
|
|
install -D -m 755 build/bin/wave %{buildroot}%{_libexecdir}/ckb-next-animations/wave |
|
|
install -m 644 -D build/src/gui/ckb-next.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/ckb-next.png |
|
|
install -Dpm 0644 %{SOURCE3} %{buildroot}/%{_presetdir}/99-ckb-next.preset |
|
|
install -m 644 -D linux/systemd/ckb-next-daemon.service.in %{buildroot}%{_unitdir}/ckb-next-daemon.service |
|
|
desktop-file-install --dir=%{buildroot}%{_datadir}/applications build/src/gui/ckb-next.desktop |
|
|
install -Dpm 0644 \ |
|
|
%{SOURCE1} %{buildroot}%{_datadir}/appdata/ckb-next.appdata.xml |
|
|
appstream-util \ |
|
|
validate-relax --nonet %{buildroot}%{_datadir}/appdata/ckb-next.appdata.xml |
|
|
install -Dpm 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/ckb-next.1 |
|
91 |
|
|
92 |
%post |
%post |
93 |
%systemd_post ckb-next-daemon.service |
%_post_service %{name}-daemon |
|
if [ $1 -eq 1 ]; then |
|
|
# starting daemon also at install |
|
|
systemctl start ckb-next-daemon.service >/dev/null 2>&1 || : |
|
|
touch --no-create %{_datadir}/icons/hicolor >&/dev/null || : |
|
|
fi |
|
|
udevadm control --reload-rules 2>&1 > /dev/null || : |
|
94 |
|
|
95 |
%preun |
%preun |
96 |
%systemd_preun ckb-next-daemon.service |
%_preun_service %{name}-daemon |
97 |
|
|
98 |
%postun |
%postun |
99 |
%systemd_postun_with_restart ckb-next-daemon.service |
%systemd_postun_with_restart %{name}-daemon |
|
if [ $1 -eq 0 ]; then |
|
|
touch --no-create %{_datadir}/icons/hicolor >&/dev/null || : |
|
|
gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : |
|
|
fi |
|
|
udevadm control --reload-rules 2>&1 > /dev/null || : |
|
|
|
|
|
%posttrans |
|
|
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : |
|
|
|
|
|
|
|
|
%files |
|
|
%defattr(-,root,root) |
|
|
%license LICENSE |
|
|
%doc CHANGELOG.md FIRMWARE README.md |
|
|
%{_udevrulesdir}/*.rules |
|
|
%{_bindir}/ckb-next |
|
|
%{_libexecdir}/ckb-next-daemon |
|
|
%{_libexecdir}/ckb-next-animations |
|
|
%{_unitdir}/ckb-next-daemon.service |
|
|
%{_presetdir}/99-ckb-next.preset |
|
|
%{_datadir}/applications/ckb-next.desktop |
|
|
%{_datadir}/appdata/ckb-next.appdata.xml |
|
|
%{_datadir}/icons/hicolor/*/apps/ckb-next.png |
|
|
%{_mandir}/man1/ckb-next.1* |
|
|
|
|