/[packages]/cauldron/ckb-next/current/SPECS/ckb-next.spec
ViewVC logotype

Annotation of /cauldron/ckb-next/current/SPECS/ckb-next.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1469196 - (hide annotations) (download)
Fri Dec 20 20:34:24 2019 UTC (4 years, 4 months ago) by julien
File size: 4815 byte(s)
imported package ckb-next
1 julien 1469196 # Mageia RPM Spec
2     %undefine _debugsource_packages
3    
4     Name: ckb-next
5     Version: 0.3.2
6     Release: 8.189
7     Summary: Corsair RGB keyboard driver for Linux and OS X
8     Group: Applications/System
9     License: GPLv2
10     URL: https://github.com/ckb-next/ckb-next
11     Source0: https://github.com/ckb-next/ckb-next/archive/v%{version}.tar.gz#/ckb-next-%{version}.tar.gz
12    
13     # Upstream provides none of the following files
14     Source1: ckb-next.appdata.xml
15     Source2: ckb-next.1
16     Source3: 99-ckb-next.preset
17    
18     BuildRequires: cmake
19     BuildRequires: cmake(Qt5Core) >= 5.3
20     BuildRequires: cmake(Qt5Gui) >= 5.3
21     BuildRequires: cmake(Qt5Network) >= 5.3
22     BuildRequires: cmake(Qt5Widgets) >= 5.3
23     BuildRequires: quazip-devel
24     BuildRequires: openssl-devel
25     BuildRequires: libgudev-devel
26     BuildRequires: libappindicator-devel
27     BuildRequires: systemd-devel
28     BuildRequires: pulseaudio-devel
29     BuildRequires: zlib-devel
30     BuildRequires: desktop-file-utils
31     BuildRequires: appstream-util
32     BuildRequires: ImageMagick
33     %{?systemd_requires}
34    
35     Requires: qt5ct
36     Obsoletes: ckb
37    
38     %description
39     ckb-next is an open-source driver for Corsair keyboards and mice. It aims to
40     bring the features of their proprietary CUE software to the Linux and Mac
41     operating systems. This project is currently a work in progress, but it already
42     supports much of the same functionality, including full RGB animations.
43    
44     %prep
45     %setup -q -n ckb-next-%{version}
46     # Fedora uses /usr/libexec for daemons
47     sed -e '/^ExecStart/cExecStart=%{_libexecdir}/ckb-next-daemon' -i linux/systemd/ckb-next-daemon.service.in
48    
49     %build
50     %cmake -DCMAKE_BUILD_TYPE=Release -DSAFE_INSTALL=OFF -DSAFE_UNINSTALL=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBEXECDIR=libexec -DDISABLE_UPDATER=1
51     #cd build
52     %make_build
53     #cd ..
54    
55     # Color freeze fix
56     sed -e '/^Exec=/cExec=env QT_QPA_PLATFORMTHEME=qt5ct /usr/bin/ckb-next' -i src/gui/ckb-next.desktop
57    
58     %install
59     install -m 644 -D linux/udev/99-ckb-daemon.rules %{buildroot}%{_udevrulesdir}/99-ckb-daemon.rules
60     install -D -m 755 build/bin/ckb-next %{buildroot}%{_bindir}/ckb-next
61     install -D -m 755 build/bin/ckb-next-daemon %{buildroot}%{_libexecdir}/ckb-next-daemon
62     install -d %{buildroot}%{_libexecdir}/ckb-next-animations
63     install -D -m 755 build/bin/gradient %{buildroot}%{_libexecdir}/ckb-next-animations/gradient
64     install -D -m 755 build/bin/heat %{buildroot}%{_libexecdir}/ckb-next-animations/heat
65     install -D -m 755 build/bin/mviz %{buildroot}%{_libexecdir}/ckb-next-animations/mviz
66     install -D -m 755 build/bin/pinwheel %{buildroot}%{_libexecdir}/ckb-next-animations/pinwheel
67     install -D -m 755 build/bin/rain %{buildroot}%{_libexecdir}/ckb-next-animations/rain
68     install -D -m 755 build/bin/random %{buildroot}%{_libexecdir}/ckb-next-animations/random
69     install -D -m 755 build/bin/ripple %{buildroot}%{_libexecdir}/ckb-next-animations/ripple
70     install -D -m 755 build/bin/wave %{buildroot}%{_libexecdir}/ckb-next-animations/wave
71     install -m 644 -D build/src/gui/ckb-next.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/ckb-next.png
72     install -Dpm 0644 %{SOURCE3} %{buildroot}/%{_presetdir}/99-ckb-next.preset
73     install -m 644 -D linux/systemd/ckb-next-daemon.service.in %{buildroot}%{_unitdir}/ckb-next-daemon.service
74     desktop-file-install --dir=%{buildroot}%{_datadir}/applications build/src/gui/ckb-next.desktop
75     install -Dpm 0644 \
76     %{SOURCE1} %{buildroot}%{_datadir}/appdata/ckb-next.appdata.xml
77     appstream-util \
78     validate-relax --nonet %{buildroot}%{_datadir}/appdata/ckb-next.appdata.xml
79     install -Dpm 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/ckb-next.1
80    
81     %post
82     %systemd_post ckb-next-daemon.service
83     if [ $1 -eq 1 ]; then
84     # starting daemon also at install
85     systemctl start ckb-next-daemon.service >/dev/null 2>&1 || :
86     touch --no-create %{_datadir}/icons/hicolor >&/dev/null || :
87     fi
88     udevadm control --reload-rules 2>&1 > /dev/null || :
89    
90     %preun
91     %systemd_preun ckb-next-daemon.service
92    
93     %postun
94     %systemd_postun_with_restart ckb-next-daemon.service
95     if [ $1 -eq 0 ]; then
96     touch --no-create %{_datadir}/icons/hicolor >&/dev/null || :
97     gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
98     fi
99     udevadm control --reload-rules 2>&1 > /dev/null || :
100    
101     %posttrans
102     gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
103    
104    
105     %files
106     %defattr(-,root,root)
107     %license LICENSE
108     %doc CHANGELOG.md FIRMWARE README.md
109     %{_udevrulesdir}/*.rules
110     %{_bindir}/ckb-next
111     %{_libexecdir}/ckb-next-daemon
112     %{_libexecdir}/ckb-next-animations
113     %{_unitdir}/ckb-next-daemon.service
114     %{_presetdir}/99-ckb-next.preset
115     %{_datadir}/applications/ckb-next.desktop
116     %{_datadir}/appdata/ckb-next.appdata.xml
117     %{_datadir}/icons/hicolor/*/apps/ckb-next.png
118     %{_mandir}/man1/ckb-next.1*
119    

  ViewVC Help
Powered by ViewVC 1.1.30