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

#
# spec file for package ayatana-indicator-messages
#
# Copyright (c) 2018-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/
#

%define libname libmessaging-menu
%define sover   0
Name:           ayatana-indicator-messages
Version:        24.5.0
Release:        0
Summary:        Ayatana Indicator for collecting messages that need a response
License:        GPL-3.0-only
Group:          System/GUI/Other
URL:            https://github.com/AyatanaIndicators/ayatana-indicator-messages
Source0:        https://github.com/AyatanaIndicators/ayatana-indicator-messages/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        %{name}-rpmlintrc
BuildRequires:  cmake
BuildRequires:  ayatana-cmake-modules
BuildRequires:  gcc-c++
BuildRequires:  gtk-doc
BuildRequires:  hicolor-icon-theme
# For tests, which are disabled for now. Maybe package that correctly later.
#BuildRequires: gcovr
#BuildRequires: lcov
BuildRequires:  intltool
BuildRequires:  systemd-rpm-macros
BuildRequires:  vala
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(accountsservice)
# Also tests.
#BuildRequires: pkgconfig(dbustest-1)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(systemd)
# For directory owning.
BuildRequires:  ayatana-indicator-common
Requires:       ayatana-indicator-common
Recommends:     %{name}-lang
Suggests:       ayatana-indicator-renderer
%glib2_gsettings_schema_requires
%systemd_requires

%description
A place on the user's desktop that collects messages that need a
response. This menu provides a condensed and collected view of all
of those messages for quick access, but without making them
annoying in times that you want to ignore them.

%lang_package

%package -n %{libname}%{sover}
Summary:        Shared library for providing status information to the messaging indicator
Group:          System/Libraries

%description -n %{libname}%{sover}
A place on the user's desktop that collects messages that need a
response. This menu provides a condensed and collected view of all
of those messages for quick access, but without making them
annoying in times that you want to ignore them.

%package -n %{libname}-devel
Summary:        Development files for Ayatana Messaging Menu
Group:          Development/Libraries/C and C++
Requires:       %{libname}%{sover} = %{version}
Suggests:       %{libname}-doc = %{version}

%description -n %{libname}-devel
A place on the user's desktop that collects messages that need a
response. This menu provides a condensed and collected view of all
of those messages for quick access, but without making them
annoying in times that you want to ignore them.

%package -n %{libname}-doc
Group: Documentation/HTML
Summary: HTML documentation for the Ayatana Messaging Indicator shared library

%description -n %{libname}-doc
This package installs documentation for the Ayatana Messaging
Indicator shared library.

%package -n typelib-1_0-MessagingMenu-1.0
Summary:        Ayatana Messaging indicators library
Group:          System/Libraries

%description -n typelib-1_0-MessagingMenu-1.0
This package contains the GObject Introspection bindings for the
Ayatana Messaging Menu library.

%prep
%autosetup -p1

%build
%cmake \
%if 0%{?sle_version} <= 150200
  -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \
%endif
  -Denable_tests=Off
%cmake_build

%install
%cmake_install
find %{buildroot} -type f -name "*.la" -delete -print

%find_lang %{name}

%post
%systemd_user_post %{name}.service

%preun
%systemd_user_preun %{name}.service

%postun
%systemd_user_postun %{name}.service

%post -n %{libname}%{sover} -p /sbin/ldconfig

%postun -n %{libname}%{sover} -p /sbin/ldconfig

%files
%license COPYING
%doc NEWS
%config %{_sysconfdir}/xdg/autostart/%{name}.desktop
%{_libexecdir}/%{name}/
%{_datadir}/ayatana/indicators/org.ayatana.indicator.messages
%{_datadir}/glib-2.0/schemas/org.ayatana.indicator.messages.gschema.xml
%{_datadir}/icons/hicolor/*/*/*
%{_userunitdir}/%{name}.service

%files lang -f %{name}.lang

%files -n %{libname}%{sover}
%{_libdir}/libmessaging-menu.so.%{sover}*

%files -n %{libname}-devel
%{_includedir}/messaging-menu/
%{_datadir}/gir-1.0/MessagingMenu-1.0.gir
%{_datadir}/vala/
%{_libdir}/libmessaging-menu.so
%{_libdir}/pkgconfig/messaging-menu.pc

%files -n %{libname}-doc
%dir %{_datadir}/gtk-doc/html/messaging-menu
%{_datadir}/gtk-doc/html/messaging-menu/*

%files -n typelib-1_0-MessagingMenu-1.0
%{_libdir}/girepository-1.0/MessagingMenu-1.0.typelib

%changelog
openSUSE Build Service is sponsored by