File ayatana-indicator-keyboard.spec of Package ayatana-indicator-keyboard
#
# spec file for package ayatana-indicator-keyboard
#
# Copyright (c) 2018-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/
#
%define libbasename libayatana-keyboard
# Technically this should be basename-x110, but that would look very weird.
%define backendx11name %{libbasename}-x11-0
# Unused, but keep for later.
%define backendlomiriname %{libbasename}-lomiri0
Name: ayatana-indicator-keyboard
Version: 24.7.2
Release: 0
Summary: Ayatana Indicator Keyboard Applet
License: GPL-3.0-only
Group: System/GUI/Other
URL: https://github.com/AyatanaIndicators/ayatana-indicator-keyboard
Source0: https://github.com/AyatanaIndicators/ayatana-indicator-keyboard/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}-rpmlintrc
BuildRequires: cmake
BuildRequires: ayatana-cmake-modules
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: intltool
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig
BuildRequires: pkgconfig(accountsservice)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libayatana-common) >= 0.9.9
BuildRequires: pkgconfig(libxklavier) >= 5.3
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(x11) >= 1.6.5
BuildRequires: pkgconfig(xkbcommon) >= 1.0.3
BuildRequires: pkgconfig(xkbregistry) >= 1.0.3
# For directory owning.
BuildRequires: ayatana-indicator-common
BuildRequires: mate-themes
Requires: ayatana-indicator-common
Requires: mate-themes
Recommends: %{backendx11name} = %{version}
Recommends: %{name}-lang
%glib2_gsettings_schema_requires
%systemd_requires
%description
This package contains the keyboard indicator, which should show
as an icon in the top panel of indicator aware desktop
environments.
It can be used to switch key layouts or languages, and helps the
user identifying which layouts are currently in use.
%lang_package
%package -n %{backendx11name}
Summary: Ayatana keyboard indicator X11 backend library
Group: System/Libraries
Requires: %{name} = %{version}
%description -n %{backendx11name}
This package contains the X11 backend library for the Ayatana
Keyboard Indicator.
%package -n %{backendx11name}-devel
Summary: Development files for the Ayatana keyboard indicator X11 backend library
Group: Development/Libraries/Other
Requires: %{backendx11name} = %{version}
%description -n %{backendx11name}-devel
This package provides the development files required to build
based on the X11 backend for the Ayatana Keyboard Indicator.
%prep
%autosetup -p1
%build
%cmake \
%if 0%{?sle_version} <= 150200
-DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \
%endif
-DENABLE_WERROR=OFF
%cmake_build
%install
%cmake_install
# Remove libraries targeting lomiri (Ubuntu Touch) for now. We can always
# re-enable it.
rm -r "%{buildroot}%{_libdir}/"libayatana-keyboard-lomiri.so*
%find_lang %{name}
%post
%systemd_user_post %{name}.service
%preun
%systemd_user_preun %{name}.service
%postun
%systemd_user_postun %{name}.service
%post -n %{backendx11name} -p /sbin/ldconfig
%postun -n %{backendx11name} -p /sbin/ldconfig
%files
%license COPYING
%doc AUTHORS NEWS README.md
%config %{_sysconfdir}/xdg/autostart/%{name}.desktop
%dir %{_datadir}/accountsservice/
%dir %{_datadir}/accountsservice/interfaces/
%{_datadir}/accountsservice/interfaces/org.ayatana.indicator.keyboard.AccountsService.xml
%{_datadir}/dbus-1/interfaces/org.ayatana.indicator.keyboard.AccountsService.xml
%{_datadir}/glib-2.0/schemas/org.ayatana.indicator.keyboard.gschema.xml
%{_datadir}/polkit-1/actions/org.ayatana.indicator.keyboard.AccountsService.policy
%{_datadir}/polkit-1/rules.d/50-org.ayatana.indicator.keyboard.AccountsService.rules
%{_libexecdir}/%{name}/
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/icons/ContrastHigh/*/*/*
%{_datadir}/ayatana/indicators/org.ayatana.indicator.keyboard
%{_userunitdir}/%{name}.service
%files -n %{backendx11name}
%license COPYING
%{_libdir}/libayatana-keyboard-x11.so.0*
%files -n %{backendx11name}-devel
%license COPYING
%{_libdir}/libayatana-keyboard-x11.so
%files lang -f %{name}.lang
%changelog