From 705848ac35117cbc18dfa02f537343636bff4c56 Mon Sep 17 00:00:00 2001 From: Artur Frenszek-Iwicki Date: Sun, 20 Dec 2020 22:45:14 +0100 Subject: [PATCH 1/3] Update to v0.4.3 --- .gitignore | 1 + ...ext-0.4.2--missing-extern-qualifiers.patch | 13 ---- ckb-next.spec | 71 ++++++++++--------- sources | 2 +- 4 files changed, 41 insertions(+), 46 deletions(-) delete mode 100644 ckb-next-0.4.2--missing-extern-qualifiers.patch diff --git a/.gitignore b/.gitignore index f78ec94..d07e777 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /ckb-next-0.4.0.tar.gz /ckb-next-0.4.1.tar.gz /ckb-next-0.4.2.tar.gz +/ckb-next-0.4.3.tar.gz diff --git a/ckb-next-0.4.2--missing-extern-qualifiers.patch b/ckb-next-0.4.2--missing-extern-qualifiers.patch deleted file mode 100644 index f4fb09a..0000000 --- a/ckb-next-0.4.2--missing-extern-qualifiers.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/daemon/devnode.h b/src/daemon/devnode.h -index a0b3a93..349e778 100644 ---- a/src/daemon/devnode.h -+++ b/src/daemon/devnode.h -@@ -5,7 +5,7 @@ - #include "usb.h" - - /// Device path base ("/dev/input/ckb" or "/var/run/ckb") --const char *const devpath; -+extern const char *const devpath; - - /// Group ID for the control nodes. -1 to give read/write access to everybody - extern long gid; diff --git a/ckb-next.spec b/ckb-next.spec index 2cb70f2..0755fd2 100644 --- a/ckb-next.spec +++ b/ckb-next.spec @@ -1,6 +1,6 @@ Name: ckb-next -Version: 0.4.2 -Release: 3%{?dist} +Version: 0.4.3 +Release: 1%{?dist} Summary: Unofficial driver for Corsair RGB keyboards # ckb-next is GPLv2 @@ -15,17 +15,23 @@ Source1: ckb-next.appdata.xml Source2: ckb-next.1 Source3: 99-ckb-next.preset -Patch0: ckb-next-0.4.2--missing-extern-qualifiers.patch - BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: gcc-c++ -BuildRequires: libappindicator-devel +BuildRequires: make BuildRequires: libappstream-glib +BuildRequires: qt5-linguist + +BuildRequires: dbusmenu-qt5-devel +BuildRequires: libappindicator-devel BuildRequires: libgudev-devel +BuildRequires: libxcb-devel BuildRequires: pulseaudio-libs-devel BuildRequires: qt5-qtbase-devel >= 5.2.0 +BuildRequires: qt5-qtx11extras-devel BuildRequires: quazip-qt5-devel >= 0.7.3 +BuildRequires: xcb-util-devel +BuildRequires: xcb-util-wm-devel BuildRequires: zlib-devel BuildRequires: systemd-devel @@ -49,7 +55,6 @@ supports much of the same functionality, including full RGB animations. %prep %setup -q -%patch0 -p1 # Remove the bundled quazip library rm -rf src/libs/quazip @@ -57,47 +62,41 @@ rm -rf src/libs/quazip # Fedora uses /usr/libexec for daemons sed -e '/^ExecStart/cExecStart=%{_libexecdir}/ckb-next-daemon' -i linux/systemd/ckb-next-daemon.service.in +# Fedora has merged /lib into /usr/lib +sed -e 's|"/lib/udev/rules.d"|"%{_udevrulesdir}"|g' -i CMakeLists.txt + %build -%cmake -H. -Bbuild \ +%cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_INSTALL_LIBEXECDIR=libexec \ + -DDISABLE_UPDATER=1 \ + -DFORCE_INIT_SYSTEM=systemd \ -DSAFE_INSTALL=OFF \ -DSAFE_UNINSTALL=OFF \ -DWITH_SHIPPED_QUAZIP=OFF \ - -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DCMAKE_INSTALL_LIBEXECDIR=libexec \ - -DDISABLE_UPDATER=1 -%cmake --build build --target all -- -j build - -pushd build -%make_build -popd + ./ +%cmake_build # Color freeze fix -sed -e '/^Exec=/cExec=env QT_QPA_PLATFORMTHEME=qt5ct %{_bindir}/ckb-next' -i build/src/gui/ckb-next.desktop +sed -e '/^Exec=/cExec=env QT_QPA_PLATFORMTHEME=qt5ct %{_bindir}/ckb-next' -i %{_vpath_builddir}/src/gui/ckb-next.desktop %install -install -Dp -m 755 build/bin/ckb-next %{buildroot}%{_bindir}/ckb-next -install -Dp -m 755 build/bin/ckb-next-daemon %{buildroot}%{_libexecdir}/ckb-next-daemon +%cmake_install -install -d -m 755 %{buildroot}%{_libexecdir}/ckb-next-animations -for ANIM in $(find src/animations/ -mindepth 1 -maxdepth 1 -type d -printf '%%f '); do - install -p -m 755 "build/bin/${ANIM}" "%{buildroot}%{_libexecdir}/ckb-next-animations/${ANIM}" -done - -install -Dp -m 0644 %{SOURCE3} %{buildroot}/%{_presetdir}/99-ckb-next.preset -install -Dp -m 644 linux/udev/99-ckb-next-daemon.rules %{buildroot}%{_udevrulesdir}/99-ckb-next-daemon.rules -install -Dp -m 644 linux/systemd/ckb-next-daemon.service.in %{buildroot}%{_unitdir}/ckb-next-daemon.service - -install -Dp -m 644 build/src/gui/ckb-next.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/ckb-next.png - -desktop-file-install --dir=%{buildroot}%{_datadir}/applications/ build/src/gui/ckb-next.desktop +# Move the daemon from /usr/bin/ to /usr/libexec +mv %{buildroot}%{_bindir}/ckb-next-daemon %{buildroot}%{_libexecdir}/ckb-next-daemon +install -Dp -m 0644 %{SOURCE3} %{buildroot}%{_presetdir}/99-ckb-next.preset install -Dp -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/metainfo/ckb-next.appdata.xml -appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/ckb-next.appdata.xml +install -Dp -m 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/ckb-next.1 -install -Dp -m 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/ckb-next.1 + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/ckb-next.desktop +appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/ckb-next.appdata.xml %post @@ -122,11 +121,14 @@ udevadm control --reload-rules 2>&1 > /dev/null || : %license LICENSE %doc CHANGELOG.md FIRMWARE README.md %{_bindir}/ckb-next +%{_bindir}/ckb-next-dev-detect %{_libexecdir}/ckb-next-daemon %{_libexecdir}/ckb-next-animations/ +%{_libdir}/cmake/ckb-next/ %{_datadir}/applications/ckb-next.desktop %{_datadir}/metainfo/ckb-next.appdata.xml %{_datadir}/icons/hicolor/**/apps/ckb-next.png +%{_datadir}/icons/hicolor/**/apps/ckb-next-monochrome.png %{_mandir}/man1/ckb-next.1* %{_presetdir}/99-ckb-next.preset %{_udevrulesdir}/*.rules @@ -134,6 +136,11 @@ udevadm control --reload-rules 2>&1 > /dev/null || : %changelog +* Sun Dec 20 2020 Artur Frenszek-Iwicki - 0.4.3-1 +- Update to v0.4.3 +- Remove Patch0 (missing "extern" qualifiers - fixed upstream) +- Simplify the install section (rely on %%cmake_install) + * Tue Jan 28 2020 Artur Iwicki - 0.4.2-3 - Add a patch to fix build failures diff --git a/sources b/sources index c67c379..ee2ce59 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ckb-next-0.4.2.tar.gz) = 4c80101e935a4d5137b0fd6aaf7d97889913af0bbb8e3097e035e2420043d6525094c1e3f7b5676e8c50328454251ff3260f6aa9b81ec583a2e8136333ee6af8 +SHA512 (ckb-next-0.4.3.tar.gz) = 6772812fb9608251f3a14efeb16960966be446462ab3f5b1bec896761aeae9e5f5cf9c07b21e509dbef057825c3017323f82f066519cb512ebe2fc6eea6ec217 From bdf4e1872ea1dfda149b60f1cbbe43780b1cf75d Mon Sep 17 00:00:00 2001 From: Artur Frenszek-Iwicki Date: Sun, 20 Dec 2020 23:07:49 +0100 Subject: [PATCH 2/3] Force CMake to do an out-of-source build --- ckb-next.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ckb-next.spec b/ckb-next.spec index 0755fd2..5848d72 100644 --- a/ckb-next.spec +++ b/ckb-next.spec @@ -45,6 +45,9 @@ Provides: bundled(kissfft) # ckb-next, as the name suggests, is a re-activation and continuation of "ckb" Obsoletes: ckb +# Force an out-of-source build (default in F33+) +%undefine __cmake_in_source_build + %description ckb-next is an open-source driver for Corsair keyboards and mice. It aims to From 22a941eba509a484b29ce710685c9015a43b4c04 Mon Sep 17 00:00:00 2001 From: Artur Frenszek-Iwicki Date: Thu, 18 Mar 2021 16:48:21 +0100 Subject: [PATCH 3/3] Update to v0.4.4 --- .gitignore | 1 + ckb-next.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d07e777..d5fb5f1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /ckb-next-0.4.1.tar.gz /ckb-next-0.4.2.tar.gz /ckb-next-0.4.3.tar.gz +/ckb-next-0.4.4.tar.gz diff --git a/ckb-next.spec b/ckb-next.spec index 5848d72..6183cb2 100644 --- a/ckb-next.spec +++ b/ckb-next.spec @@ -1,5 +1,5 @@ Name: ckb-next -Version: 0.4.3 +Version: 0.4.4 Release: 1%{?dist} Summary: Unofficial driver for Corsair RGB keyboards @@ -139,6 +139,9 @@ udevadm control --reload-rules 2>&1 > /dev/null || : %changelog +* Thu Mar 18 2021 Artur Frenszek-Iwicki - 0.4.4-1 +- Update to v0.4.4 + * Sun Dec 20 2020 Artur Frenszek-Iwicki - 0.4.3-1 - Update to v0.4.3 - Remove Patch0 (missing "extern" qualifiers - fixed upstream) diff --git a/sources b/sources index ee2ce59..061508b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ckb-next-0.4.3.tar.gz) = 6772812fb9608251f3a14efeb16960966be446462ab3f5b1bec896761aeae9e5f5cf9c07b21e509dbef057825c3017323f82f066519cb512ebe2fc6eea6ec217 +SHA512 (ckb-next-0.4.4.tar.gz) = b03d301a6b984957b5a3047769f25311c479f7992c59222b0ce9314b3204dac2d937c26997b97ec2ee1fdc79e3208c76a57a5c603dc1cd99ffb39fd426f58385