File appcenter.spec of Package appcenter

#
# spec file for package appcenter
#
# 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:           appcenter
Version:        0.2.3
Release:        0
Summary:        Browse and manage apps
License:        GPL-3.0
Group:          System/GUI/Other
Url:            https://launchpad.net/appcenter
Source:         https://launchpad.net/appcenter/loki/%{version}/+download/%{name}-%{version}.tar.xz
BuildRequires:  cmake
BuildRequires:  elementary-cmake-modules
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  intltool
BuildRequires:  libxml2-tools
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(appstream) >= 0.10.3
BuildRequires:  pkgconfig(appstream-glib)
BuildRequires:  pkgconfig(gee-0.8)
BuildRequires:  pkgconfig(gio-2.0) >= 2.46
BuildRequires:  pkgconfig(granite)
BuildRequires:  pkgconfig(gthread-2.0)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.10
BuildRequires:  pkgconfig(json-glib-1.0)
BuildRequires:  pkgconfig(libsoup-2.4)
BuildRequires:  pkgconfig(packagekit-glib2)
BuildRequires:  pkgconfig(vapigen) >= 0.28
Recommends:     %{name}-lang
Recommends:     libzypp-plugin-appdata
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
AppCenter is a native Gtk+ app store built on AppStream and Packagekit.

%lang_package

%prep
%setup -q

sed -i 's/\/metainfo/\/appdata/' $(grep -rl 'metainfo')

%build
%cmake -DGSETTINGS_COMPILE=FALSE -DUSE_UNITY=FALSE
make %{?_smp_mflags}

%install
%cmake_install
%find_lang %{name}

%suse_update_desktop_file -r -G AppCenter io.elementary.%{name} GTK System PackageManager

%fdupes %{buildroot}%{_datadir}

%post
%glib2_gsettings_schema_post
%desktop_database_post

%postun
%glib2_gsettings_schema_postun
%desktop_database_postun

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

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

%changelog
openSUSE Build Service is sponsored by