%define api 2.0 %define major 2 # The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) %{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %if "%{_vendor}" == "openEuler" %undefine cmake_build %undefine cmake_install %endif %if 0%{!?cmake_build:1} %global cmake_flags -B build %define cmake_build %make_build -C build %endif %if 0%{!?cmake_install:1} %define cmake_install %make_install -C build %endif %define libname %mklibname ayatana-appindicator-glib %{major} %define girname %mklibname ayatanaappindicatorglib-gir %{api} %define devname %mklibname ayatana-appindicator-glib -d Name: libayatana-appindicator-glib Version: 2.0.1 Release: %mkrel 3 Summary: Ayatana Application Indicators Shared Library (GLib-2.0 reimplementation, 100% GTK-free, 100% dbusmenu-free) License: LGPLv2 AND LGPLv3 AND GPLv3 Group: System/Libraries URL: https://ayatanaindicators.github.io/ Source0: https://github.com/AyatanaIndicators/libayatana-appindicator-glib/archive/%{version}/%{name}-%{version}.tar.gz Patch0: 0001-Find-GObjectIntrospection.patch Patch1: 0001-Find-Vala.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: python3dist(gi-docgen) BuildRequires: git BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gobject-2.0) >= 2.8.3 BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(libvala-0.56) BuildRequires: (vapigen or vala-tools or %{_bindir}/vapigen) %description A library to allow applications to export a menu into an Application Indicators aware menu bar. Although based on SNI, this new GLib-only reimplementation uses Gio menus and actions (exported to org.gtk.Menus and org.gtk.Actions) instead of the old dbusmenu (formerly exported to com.canonical.dbusmenu). %package -n %{libname} Summary: Ayatana application indicators library for GTK+3 Group: System/Libraries %description -n %{libname} A library to allow applications to export a menu into the an Application Indicators aware menu bar. %package -n %{girname} Summary: GObject Introspection interface description for Ayatana Application Indicator Group: System/Libraries Requires: %{libname} = %{version}-%{release} %description -n %{girname} This package contains the GObject Introspection interface description for Ayatana Application Indicator3 and GTK+3. %package -n %{devname} Summary: Development package for %{name} Group: Development/C++ Requires: %{libname} = %{version}-%{release} Requires: %{girname} = %{version}-%{release} Provides: ayatana-appindicator-glib-devel = %{version}-%{release} %description -n %{devname} Development libraries and files for %{name}. %prep %autosetup -p1 -Sgit_am %build # gi-compile-repository for girepository-2.0, but older distros may have only # g-ir-compiler from girepository-1.0. command -v gi-compile-repository >/dev/null 2>&1 && compiler=gi-compile-repository || compiler=g-ir-compiler %cmake %{?cmake_flags} \ -DINTROSPECTION_SCANNER:FILE=%{_bindir}/g-ir-scanner \ -DINTROSPECTION_COMPILER:FILE=%{_bindir}/$compiler \ -DVAPI_GEN:FILE=%{_bindir}/vapigen %cmake_build %install %cmake_install # move docs mv %{buildroot}%{_docdir}/libayatana-appindicator-glib-dev/ %{buildroot}%{_docdir}/libayatana-appindicator-glib/ %files -n %{libname} %license COPYING* %doc README.md %{_libdir}/libayatana-appindicator-glib.so.%{major}{,.*} %files -n %{girname} %license COPYING* %doc README.md %{_libdir}/girepository-1.0/AyatanaAppIndicatorGlib-%{api}.typelib %files -n %{devname} %license COPYING* %doc README.md %doc %{_docdir}/libayatana-appindicator-glib/ %{_includedir}/libayatana-appindicator-glib/ %{_libdir}/libayatana-appindicator-glib.so %{_libdir}/pkgconfig/ayatana-appindicator-glib.pc %{_datadir}/gir-1.0/AyatanaAppIndicatorGlib-%{api}.gir %{_datadir}/vala/vapi/ayatana-appindicator-glib.{deps,vapi}