Name:           gnome-calculator
Version:        3.30.1
Release:        1%{?_dist_release}
Summary:        Gnome Calculator application
Summary(ja):    GNOME 電卓アプリケーション
Group:          Applications/Productivity
License:        GPL
%global         shortver %(echo %{version} | sed -e 's/\.[0-9]*$//')
Source0:        https://download.gnome.org/sources/%{name}/%{shortver}/%{name}-%{version}.tar.xz
Patch0:         Use-GLib.List.deep_copy-to-fix-type-argument-mismatch.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gtk3-devel >= 3.0.0
BuildRequires: gtksourceview3-devel
BuildRequires: glib2-devel
BuildRequires: libxml2-devel
BuildRequires: libsoup-devel
BuildRequires: mpfr-devel
BuildRequires: libmpc-devel
BuildRequires: perl-XML-Parser
BuildRequires: flex
BuildRequires: bison
BuildRequires: vala
BuildRequires: docbook-utils
BuildRequires: desktop-file-utils
BuildRequires: yelp-tools
BuildRequires: meson, ninja
Requires(postun,posttrans): glib2

Obsoletes: gcalctool < 6.6.2-2vl7
Provides: gcalctool = 6.6.2-2vl7

Vendor: Project Vine
Distribution: Vine Linux

%description
gcalctool is a calculator application based on Gtk3.
  
%description -l ja
gcalctool は Gtk3 ベースの電卓アプリケーションです。


%prep
%setup -q
%patch0 -p1

%build
%meson
%meson_build

%install
rm -fr $RPM_BUILD_ROOT
%meson_install

desktop-file-install --vendor gnome --delete-original       \
	--dir $RPM_BUILD_ROOT%{_datadir}/applications             \
	--add-only-show-in GNOME                                  \
	$RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Calculator.desktop

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

%find_lang %{name} --with-gnome

%clean
rm -rf %{buildroot}


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

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


%files -f %{name}.lang
%defattr(-,root,root)
%license COPYING
%doc NEWS 
%{_bindir}/gcalccmd
%{_bindir}/%{name}
%{_libexecdir}/%{name}-search-provider
%{_datadir}/applications/gnome-org.gnome.Calculator.desktop
%{_datadir}/metainfo/org.gnome.Calculator.appdata.xml
%{_datadir}/dbus-1/services/org.gnome.Calculator.SearchProvider.service
%{_datadir}/glib-2.0/schemas/org.gnome.calculator.gschema.xml
%{_datadir}/gnome-shell/search-providers/org.gnome.Calculator-search-provider.ini
%{_datadir}/icons/hicolor/*/apps/gnome-calculator*
%{_mandir}/man1/*

%changelog
* Wed Mar 18 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.30.1-1
- new upstream release.

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

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

* Wed Jun 10 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.2-1
- new upstream release

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

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

* Mon Nov 03 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.1-1
- new upstream release

* Sat Jun 28 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.3-1
- new upstream release

* Tue Jun 10 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.2-2
- add OnlyShowIn=GNOME; to gnome-calculator.desktop

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

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

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

* Sun Nov 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.2-1
- new upstream release

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

* Sun Apr 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.0-1
- rename package from gcalctool to gnome-calculator
- new upstream release

* Mon Oct 15 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 6.6.1-1
- new upstream release

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

* Sun May 20 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 6.4.2.1-1
- new upstream release

* Sun Apr 22 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 6.4.1.1-1
- new upstream release
- add BuildRequires: itstool

* Thu Sep 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 6.2.0-1
- new upstream release
- add BuildRequires: libxml2-devel

* Sun Sep 04 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 6.1.5-1
- new upstream release

* Mon Aug 15 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 6.1.3-1
- new upstream release
- change BuildRequires: gtk3-devel instead of gtk2-devel

* Sun Oct 03 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.32.0-1
- new upstream release
- fix %install, %post, %postun and %files
- remove %pre and %preun
- add %posttrans

* Sat Jul 24 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.30.2-1
- new upstream release

* Sat May 01 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.30.1-1
- new upstream release

* Wed Mar 31 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.30.0-1
- new upstream release

* Sun Mar 14 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.28.2-1
- new upstream release
- add BuildRequires: docbook-utils, desktop-file-utils

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

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

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

* Fri Apr 10 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.26.0-1
- new upstream release

* Sat Nov 29 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.24.2-1
- new upstream release

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

* Tue Oct 14 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.24.0-1vl5
- new upstream release
- spec in UTF-8

* Sun Apr  6 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.22.0-1vl5
- new upstream release
- added %%pre, %%preun section

* Sun Jan 13 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.20.2-0vl1
- new upstream release

* Sun May 27 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.9.14-0vl1
- new upstream release

* Sat Nov 25 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 5.8.23-0vl2
- add BuildRequires:
  - libgnome-devel, libgnomeui-devel, gnome-doc-utils, flex, bison

* Sat Sep  2 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.8.23-0vl1
- new upstream release

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

* Mon May  8 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.8.10-0vl1
- new upstream release

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

* Wed Jan 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.7.27-0vl1
- updated to 5.7.27
- added BuildRequires: scrollkeeper, atk-devel

* Wed Oct 12 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.6.31-0vl1
- updated to 5.6.31

* Fri Jun 24 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.6.14-0vl1
- updated to 5.6.14
- change Group: to Applications/Productivity

* Sun Apr 10 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.5.41-0vl1
- updated to 5.5.41

* Fri Dec 17 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.20-0vl1
- updated to 4.4.20

* Sun Mar 21 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.50-0vl1
- updated to 4.3.50

* Thu Jan 15 2004 Tomoya TAKA <taka@vinelinux.org> 4.3.38-0vl2
- add BuildRequires: perl-XML-Parser

* Thu Jan 15 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.38-0vl1
- new upstream release.
- exec scrolkeeper-update %post and %postun section

* Tue Dec 09 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 4.3.29-0vl1
- initial release.

