File ayatana-indicator-power.spec of Package ayatana-indicator-power
#
# spec file for package ayatana-indicator-power
#
# Copyright (c) 2022-2023 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 http://bugs.opensuse.org/
#
Name: ayatana-indicator-power
Version: 24.5.1
Release: 0
Summary: Ayatana Indicator showing power state
License: GPL-3.0-only
Group: System/GUI/Other
URL: https://github.com/AyatanaIndicators/ayatana-indicator-power
Source0: https://github.com/AyatanaIndicators/ayatana-indicator-power/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: ayatana-cmake-modules
BuildRequires: gcc-c++
# For tests, which are disabled for now. Maybe package that correctly later.
#BuildRequires: gcovr
#BuildRequires: lcov
BuildRequires: intltool
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig
# In case we want to use deviceinfo.
#BuildRequires: pkgconfig)deviceinfo)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libayatana-common) >= 0.9.1
BuildRequires: pkgconfig(libnotify) >= 0.7.6
BuildRequires: pkgconfig(rda) >= 0.0.5
BuildRequires: pkgconfig(systemd)
# For directory owning.
BuildRequires: ayatana-indicator-common
Requires: ayatana-indicator-common
Requires: upower
Requires: (gnome-settings-daemon or mate-settings-daemon or xfce4-settings)
Recommends: (mate-indicator-applet or xfce4-indicator-plugin or ayatana-indicator-renderer)
Recommends: %{name}-lang
Suggests: (gnome-control-center or mate-control-center or xfce4-settings)
Suggests: (mate-power-manager or xfce4-power-manager or gnome-power-manager)
Suggests: ayatana-ido >= 0.10.0
%glib2_gsettings_schema_requires
%systemd_requires
%description
This Ayatana Indicator displays current power management
information and gives the user a way to access power management
preferences.
The Ayatana Indicator provides a generic, multi-desktop-env aware
approach of accessing power information and management features.
%lang_package
%prep
%autosetup -p1
%build
%cmake \
%if 0%{?sle_version} <= 150200
-DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \
%endif
-DENABLE_TESTS=OFF \
-DENABLE_WERROR=OFF \
-DENABLE_RDA=ON \
-DENABLE_DEVICEINFO=OFF
%cmake_build
%install
%cmake_install
%find_lang %{name}
%post
%systemd_user_post %{name}.service
%preun
%systemd_user_preun %{name}.service
%postun
%systemd_user_postun %{name}.service
%files
%license COPYING
%doc AUTHORS NEWS README.md
%config %{_sysconfdir}/xdg/autostart/%{name}.desktop
%{_libexecdir}/%{name}/
%{_datadir}/glib-2.0/schemas/org.ayatana.indicator.power.gschema.xml
%{_datadir}/ayatana/indicators/org.ayatana.indicator.power
%{_userunitdir}/%{name}.service
%files lang -f %{name}.lang
%changelog