Summary:	An powerfull text editor for MATE
Name:		pluma
Version:	1.14.0
Release:	1%{?_dist_release}
Source0:	http://pub.mate-desktop.org/releases/1.14/%{name}-%{version}.tar.xz
License:	GPLv2
Group:		Applications/Editors
URL:		http://mate-desktop.org/

BuildRequires:	mate-common
BuildRequires:	mate-doc-utils
BuildRequires:	gtk2-devel
BuildRequires:	gtksourceview2-devel
BuildRequires:	mate-desktop-devel
BuildRequires:	libsoup-devel
BuildRequires:	enchant-devel
BuildRequires:	libSM-devel
BuildRequires:	iso-codes
BuildRequires:	itstool
BuildRequires:	gtk-doc
BuildRequires:	autoconf
BuildRequires:	automake

Requires(posttrans,postun):	glib2
Requires(post,postun):	desktop-file-utils

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

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

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi


%description
Pluma is part of MATE and uses the latest GTK+ and MATE libraries.
Complete MATE integration is featured, with support for Drag and Drop (DnD)
from Caja (the MATE file manager), the use of the MATE help system,
the MATE Virtual File System and the MATE print framework.


%package		devel
Summary:        Development tools for %{name}
Summary(ja):    %{name} の開発環境
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig
Obsoletes:		mate-text-editor < 1.8.0
Provides:		mate-text-editor = %{version}-%{release}

%description	devel
Header files and libraries for building a extension library for the
%{name}.


%package        docs
Summary:        Documentation for %{name}
Summary(ja):    %{name} 用のドキュメント
Group:          Documentation
Requires:       %{name} = %{version}-%{release}
BuildArch:      noarch
Obsoletes:		mate-file-manager-doc < 1.8.0
Provides:		mate-file-manager-doc = %{version}-%{release}

%description    docs
This package contains documentation for %{name}.


%prep
%setup -q


%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi)
%configure \
	--libexecdir=%{_libexecdir}/mate \
	--disable-static

%{__make} %{?_smp_mflags}


%install
%{__rm} -rf ${RPM_BUILD_ROOT}

%{__make} install DESTDIR=${RPM_BUILD_ROOT}

find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} \;
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;

%find_lang %{name}


%clean
%{__rm} -rf ${RPM_BUILD_ROOT}

%post
/sbin/ldconfig
update-desktop-database %{_datadir}/applications >& /dev/null ||:

%postun
/sbin/ldconfig
if [ $1 -eq 0 ]; then
  update-desktop-database %{_datadir}/applications >& /dev/null ||:
  glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
fi

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_bindir}/%{name}
%{_libdir}/%{name}/plugin-loaders/libcloader.so
%{_libdir}/%{name}/plugins
%{_libexecdir}/mate/%{name}/pluma-bugreport.sh
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/glib-2.0/schemas/org.mate.pluma.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.pluma.plugins.spell.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}/help/*
%{_datadir}/%{name}
%{_mandir}/man1/%{name}.1.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}
%{_libdir}/pkgconfig/%{name}.pc

%files docs
%defattr(-,root,root,-)
%{_datadir}/gtk-doc/html/%{name}


%changelog
* Sun May 08 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.14.0-1
- new upstream release

* Sat Feb 20 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.2-1
- new upstream release

* Tue Dec 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.1-1
- new upstream release

* Sat Nov 07 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.0-1
- new upstream release

* Sun Jul 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.2-1
- new upstream release

* Sat Jul 11 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.1-1
- new upstream release

* Sat May 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-1
- new upstream release
- add BuildRequires: mate-desktop-devel

* Sun May 11 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.1-1
- new upstream release

* Wed Apr 16 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.0-1
- new upstream release
- rename package
- add BuildRequires: itstool

* Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.0-2
- rebuild with VineSeed environment

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.0-1
- new upstream release

* Thu Aug 02 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.0-1
- new upstream release
- remove Patch0 (mate-text-editor-1.2.0-configure.patch)

* Sat May 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.0-1
- new upstream release
- add Patch0 (mate-text-editor-1.2.0-configure.patch)

* Fri Dec 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.0-2
- change category

* Fri Dec 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.0-1
- initial build for Vine Linux

