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 610620f..f0860c6 100644 --- a/ckb-next.spec +++ b/ckb-next.spec @@ -1,6 +1,6 @@ Name: ckb-next -Version: 0.4.2 -Release: 4%{?dist} +Version: 0.4.3 +Release: 1%{?dist} Summary: Unofficial driver for Corsair RGB keyboards # ckb-next is GPLv2 @@ -15,21 +15,26 @@ 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 -BuildRequires: make %{?systemd_requires} Requires: qt5-qtbase >= 5.2.0 @@ -50,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 @@ -58,48 +62,42 @@ 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 +# 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 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 +install -Dp -m 0644 %{SOURCE3} %{buildroot}%{_presetdir}/99-ckb-next.preset +install -Dp -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/metainfo/ckb-next.appdata.xml +install -Dp -m 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/ckb-next.1 -desktop-file-install --dir=%{buildroot}%{_datadir}/applications/ build/src/gui/ckb-next.desktop -install -Dp -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/metainfo/ckb-next.appdata.xml +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/ckb-next.desktop appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/ckb-next.appdata.xml -install -Dp -m 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/ckb-next.1 - %post %systemd_post ckb-next-daemon.service @@ -123,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 @@ -135,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) + * Mon Jul 27 2020 Fedora Release Engineering - 0.4.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild 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