%bcond_with systemd

%define glib2_version 2.48.0
%define libgtop2_version 2.28.2
%define gtk3_version 3.20.0
%define glibmm_version 2.22.0
%define gtkmm3_version 3.0.0
%define libxml2_version 2.7.7
%define librsvg2_version 2.32.0
%define desktop_file_utils_version 0.10

Summary: Gnome system monitor
Summary(ja): GNOMEシステムモニタ
Name: gnome-system-monitor
Version: 40.1
Release: 1%{?_dist_release}%{?with_systemd:.systemd}
Group: desktop-gnome,accesories
Vendor: Project Vine
Distribution: Vine Linux

License: GPL
%global shortver %(echo %{version} | cut -d . -f 1)
Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/%{shortver}/%{name}-%{version}.tar.xz

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: dbus-glib-devel
BuildRequires: desktop-file-utils >= %{desktop_file_utils_version}
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: glibmm-devel >= %{glibmm_version}
BuildRequires: gnome-icon-theme
BuildRequires: gtk3-devel >= %{gtk3_version}
BuildRequires: gtkmm3-devel >= %{gtkmm3_version}
BuildRequires: libgtop2-devel >= %{libgtop2_version}
BuildRequires: libhandy-devel
BuildRequires: librsvg2-devel >= %{librsvg2_version}
BuildRequires: libxml2-devel >= %{libxml2_version}
BuildRequires: meson
BuildRequires: yelp-tools
%if %{with systemd}
BuildRequires: pkgconfig(libsystemd)
%endif
Requires:      hicolor-icon-theme
Obsoletes:     gtop

%description
gnome-system-monitor is a simple process and system monitor.

%description -l ja
GNOMEシステムモニタはプロセスとシステムのためのシンプルなモニタです．


%debug_package


%prep
%setup -q

%build
%meson \
%if %{with systemd}
	-Dsystemd=true
%else
	-Dsystemd=false
%endif

%meson_build


%install
rm -rf $RPM_BUILD_ROOT
%meson_install

%find_lang %{name} --with-gnome


%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-, root, root)
%{_bindir}/gnome-system-monitor
%{_datadir}/applications/*.desktop
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/%{name}
%{_datadir}/icons/hicolor/scalable/apps/*svg
%{_datadir}/icons/hicolor/symbolic/apps/*svg
%{_datadir}/metainfo/gnome-system-monitor.appdata.xml
%{_datadir}/polkit-1/actions/org.gnome.gnome-system-monitor.policy
%{_libexecdir}/%{name}


%changelog
* Thu May 13 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 40.1-1
- new upstream release.
- added systemd support (disabled as default).
- dropped scriptlets.

* Thu May 16 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.30.0-1
- new upstream release.

* Sun Jul 17 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.20.1-1
- new upstream release

* Fri Nov 13 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.2-1
- new upstream release

* Sun Nov 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.0.1-1
- new upstream release

* Sun Mar 29 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.0-1
- new upstream release

* Sun Oct 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.1-1
- new upstream release

* Sat May 17 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.2-1
- new upstream release

* Sun Apr 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.1-1
- new upstream release

* Sun Mar 30 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.0-1
- new upstream release

* Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.1-2
- rebuild with VineSeed environment

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.1-1
- new upstream release

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

* Sun Apr 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.0-1
- new upstream release

* Tue Oct 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-1
- new upstream release

* Sun Sep 30 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release
- change BuildRequires: yelp-tools instead of gnome-doc-utils

* Sun Apr 22 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.1-1
- new upstream release

* Sat Oct 22 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.1-1
- new upstream release

* Thu Sep 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.0-1
- new upstream release

* Sat Sep 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.90-1
- new upstream release

* Tue Aug 16 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.3-1
- new upstream release
- change BuildRequires: gtk3-devel instead of gtk2-devel
- change BuildRequires: libwnck3-devel instead of libwnck-devel
- change BuildRequires: gtkmm3-devel instead of gtkmm2-devel

* Tue Oct 05 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.28.2-1
- new upstream release

* Thu Apr 29 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.28.1-1
- new upstream release
- add BuildRequires: gnome-doc-utils >= 0.3.2

* Sun Nov 01 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.28.0-1
- new upstream release
- updated build dependency

* Sat Jul 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.2-1
- new upstream release

* Sat Apr 25 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.1-1
- new upstream release

* Mon Mar 23 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.0.1-1
- new upstream release

* Tue Oct 28 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.24.1-1
- new upstream release

* Fri Sep 26 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.24.0-1
- new upstream release

* Tue Apr 15 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.22.1-1vl5
- new upstream release

* Sun Apr 13 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.22.0-1vl5
- new upstream release
- added %%pre and %%preun section
- added BuildRequires: glibmm-devel, gtkmm2-devel

* Sat Mar  8 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.20.2-0vl1
- new upstream release

* Mon Dec 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.20.1-0vl1
- new upstream release

* Sat Jun  9 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.18.2-0vl1
- new upstream release
- rebuilt with new toolchain

* Sat Apr 28 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.18.1-0vl1
- new upstream release

* Mon Jun 26 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.4-0vl1
- new upstream release

* Sun Jun 04 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.3-0vl1
- new upstream release

* Fri Apr 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.1-0vl1
- new upstream release

* Tue Mar 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.0-0vl1
- new upstream release

* Tue Mar 07 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.13.92-0vl1
- new upstream release

* Tue Feb 14 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.12.2-0vl1
- new upstream release

* Sat Oct 08 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.12.1-0vl1
- new upstream release

* Mon Sep 19 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.12.0-0vl1
- new upstream release

* Sun Aug 21 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.11.91-0vl1
- new upstream release

* Mon Mar 21 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.10.0-0vl1
- new upstream version

* Sun Feb 27 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.8.3-0vl1
- new upstream release
- added gnome-vfs2 Requires
- run scrollkeeper-update at %post, %postun
- added Japanese summary, description

* Mon Nov 08 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.8.0-0vl1
- new upstream release
- s/Copyright/License/
- rebuild with libgtop2-2.8.1, libwnck-2.8.1

* Sun Jul 04 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.0-0vl2
- add Patch10 to support SMP system (from 2.6.0)
- add Patch11 to build with gtk+-2.4

* Thu Sep 11 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.0-0vl1
- new upstream release

* Thu Sep 04 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.3.1-0vl1
- new upstream release

* Sun May 18 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.3.0-0vl1
- new upstream release

* Thu Jan 16 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.4-0vl1
- new upstream release

* Thu Dec 26 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.3-0vl1
- new upstream release
- build for Vine Linux

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Sun Jun 16 2002 Havoc Pennington <hp@redhat.com>
- 2.0.0
- add a bunch of build requires
- put omf in file list
- fix location of desktop file
- use desktop-file-install

* Fri Jun 07 2002 Havoc Pennington <hp@redhat.com>
- rebuild in different environment

* Wed Jun  5 2002 Havoc Pennington <hp@redhat.com>
- build with new libs

* Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Tue May 21 2002 Havoc Pennington <hp@redhat.com>
- rebuild in different environment

* Tue May 21 2002 Havoc Pennington <hp@redhat.com>
- obsolete gtop

* Tue May 21 2002 Havoc Pennington <hp@redhat.com>
- 1.1.7

* Fri May  3 2002 Havoc Pennington <hp@redhat.com>
- rebuild with new libs

* Thu Apr 18 2002 Havoc Pennington <hp@redhat.com>
- 1.1.6

* Wed Jan 30 2002 Owen Taylor <otaylor@redhat.com>
- Version 1.1.3 (should rename package to gnome-system-monitor as upstream)

* Thu Jan 10 2002 Havoc Pennington <hp@pobox.com>
- make spec "Red Hat style"
- add GConf stuff
- langify

