File vala-panel-plugin-sntray.spec of Package vala-panel-plugin-sntray

#
# spec file for package vala-panel-plugin-sntray
#
# 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/
#


%define _name   xfce4-sntray-plugin
Name:           vala-panel-plugin-sntray
Version:        0.4.3
Release:        0
Summary:        StatusNotifierItem (appindicator) plugin for vala-panel
License:        LGPL-3.0+
Group:          System/GUI/Other
Url:            https://github.com/rilian-la-te/xfce4-sntray-plugin
Source:         https://github.com/rilian-la-te/%{_name}/releases/download/%{version}/%{_name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM vala-panel-plugin-sntray-0.4.1-vala-0.36.patch -- Fix build with Vala 0.36 and newer.
Patch0:         vala-panel-plugin-sntray-0.4.1-vala-0.36.patch
BuildRequires:  cmake >= 2.8
BuildRequires:  fdupes
BuildRequires:  gettext
BuildRequires:  pkgconfig
BuildRequires:  vala >= 0.24
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.16.0
BuildRequires:  pkgconfig(libpeas-1.0) >= 1.2
BuildRequires:  pkgconfig(vala-panel) >= 0.3.7
Recommends:     %{name}-lang
%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120100 && 0%{?is_opensuse})
BuildRequires:  pkgconfig(libxfce4panel-2.0)
BuildRequires:  pkgconfig(libxfconf-0)
%endif

%description
StatusNotifierItem is the new D-Bus standard for system tray.

%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120100 && 0%{?is_opensuse})
%package lang
Summary:        Languages for package vala-panel-plugin-sntray
Group:          System/Localization
Suggests:       %{name} = %{version}
Suggests:       xfce4-panel-plugin-sntray = %{version}
Supplements:    packageand(bundle-lang-other:%{name})
Supplements:    packageand(bundle-lang-other:xfce4-panel-plugin-sntray)
Provides:       %{name}-lang-all = %{version}
Provides:       xfce4-panel-plugin-sntray-lang = %{version}
Provides:       xfce4-panel-plugin-sntray-lang-all = %{version}
BuildArch:      noarch

%description lang
Provides translations to the packages vala-panel-plugin-sntray and
xfce4-panel-plugin-sntray.
%else
%lang_package
%endif

%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120100 && 0%{?is_opensuse})
%package -n xfce4-panel-plugin-sntray
Summary:        StatusNotifierItem (appindicator) plugin for xfce4-panel
Group:          System/GUI/XFCE
Requires:       xfce4-panel
Recommends:     xfce4-panel-plugin-sntray-lang

%description -n xfce4-panel-plugin-sntray
StatusNotifierItem is the new D-Bus standard for system tray.
%endif

%prep
%setup -q -n %{_name}-%{version}
%patch0 -p1

%build
%cmake \
  -DCMAKE_SHARED_LINKER_FLAGS="" \
  -DGSETTINGS_COMPILE=OFF
make %{?_smp_mflags} V=1

%install
%cmake_install
%find_lang %{_name}
%fdupes %{buildroot}%{_datadir}/

%post
%glib2_gsettings_schema_post

%postun
%glib2_gsettings_schema_postun

%files
%defattr(-,root,root)
%doc LICENSE README.md
%dir %{_libdir}/vala-panel/
%dir %{_libdir}/vala-panel/applets/
%{_libdir}/vala-panel/applets/libsntray-valapanel.so
%{_libdir}/vala-panel/applets/sntray.plugin
%{_datadir}/glib-2.0/schemas/org.valapanel.toplevel.sntray.gschema.xml

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

%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120100 && 0%{?is_opensuse})
%files -n xfce4-panel-plugin-sntray
%defattr(-,root,root)
%doc LICENSE README.md
%dir %{_libdir}/xfce4/
%dir %{_libdir}/xfce4/panel/
%dir %{_libdir}/xfce4/panel/plugins/
%{_libdir}/xfce4/panel/plugins/libsntray-xfce.so
%dir %{_datadir}/xfce4/
%dir %{_datadir}/xfce4/panel/
%dir %{_datadir}/xfce4/panel/plugins/
%{_datadir}/xfce4/panel/plugins/sntray.desktop
%endif

%changelog
openSUSE Build Service is sponsored by