%define major_ver 1.20
%define ver %{major_ver}.0
%define rel 1

Summary:        MATE User Guide
Summary(ja):    MATE ユーザガイド
Name:           mate-user-guide
Version:        %{ver}
Release:        %{rel}%{?_dist_release}
License:        GFDLv1.1
Source:         http://pub.mate-desktop.org/releases/%{major_ver}/%{name}-%{version}.tar.xz
Group:          Applications/Documentation

# Vine patch
Patch1000: 		mate-user-guide-1.10.0-desktop.patch

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

BuildRequires:  glib2-devel
BuildRequires:  yelp-tools
Requires:  yelp
Requires(postun,posttrans):  glib2

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi, iwaim

%description
This package contains end user documentation for the MATE desktop 
environment.

%description -l ja
このパッケージには MATE デスクトップ環境のエンドユーザドキュメントが
含まれています。


%prep
%setup -q
%patch1000 -p1 -b .vine


%build
autoreconf -if
%configure 
%__make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

%find_lang %{name}

%clean 
rm -rf $RPM_BUILD_ROOT


%postun
if [ $1 -eq 0 ]; then
  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)
%{_datadir}/applications/mate-user-guide.desktop
%{_datadir}/help/*/%{name}


%changelog
* Sun May 20 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.20.0-1
- update to 1.20.0

* Sat Apr  8 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 1.18.0-1
- update to 1.18.0

* Sun Nov 27 2016 IWAI, Masaharu <iwaim.sub@gmail.com> 1.16.0-1
- new upstream release
- update License
- update Packager

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

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

* Sat Jun 13 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-1
- new upstream release
- add Patch1000 (mate-user-guide-1.10.0-desktop.patch)

* Sun Jun 07 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.9.0-1
- initial build
