File libayatana-common.spec of Package libayatana-common
#
# spec file for package libayatana-common
#
# 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/
#
%define common_name ayatana-indicator-common
%define lname %{name}0
%define soname %{name}
%define sover 0
%define typelib typelib-1_0-AyatanaCommon-0_1
Name: libayatana-common
Version: 0.9.11
Release: 0
Summary: Common files and libraries used by Ayatana System Indicators
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: cmake
BuildRequires: ayatana-cmake-modules
BuildRequires: fdupes
BuildRequires: libtool
BuildRequires: gcc-c++
BuildRequires: intltool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(systemd)
BuildRequires: vala
Requires: zenity
%glib2_gsettings_schema_requires
%systemd_requires
%description
This package contains common files used by Ayatana system
indicators.
%package -n %{common_name}
Summary: Common files used by Ayatana System Indicators
BuildArch: noarch
Recommends: %{common_name}-lang
%description -n %{common_name}
This package contains common files used by Ayatana system
indicators.
%lang_package -n %{common_name}
%package -n %{lname}
Summary: Shared library providing common API functions used by Ayatana System Indicators
Group: System/Libraries
%description -n %{lname}
Shared library providing common API functions used by Ayatana
system indicators.
This package contains shared libraries.
%package -n %{typelib}
Summary: Ayatana Indicator Common typelib
Group: System/Libraries
Requires: %{common_name} = %{version}
%description -n %{typelib}
Shared library providing common API functions used by Ayatana
system indicators.
This package provides the GObject Introspection bindings.
%package devel
Summary: Development files for Ayatana Indicator Common
Group: Development/Libraries/C and C++
Requires: %{lname} = %{version}
Requires: %{typelib} = %{version}
Requires: pkgconfig(gobject-introspection-1.0)
%description devel
Shared library providing common API functions used by Ayatana
system indicators.
This package contains the development files.
%prep
%autosetup -p1
%build
%cmake \
%if 0%{?sle_version} <= 150200
-DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \
%endif
-Denable_tests=Off
%cmake_build
%install
%cmake_install
# Create empty directory for owning within this package.
install -d -m 755 %{buildroot}%{_datadir}/ayatana/indicators
%fdupes %{buildroot}
%find_lang ayatana-common
%post -n %{common_name}
%systemd_user_post ayatana-indicators.target
%preun -n %{common_name}
%systemd_user_preun ayatana-indicators.target
%postun -n %{common_name}
%systemd_user_postun ayatana-indicators.target
%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%files -n %{common_name}
%license COPYING
%doc NEWS README.md
%dir %{_datadir}/ayatana
%dir %{_datadir}/ayatana/indicators
%{_datadir}/glib-2.0/schemas/org.ayatana.common.gschema.xml
%{_userunitdir}/ayatana-indicators.target
%files -n %{lname}
%license COPYING
%{_libdir}/%{soname}.so.%{sover}*
%files -n %{typelib}
%{_libdir}/girepository-1.0/AyatanaCommon-0.1.typelib
%files devel
%license COPYING
%doc AUTHORS ChangeLog
%dir %{_includedir}/ayatana
%dir %{_includedir}/ayatana/common
%{_includedir}/ayatana/common/
%{_libdir}/%{soname}.so
%{_libdir}/%{soname}.so.%{sover}
%{_libdir}/pkgconfig/%{soname}.pc
%{_datadir}/gir-1.0/AyatanaCommon-0.1.gir
%dir %{_datadir}/vala/vapi/
%{_datadir}/vala/vapi/AyatanaCommon.vapi
%files -n %{common_name}-lang -f ayatana-common.lang
%changelog