1 Summary: Linux devices manager for the Logitech Unifying Receiver
6 Group: Applications/System
7 Source0: https://github.com/pwr/Solaar/archive/%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5: 0b8ba34ae8968a6f4f17d9311f5e54b6
9 URL: http://pwr.github.io/Solaar/
10 BuildRequires: python3-dbus
11 BuildRequires: python3-distribute
12 BuildRequires: python3-modules
13 BuildRequires: python3-pygobject3
14 BuildRequires: python3-pyudev
15 BuildRequires: python3-setuptools
16 BuildRequires: rpm-pythonprov
17 BuildRequires: rpmbuild(macros) >= 2.000
18 Requires: python3-dbus
19 Requires: python3-modules
20 Requires: python3-pygobject3
21 Requires: python3-pyudev
22 Requires(post,postun): gtk-update-icon-cache
23 Requires(post,postun): hicolor-icon-theme
24 Provides: %{name}-gui = %{version}
25 Obsoletes: solaar-gui < %{version}
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Solaar is a Linux device manager for Logitech's Unifying Receiver
31 peripherals. It is able to pair/unpair devices to the receiver, and
32 for most devices read battery status.
34 It comes in two flavors, command-line and GUI. Both are able to list
35 the devices paired to a Unifying Receiver, show detailed info for each
36 device, and also pair/unpair supported devices with the receiver.
39 %setup -q -n Solaar-%{version}
42 %{__python3} setup.py build
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT
50 %{__python3} setup.py \
51 install --skip-build \
53 --root=$RPM_BUILD_ROOT
54 %{__mv} $RPM_BUILD_ROOT%{_prefix}/local/* $RPM_BUILD_ROOT%{_prefix}/
55 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/local
56 cd $RPM_BUILD_ROOT%{_bindir}
57 ln -s %{name} %{name}-cli
58 install -d 0755 $RPM_BUILD_ROOT/lib/udev/rules.d
59 %{__cp} $RPM_BUILD_ROOT%{_datadir}/solaar/udev-rules.d/42-logitech-unify-permissions.rules $RPM_BUILD_ROOT/lib/udev/rules.d/
62 rm -rf $RPM_BUILD_ROOT
65 %update_icon_cache hicolor
68 # This is needed to apply permissions to existing devices when the package is installed.
69 /bin/udevadm trigger --subsystem-match=hidraw --action=add
72 %update_icon_cache hicolor
75 %defattr(644,root,root,755)
77 %attr(755,root,root) %{_bindir}/solaar
78 %attr(755,root,root) %{_bindir}/solaar-cli
79 %dir %{py3_sitedir}/hidapi
80 %{py3_sitedir}/hidapi/*.py
81 %dir %{py3_sitedir}/hidapi/__pycache__
82 %{py3_sitedir}/hidapi/__pycache__/*.pyc
83 %dir %{py3_sitedir}/logitech_receiver
84 %{py3_sitedir}/logitech_receiver/*.py
85 %dir %{py3_sitedir}/logitech_receiver/__pycache__
86 %{py3_sitedir}/logitech_receiver/__pycache__/*.pyc
87 %dir %{py3_sitedir}/solaar
88 %{py3_sitedir}/solaar/*.py
89 %dir %{py3_sitedir}/solaar/__pycache__
90 %{py3_sitedir}/solaar/__pycache__/*.pyc
91 %dir %{py3_sitedir}/solaar/cli
92 %{py3_sitedir}/solaar/cli/*.py
93 %dir %{py3_sitedir}/solaar/cli/__pycache__
94 %{py3_sitedir}/solaar/cli/__pycache__/*.pyc
95 %dir %{py3_sitedir}/solaar/ui
96 %{py3_sitedir}/solaar/ui/*.py
97 %dir %{py3_sitedir}/solaar/ui/__pycache__
98 %{py3_sitedir}/solaar/ui/__pycache__/*.pyc
99 %{py3_sitedir}/solaar-%{version}-py%{py3_ver}.egg-info
101 %{_desktopdir}/solaar.desktop
102 %{_iconsdir}/hicolor/scalable/apps/solaar.svg
103 %{_datadir}/metainfo/io.github.pwr_solaar.solaar.metainfo.xml
104 %{_localedir}/*/LC_MESSAGES/%{name}.mo
105 /lib/udev/rules.d/42-logitech-unify-permissions.rules