File hfd-service.spec of Package hfd-service
#
# spec file for package hfd-service
#
# Copyright (c) 2021 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 https://bugs.opensuse.org/
#
Name: hfd-service
Version: 0.0.1.20211002
Release: 0
Summary: Human Feedback Device Service
License: GPL-3.0-only AND LGPL-3.0-only
URL: https://github.com/ubports/hfd-service
Source0: hfd-service-%{version}.tar.xz
Source1: hfd-service.service
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: fdupes
BuildRequires: pkgconfig(libudev)
BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5DBus)
BuildRequires: cmake(Qt5Feedback)
BuildRequires: cmake(Qt5Gui)
BuildRequires: lomiri-cmake-extras-QmlPlugins
%systemd_requires
%description
Human feedback device service is a D-Bus activated
service that manages human feedback devices such as
leds and vibrators on mobile devices.
%package tools
Summary: Human Feedback Device Service Tools
Requires: %{name}
%description tools
Tools to detect and configure devices.
%package qml-module
Requires: %{name}
Summary: Human Feedback Device Service QML Module
%description qml-module
Library to detect and configure devices.
%package qt5feedback
Requires: %{name}
Summary: Human Feedback Device Service Qt Feedback Plugin
%description qt5feedback
Qt5Feedback plugin to detect and configure devices.
%prep
%setup -q -n hfd-service-%{version}/
%build
%cmake -DENABLE_LIBHYBRIS=OFF
%cmake_build
%install
%cmake_install
%fdupes %{buildroot}%{_prefix}
%{__rm} -rf %{buildroot}/etc/init/
%{__install} -m 0644 -D -t %{buildroot}%{_unitdir} %{SOURCE1}
%pre
%service_add_pre hfd-service.service
%post
%service_add_post hfd-service.service
%preun
%service_del_preun hfd-service.service
%postun
%service_del_postun hfd-service.service
%files
%defattr(0644,root,root,0755)
%license debian/copyright
%config %{_sysconfdir}/dbus-1/system.d/com.lomiri.hfd.conf
%attr(0744,-,-) %{_bindir}/hfd-service
%{_unitdir}/hfd-service.service
%{_datadir}/dbus-1/system-services/com.lomiri.hfd.service
%files tools
%defattr(0744,root,root,0755)
%{_bindir}/hfd-service-tools-leds
%{_bindir}/hfd-service-tools-vibrator
%files qt5feedback
%defattr(0755,root,root,0755)
%dir %{_libdir}/qt5/plugins/feedback/
%{_libdir}/qt5/plugins/feedback/libqtfeedback_hfd.so
%files qml-module
%defattr(0644,root,root,0755)
%dir %{_libdir}/qt5/qml/Hfd
%attr(0755,-,-) %{_libdir}/qt5/qml/Hfd/libhfd-qml.so
%{_libdir}/qt5/qml/Hfd/qmldir
%changelog