Blame power-profiles-daemon.spec

7eea71a
%global forgeurl    https://gitlab.freedesktop.org/upower/%{name}
7eea71a
ba342be
Version:        0.21
7eea71a
%forgemeta
7eea71a
7eea71a
Name:           power-profiles-daemon
d6fff21
Release:        %autorelease
Bastien Nocera 57405b8
Summary:        Makes power profiles handling available over D-Bus
Bastien Nocera 57405b8
bb9a27a
License:        GPL-3.0-or-later
7eea71a
URL:            %{forgeurl}
7eea71a
Source0:        %{forgesource}
Bastien Nocera 57405b8
Bastien Nocera 57405b8
BuildRequires:  meson
Bastien Nocera 57405b8
BuildRequires:  gcc
Bastien Nocera 57405b8
BuildRequires:  gtk-doc
ba342be
BuildRequires:  argparse-manpage
ba342be
BuildRequires:  pkgconfig(bash-completion)
Bastien Nocera 57405b8
BuildRequires:  pkgconfig(gio-2.0)
Bastien Nocera 57405b8
BuildRequires:  pkgconfig(gudev-1.0)
Bastien Nocera 6caba22
BuildRequires:  pkgconfig(polkit-gobject-1)
7eea71a
BuildRequires:  pkgconfig(systemd)
7eea71a
BuildRequires:  pkgconfig(upower-glib)
ba342be
BuildRequires:  python3dist(shtab)
Bastien Nocera 57405b8
BuildRequires:  systemd-rpm-macros
Bastien Nocera 57405b8
7eea71a
# Test dependencies
7eea71a
BuildRequires:  umockdev
7eea71a
BuildRequires:  python3dist(python-dbusmock)
7eea71a
BuildRequires:  python3dist(pygobject)
7eea71a
f6921ff
# This is an implementation of the power-profiles-daemon service
f6921ff
Provides:       ppd-service
f6921ff
Conflicts:      ppd-service
f6921ff
Bastien Nocera 57405b8
%description
Bastien Nocera 57405b8
%{summary}.
Bastien Nocera 57405b8
Bastien Nocera 57405b8
%package docs
Bastien Nocera 57405b8
Summary:        Documentation for %{name}
Bastien Nocera 57405b8
BuildArch:      noarch
Bastien Nocera 57405b8
Bastien Nocera 57405b8
%description docs
Bastien Nocera 57405b8
This package contains the documentation for %{name}.
Bastien Nocera 57405b8
Bastien Nocera 57405b8
%prep
7eea71a
%forgeautosetup
Bastien Nocera 57405b8
Bastien Nocera 57405b8
%build
ba342be
%meson \
ba342be
    -Dgtk_doc=true \
ba342be
    -Dpylint=disabled \
ba342be
    -Dzshcomp=%{zsh_completions_dir} \
Bastien Nocera 57405b8
%meson_build
Bastien Nocera 57405b8
Bastien Nocera 57405b8
%install
Bastien Nocera 57405b8
%meson_install
7eea71a
mkdir -p %{buildroot}/%{_localstatedir}/lib/power-profiles-daemon
Bastien Nocera 57405b8
Bastien Nocera 57405b8
%check
Bastien Nocera 57405b8
%meson_test
Bastien Nocera 57405b8
Bastien Nocera 57405b8
%post
Bastien Nocera 57405b8
%systemd_post %{name}.service
Bastien Nocera 57405b8
Bastien Nocera 57405b8
%preun
Bastien Nocera 57405b8
%systemd_preun %{name}.service
Bastien Nocera 57405b8
Bastien Nocera 57405b8
%postun
Bastien Nocera 57405b8
%systemd_postun_with_restart %{name}.service
Bastien Nocera 57405b8
90c3c2b
%triggerpostun -- power-profiles-daemon < 0.10.1-2
90c3c2b
if [ $1 -gt 1 ] && [ -x /usr/bin/systemctl ] ; then
90c3c2b
    # Apply power-profiles-daemon.service preset on upgrades to F35 and F36 as
90c3c2b
    # the preset was changed to enabled in F35.
90c3c2b
    /usr/bin/systemctl --no-reload preset power-profiles-daemon.service || :
90c3c2b
fi
Bastien Nocera 8d368a3
Bastien Nocera 57405b8
%files
Bastien Nocera 57405b8
%license COPYING
Bastien Nocera 57405b8
%doc README.md
Bastien Nocera 59f7909
%{_bindir}/powerprofilesctl
Bastien Nocera 57405b8
%{_libexecdir}/%{name}
Bastien Nocera 57405b8
%{_unitdir}/%{name}.service
Bastien Nocera 6d5aabc
%{_datadir}/dbus-1/system.d/net.hadess.PowerProfiles.conf
e33f63c
%{_datadir}/dbus-1/system.d/org.freedesktop.UPower.PowerProfiles.conf
Bastien Nocera 57405b8
%{_datadir}/dbus-1/system-services/net.hadess.PowerProfiles.service
e33f63c
%{_datadir}/dbus-1/system-services/org.freedesktop.UPower.PowerProfiles.service
e33f63c
%{_datadir}/polkit-1/actions/power-profiles-daemon.policy
ba342be
%dir %{_localstatedir}/lib/power-profiles-daemon/
ba342be
%{_mandir}/man1/powerprofilesctl.1.gz
ba342be
%{bash_completions_dir}/powerprofilesctl
ba342be
%{zsh_completions_dir}/_powerprofilesctl
ba342be
Bastien Nocera 57405b8
Bastien Nocera 57405b8
%files docs
Bastien Nocera 57405b8
%dir %{_datadir}/gtk-doc/
Bastien Nocera 57405b8
%dir %{_datadir}/gtk-doc/html/
Bastien Nocera 57405b8
%{_datadir}/gtk-doc/html/%{name}/
Bastien Nocera 57405b8
Bastien Nocera 57405b8
%changelog
d6fff21
%autochangelog