File pantheon-calculator.spec of Package pantheon-calculator

#
# spec file for package pantheon-calculator
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           pantheon-calculator
Version:        0.1.3
Release:        0
Summary:        An elementary app for simple calculation
License:        GPL-3.0
Group:          Productivity/Scientific/Math
Url:            https://launchpad.net/pantheon-calculator
Source:         https://github.com/elementary/calculator/archive/%{version}.tar.gz#/calculator-%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  intltool
BuildRequires:  update-desktop-files
BuildRequires:  vala >= 0.26.0
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(granite)
BuildRequires:  pkgconfig(gtk+-3.0)
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires

%description
A tiny, simple calculator written in GTK+ and Vala.

%lang_package

%prep
%setup -q -n calculator-%{version}

%build
%cmake
make %{?_smp_mflags}

%install
%cmake_install
%suse_update_desktop_file -r -G "Simple Calculator" org.pantheon.calculator GTK Utility Calculator
%fdupes %{buildroot}%{_datadir}/locale
%find_lang io.elementary.calculator %{name}.lang

%post
%desktop_database_post
%glib2_gsettings_schema_post

%postun
%desktop_database_postun
%glib2_gsettings_schema_postun

%files
%defattr(-,root,root)
%doc AUTHORS COPYING
%{_bindir}/io.elementary.calculator
%dir %{_datadir}/appdata
%{_datadir}/appdata/org.pantheon.calculator.appdata.xml
%{_datadir}/applications/org.pantheon.calculator.desktop
%{_datadir}/glib-2.0/schemas/org.pantheon.calculator.gschema.xml

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by