forked from pool/power-profiles-daemon
Atri Bhattacharya
3a5bc57fa7
- Pass explicit systemdsystemunitdir=%{_unitdir} to meson, ensure we have the correct systemd unitdir. - Drop systemd and systemd-rpm-macros BuildRequires, not needed. - Add check section and run meson_test macro, replace umockdev with pkgconfig(umockdev-1.0) BuildRequires. - Add generic c_compiler BuildRequires as meson checks for it. - Add upstream patches: + c9b646025d9f155509a6cda1c292bfd120daeb9e.patch: platform-profile: Add support for 'quiet' profile. + 20a2d7f7b80a1847f36236d40388f14ae99fa94b.patch: tests: Add tests for quiet profile support. OBS-URL: https://build.opensuse.org/request/show/921427 OBS-URL: https://build.opensuse.org/package/show/Base:System/power-profiles-daemon?expand=0&rev=2
99 lines
2.9 KiB
RPMSpec
99 lines
2.9 KiB
RPMSpec
#
|
|
# spec file for package power-profiles-daemon
|
|
#
|
|
# 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: power-profiles-daemon
|
|
Version: 0.9.0
|
|
Release: 0
|
|
Summary: Power profiles handling over D-Bus
|
|
License: GPL-3.0-or-later
|
|
URL: https://gitlab.freedesktop.org/hadess/power-profiles-daemon
|
|
Source: %{url}/-/archive/%{version}/%{name}-%{version}.tar.bz2
|
|
# PATCH-FIX-UPSTREAM c9b646025d9f155509a6cda1c292bfd120daeb9e.patch -- platform-profile: Add support for 'quiet' profile
|
|
Patch1: https://gitlab.freedesktop.org/hadess/power-profiles-daemon/-/commit/c9b646025d9f155509a6cda1c292bfd120daeb9e.patch
|
|
# PATCH-FIX-UPSTREAM 20a2d7f7b80a1847f36236d40388f14ae99fa94b.patch -- tests: Add tests for quiet profile support
|
|
Patch2: https://gitlab.freedesktop.org/hadess/power-profiles-daemon/-/commit/20a2d7f7b80a1847f36236d40388f14ae99fa94b.patch
|
|
|
|
BuildRequires: c_compiler
|
|
BuildRequires: gtk-doc
|
|
BuildRequires: meson
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: python3-dbusmock
|
|
BuildRequires: pkgconfig(gio-2.0)
|
|
BuildRequires: pkgconfig(gudev-1.0)
|
|
BuildRequires: pkgconfig(systemd)
|
|
BuildRequires: pkgconfig(udev)
|
|
BuildRequires: pkgconfig(umockdev-1.0)
|
|
BuildRequires: pkgconfig(upower-glib)
|
|
|
|
%description
|
|
power-profiles-daemon offers to modify system behaviour based upon user-selected
|
|
power profiles. There are 3 different power profiles: a "balanced" default mode,
|
|
a "power-saver" mode, and a "performance" mode.
|
|
|
|
%package doc
|
|
Summary: Documentation for power-profiles-daemon
|
|
BuildArch: noarch
|
|
|
|
%description doc
|
|
This package provides documentation for %{name}.
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
|
|
%build
|
|
%meson \
|
|
-Dsystemdsystemunitdir=%{_unitdir} \
|
|
-Dgtk_doc=true \
|
|
%{nil}
|
|
%meson_build
|
|
|
|
%install
|
|
%meson_install
|
|
|
|
%check
|
|
%meson_test
|
|
|
|
%pre
|
|
%service_add_pre %{name}.service
|
|
|
|
%post
|
|
%service_add_post %{name}.service
|
|
|
|
%preun
|
|
%service_del_preun %{name}.service
|
|
|
|
%postun
|
|
%service_del_postun %{name}.service
|
|
|
|
%files
|
|
%license COPYING
|
|
%doc README.md
|
|
%{_bindir}/powerprofilesctl
|
|
%{_libexecdir}/%{name}
|
|
%{_unitdir}/%{name}.service
|
|
%config %{_sysconfdir}/dbus-1/system.d/net.hadess.PowerProfiles.conf
|
|
%{_datadir}/dbus-1/system-services/net.hadess.PowerProfiles.service
|
|
%ghost %dir %{_localstatedir}/lib/%{name}
|
|
|
|
%files doc
|
|
%dir %{_datadir}/gtk-doc/
|
|
%dir %{_datadir}/gtk-doc/html/
|
|
%{_datadir}/gtk-doc/html/%{name}/
|
|
|
|
%changelog
|