File ckb-next.spec of Package ckb-next

# spec file for package ckb-next
# Copyright (c) 2023 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           ckb-next
Version:        0.6.0
Release:        0
Summary:        RGB driver for Corsair keyboard and mice
License:        BSD-3-Clause AND GPL-2.0-only
Group:          Hardware/Other
# PATCH-FIX-OPENSUSE ckb-next-use-run.patch
Patch1:         ckb-next-use-run.patch
# PATCH-FIX-OPENSUSE ckb-next-systemd.patch
Patch2:         ckb-next-systemd.patch
# PATCH-FIX-OPENSUSE ckb-next-no-cmake-modules.patch
Patch3:         ckb-next-no-cmake-modules.patch
# PATCH-FIX-UPSTREAM ckb-next-udev.patch
Patch4:         ckb-next-udev.patch
# PATCH-FIX-OPENSUSE 422.patch boo#1135528
Patch5:         422.patch
Patch6:         harden_ckb-next-daemon.service.patch
BuildRequires:  ImageMagick
BuildRequires:  cmake
BuildRequires:  hicolor-icon-theme
%if 0%{?suse_version} >= 1500
BuildRequires:  quazip-qt5-devel
BuildRequires:  update-desktop-files
BuildRequires:  cmake(Qt5DBus)
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  cmake(Qt5Network)
BuildRequires:  cmake(Qt5Widgets) >= 5.2
BuildRequires:  cmake(Qt5X11Extras)
BuildRequires:  cmake(dbusmenu-qt5)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(systemd)
BuildRequires:  pkgconfig(xcb)
BuildRequires:  pkgconfig(xcb-ewmh)
BuildRequires:  pkgconfig(xcb-screensaver)
BuildRequires:  pkgconfig(zlib)
Obsoletes:      ckb < %{version}
Provides:       ckb = %{version}
Requires:       bash

ckb is a driver for Corsair keyboards and mice. It brings the
features of their proprietary CUE software to the Linux operating
system. This project supports much of the same functionality,
including full RGB animations.

%autosetup -p1

%cmake \
       -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \

for s in 16 22 32 48 64 96 128 192 256; do
   mkdir -pv %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps
   convert -strip -resize ${s}x${s} %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/ckb-next.png \
mkdir %{buildroot}%{_sbindir}
ln -sf service %{buildroot}%{_sbindir}/rc%{name}-daemon
%suse_update_desktop_file -r %{name} Settings HardwareSettings

%service_add_pre %{name}-daemon.service

%service_add_post %{name}-daemon.service

%service_del_preun %{name}-daemon.service

%service_del_postun %{name}-daemon.service

%license LICENSE

openSUSE Build Service is sponsored by