Summary: allow applications to export a menu into the Unity Menu bar
Name: libappindicator
Version: 12.10.0
Release: 2%{?_dist_release}
Group: system
Vendor: Project Vine
Distribution: Vine Linux
Packager: iwaim

License: LGPLv3
URL: https://launchpad.net/libappindicator
Source0: %{name}-%{version}.tar.gz
Patch0: 0001_Fix_mono_dir.patch
# https://bazaar.launchpad.net/~indicator-applet-developers/libappindicator/trunk.16.10/revision/285
Patch1: incompatible_pointer_build_fix.patch
Patch2: nopython.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires: gtk3-devel >= 2.91
BuildRequires: glib2-devel >= 2.26
BuildRequires: libindicator-devel >= 0.4.93

BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gtk-doc
BuildRequires:  vala
BuildRequires:  dbus-glib-devel
BuildRequires:  libdbusmenu-devel
BuildRequires:  libdbusmenu-gtk-devel
BuildRequires:  gobject-introspection-devel
BuildRequires:  gtk3-devel
BuildRequires:  libindicator-devel

%description
A library to allow applications to export a menu into the Unity Menu bar.
Based on KSNI it also works in KDE and will fallback to generic Systray
support if none of those are available.


%package devel
Summary: Header files and libraries for developing apps which will use %{name}
Group: programming
Requires: %{name} = %{version}-%{release}

%description devel
The %{name}-devel package contains the header files and libraries.


%debug_package


%prep
%setup -q
%patch0 -p1 -b .monodir
%patch1 -p1 -b .incompatible_pointer_build_fix
%patch2 -p1 -b .nopython

sed -i "s#gmcs#mcs#g" configure.ac
# fix for gtk-doc 1.26
sed -i 's/--nogtkinit//' docs/reference/Makefile.am
gtkdocize --copy
cp -f gtk-doc.make gtk-doc.local.make
autoreconf -vif


%build
%global _configure ./configure
export CFLAGS="%{optflags} $CFLAGS -Wno-deprecated-declarations -Wno-error"
%configure --with-gtk=3
make V=1


%install
rm -rf $RPM_BUILD_ROOT
%makeinstall

%__rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}3.{a,la}

%clean
rm -rf $RPM_BUILD_ROOT


%ldconfig_scriptlets


%files
%defattr(-,root,root,-)
%license COPYING
%doc AUTHORS ChangeLog NEWS README
%{_libdir}/girepository-1.0/AppIndicator3-0.1.typelib
%{_libdir}/%{name}3.so.*
%{_datadir}/gtk-doc/html/%{name}

%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}3-0.1
%{_libdir}/%{name}3.so
%{_libdir}/pkgconfig/appindicator3-0.1.pc
%{_datadir}/gir-1.0/AppIndicator3-0.1.gir
%dir %{_datadir}/vala
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/appindicator3-0.1.vapi
%{_datadir}/vala/vapi/appindicator3-0.1.deps


%changelog
* Fri Feb 26 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 12.10.0-2
- rebuilt with current environment.

* Sun May 20 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 12.10.0-1
- Initial build.
