File ayatana-indicator-display.spec of Package ayatana-indicator-display

#
# spec file for package ayatana-indicator-display
#
# Copyright (c) 2022-2025 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-display
Version:        24.5.2
Release:        0
Summary:        Ayatana Indicator for Display configuration
License:        GPL-3.0-only
Group:          System/GUI/Other
URL:            https://github.com/AyatanaIndicators/%{name}
Source0:        https://github.com/AyatanaIndicators/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        %{name}-rpmlintrc
BuildRequires:  ayatana-cmake-modules
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
# For coverage, which is disabled for now. Maybe package that correctly later.
#BuildRequires: gcovr
#BuildRequires: lcov

BuildRequires:  intltool
BuildRequires:  systemd-rpm-macros
BuildRequires:  fdupes
BuildRequires:  pkgconfig
# For tests.
# Maybe needed for tests later on, but currently definitely not.
#BuildRequires: pkgconfig(dbustest-1) >= 14.04.0
#BuildRequires: (pkgconfig(gtest) or pkgconfig(gmock))
#BuildRequires: cppcheck
BuildRequires:  pkgconfig(accountsservice)
BuildRequires:  pkgconfig(libayatana-common) >= 0.9.3
BuildRequires:  pkgconfig(libgeoclue-2.0)
BuildRequires:  pkgconfig(gio-2.0) >= 2.38
BuildRequires:  pkgconfig(glib-2.0) >= 2.38
BuildRequires:  pkgconfig(gudev-1.0)
BuildRequires:  pkgconfig(properties-cpp) >= 0.0.1
BuildRequires:  pkgconfig(rda)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(systemd)
# For directory owning.
BuildRequires:  ayatana-indicator-common
# Change this to something Lomiri-specific once we want to support that, if
# ever.
#Requires:      gsettings-ubuntu-schemas
Requires:       xsct >= 1.9
Recommends:     %{name}-lang
%glib2_gsettings_schema_requires
%systemd_requires

%description
This Ayatana Indicator is designed to be placed on the right side
of a panel and give the user easy control for changing their
display settings.

%lang_package

%prep
%autosetup -p1

%build
%cmake \
%if 0%{?sle_version} <= 150200
  -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \
%endif
  -DENABLE_COLOR_TEMP=ON \
  -DENABLE_LOMIRI_FEATURES=OFF \
  -Denable_tests=OFF
%cmake_build

%install
%cmake_install

find %{buildroot} -type 'f' -name '*.la' -delete -print

%fdupes %{buildroot}

%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 INSTALL.md NEWS README README.md
%config %{_sysconfdir}/xdg/autostart/%{name}.desktop
%{_libexecdir}/%{name}/
%{_datadir}/glib-2.0/schemas/org.ayatana.indicator.display.gschema.xml
%{_datadir}/ayatana/indicators/org.ayatana.indicator.display
%{_datadir}/icons/hicolor/scalable/status/ayatana*.svg
%dir %{_datadir}/accountsservice
%dir %{_datadir}/accountsservice/interfaces
%{_datadir}/accountsservice/interfaces/org.ayatana.indicator.display.AccountsService.xml
%{_datadir}/dbus-1/interfaces/org.ayatana.indicator.display.AccountsService.xml
%{_datadir}/polkit-1/actions/org.ayatana.indicator.display.AccountsService.policy
%{_datadir}/polkit-1/rules.d/50-org.ayatana.indicator.display.AccountsService.rules
%{_userunitdir}/%{name}.service

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by