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

Summary:	A system monitor for MATE
Name:		mate-system-monitor
Version:	%{ver}
Release:	%{rel}%{?_dist_release}
Source0:	http://pub.mate-desktop.org/releases/%{major_ver}/%{name}-%{version}.tar.xz
License:	GPLv2
Group:		Applications/System
URL:		http://mate-desktop.org/

Patch0:		mate-system-monitor-1.6.0-glibmm.patch

BuildRequires:	mate-common
BuildRequires:	mate-icon-theme
BuildRequires:	gtk3-devel
BuildRequires:	libxml2-devel
BuildRequires:	libgtop2-devel
BuildRequires:	libwnck3-devel
BuildRequires:	librsvg2-devel
#BuildRequires:	dbus-glib-devel
BuildRequires:	gtkmm3-devel
BuildRequires:	glibmm-devel
BuildRequires:	itstool
BuildRequires:	gtk-doc
BuildRequires:	autoconf
BuildRequires:	automake

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

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

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


%description
View current processes and monitor system state


%prep
%setup -q
%patch0 -p1

%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi)
%configure \
	--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}
%dir %{_libexecdir}/mate-system-monitor
%{_libexecdir}/mate-system-monitor/msm-kill
%{_libexecdir}/mate-system-monitor/msm-renice
%{_datadir}/polkit-1/actions/org.mate.mate-system-monitor.policy
%{_datadir}/metainfo/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/glib-2.0/schemas/org.mate.system-monitor.enums.xml
%{_datadir}/glib-2.0/schemas/org.mate.system-monitor.gschema.xml
%{_datadir}/help/*
%{_datadir}/pixmaps/%{name}
%{_mandir}/man1/%{name}.1.gz


%changelog
* Thu May 16 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.20.2-1
- updated to 1.20.2.

* Mon Jan 22 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.18.1-1
- update to 1.18.1

* Sat Apr  8 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 1.18.0-1
- update to 1.18.0
- add msm-kill and msm-renice
- add polkit policy

* Sun Nov 27 2016 IWAI, Masaharu <iwaim.sub@gmail.com> 1.16.0-1
- new upstream release
- update GTK+ version
 - BR: gtk3-devel etc.
- update Package

* Mon Jul  4 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.12.2-2
- rebuilt with new toolchain.

* Tue Mar 29 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.1-1
- new upstream release

* Sat May 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-1
- new upstream release

* Sat May 17 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.0-2
- rebuild with libgtop2-2.30.0

* Wed Apr 16 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.0-1
- new upstream release
- change BuildRequires: libwnck-devel instead of libmatewnck-devel
- add BuildRequires: itstool

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

* Sun Sep 22 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-1
- new upstream release

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.0-1
- new upstream release
- remove BuildRequires: mate-conf-devel
- add Patch0 (mate-system-monitor-1.6.0-glibmm.patch)

* Thu Aug 02 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.0-1
- new upstream release
- remove Patch0 (mate-system-monitor-1.2.1-configure.patch)
- change BuildRequires: libmatewnck-devel instead of libwnck-devel

* Sat May 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.1-1
- new upstream release
- add Patch0 (mate-system-monitor-1.2.1-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

