# Mageia RPM Spec %undefine _debugsource_packages Name: ckb-next Version: 0.3.2 Release: 8.189 Summary: Corsair RGB keyboard driver for Linux and OS X Group: Applications/System License: GPLv2 URL: https://github.com/ckb-next/ckb-next Source0: https://github.com/ckb-next/ckb-next/archive/v%{version}.tar.gz#/ckb-next-%{version}.tar.gz # Upstream provides none of the following files Source1: ckb-next.appdata.xml Source2: ckb-next.1 Source3: 99-ckb-next.preset BuildRequires: cmake BuildRequires: cmake(Qt5Core) >= 5.3 BuildRequires: cmake(Qt5Gui) >= 5.3 BuildRequires: cmake(Qt5Network) >= 5.3 BuildRequires: cmake(Qt5Widgets) >= 5.3 BuildRequires: quazip-devel BuildRequires: openssl-devel BuildRequires: libgudev-devel BuildRequires: libappindicator-devel BuildRequires: systemd-devel BuildRequires: pulseaudio-devel BuildRequires: zlib-devel BuildRequires: desktop-file-utils BuildRequires: appstream-util BuildRequires: ImageMagick %{?systemd_requires} Requires: qt5ct Obsoletes: ckb %description ckb-next is an open-source driver for Corsair keyboards and mice. It aims to bring the features of their proprietary CUE software to the Linux and Mac operating systems. This project is currently a work in progress, but it already supports much of the same functionality, including full RGB animations. %prep %setup -q -n ckb-next-%{version} # Fedora uses /usr/libexec for daemons sed -e '/^ExecStart/cExecStart=%{_libexecdir}/ckb-next-daemon' -i linux/systemd/ckb-next-daemon.service.in %build %cmake -DCMAKE_BUILD_TYPE=Release -DSAFE_INSTALL=OFF -DSAFE_UNINSTALL=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBEXECDIR=libexec -DDISABLE_UPDATER=1 #cd build %make_build #cd .. # Color freeze fix sed -e '/^Exec=/cExec=env QT_QPA_PLATFORMTHEME=qt5ct /usr/bin/ckb-next' -i src/gui/ckb-next.desktop %install install -m 644 -D linux/udev/99-ckb-daemon.rules %{buildroot}%{_udevrulesdir}/99-ckb-daemon.rules install -D -m 755 build/bin/ckb-next %{buildroot}%{_bindir}/ckb-next install -D -m 755 build/bin/ckb-next-daemon %{buildroot}%{_libexecdir}/ckb-next-daemon install -d %{buildroot}%{_libexecdir}/ckb-next-animations install -D -m 755 build/bin/gradient %{buildroot}%{_libexecdir}/ckb-next-animations/gradient install -D -m 755 build/bin/heat %{buildroot}%{_libexecdir}/ckb-next-animations/heat install -D -m 755 build/bin/mviz %{buildroot}%{_libexecdir}/ckb-next-animations/mviz install -D -m 755 build/bin/pinwheel %{buildroot}%{_libexecdir}/ckb-next-animations/pinwheel install -D -m 755 build/bin/rain %{buildroot}%{_libexecdir}/ckb-next-animations/rain 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 %post %systemd_post ckb-next-daemon.service 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 || : %preun %systemd_preun ckb-next-daemon.service %postun %systemd_postun_with_restart ckb-next-daemon.service 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*