File pluma.spec of Package pluma

%define url_ver %(echo %{version}|cut -d. -f1,2)

%global __provides_exclude_from %{_libdir}/%{name}/plugin.*\\.so

%define gi_major 1.0
%define girname  %mklibname %{name}-gir %{gi_major}

Summary: Small but powerful text editor for MATE
Name:    pluma
Version: 1.26.0
Release:    %mkrel 1
License: GPLv2+
Group:   Editors
URL:     https://mate-desktop.org/
Source0: https://pub.mate-desktop.org/releases/%{url_ver}/%{name}-%{version}.tar.xz

BuildRequires: iso-codes
BuildRequires: itstool
BuildRequires: mate-common >= %{url_ver}
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(iso-codes)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(libsoup-gnome-2.4)
BuildRequires: pkgconfig(enchant-2)
BuildRequires: yelp-tools
BuildRequires: pkgconfig(mate-desktop-2.0) >= %{url_ver}
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(gtksourceview-4)
BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(gthread-2.0)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(libpeas-1.0)
BuildRequires: pkgconfig(libpeas-gtk-1.0)
BuildRequires: pkgconfig(pygobject-3.0)
BuildRequires: pkgconfig(python3)
BuildRequires: autoconf-archive

# the run-command plugin uses zenity
Requires: zenity
Requires: caja-schemas
Requires: typelib(Peas)
Requires: typelib(PeasGtk)
Requires: mate-desktop-schemas >= %{url_ver}
Recommends: pluma-plugins

Provides: mate-text-editor = %{version}-%{release}

%description
Pluma is a small but powerful text editor designed expressly
for MATE.

It includes such features as split-screen mode, a plugin
API, which allows Pluma to be extended to support many
features while remaining small at its core, multiple
document editing through the use of a 'tabbed' notebook and
many more functions.

%package -n %{girname}
Summary:    GObject Introspection interface description for %{name}
Group:      System/Libraries
Requires:   %{name} = %{version}

%description -n %{girname}
GObject Introspection interface description for %{name}

%package devel
Group:      Development/C
Summary:    Headers for writing Pluma plugins

%description devel
Pluma is a small but powerful text editor designed expressly
for MATE.

It includes such features as split-screen mode, a plugin
API, which allows Pluma to be extended to support many
features while remaining small at its core, multiple
document editing through the use of a 'tabbed' notebook and
many more functions.

Install this if you want to build plugins that use Pluma's API.

%prep
%autosetup -p1

# switch to enchant2
sed -i 's/, enchant/, enchant-2/' configure.ac

%py3_shebang_fix plugins/externaltools/data/switch-c.tool.in

%build
autoreconf -vfi
%configure    \
    --disable-schemas-compile    \
    --enable-gtk-doc-html     \
    --enable-gvfs-metadata

%make_build

%install
%make_install

## clean up all the static libs for plugins
find %{buildroot} -name "*.la" -delete

%find_lang %{name} --with-gnome --all-name

%files  -f %{name}.lang
%doc README* AUTHORS
%license COPYING
%{_bindir}/pluma
%{_libdir}/pluma/
%{_libexecdir}/pluma/
%{_datadir}/applications/pluma.desktop
%{_datadir}/metainfo/pluma.appdata.xml
%{_datadir}/glib-2.0/schemas/org.mate.pluma.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.pluma.plugins.filebrowser.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.pluma.plugins.time.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.pluma.plugins.spell.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.pluma.plugins.pythonconsole.gschema.xml
%{_datadir}/pluma/
%{_mandir}/man1/pluma.1*

%files -n %{girname}
%{_libdir}/girepository-1.0/Pluma-%{gi_major}.typelib

%files devel
%doc %{_datadir}/gtk-doc/html/*
%{_includedir}/pluma/
%{_libdir}/pkgconfig/pluma.pc
%{_datadir}/gir-1.0/Pluma-%{gi_major}.gir

openSUSE Build Service is sponsored by