File mate-panel.spec of Package mate-panel
#
# spec file for package mate-panel
#
# Copyright (c) 2015 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 lname libmate-panel-applet-4-1
%define typelib typelib-1_0-MatePanelApplet-4_0
%define _version 1.10
Name: mate-panel
Version: 1.10.1
Release: 0
Summary: MATE Desktop Panel
License: GPL-2.0+
Group: System/GUI/Other
Url: http://mate-desktop.org/
Source0: http://pub.mate-desktop.org/releases/%{_version}/%{name}-%{version}.tar.xz
Source1: %{name}-branding.gschema.override.in
# PATCH-FIX-OPENSUSE mate-panel-layouts-suse.patch sor.alexei@meowr.ru -- Correct missing elements.
Patch0: %{name}-layouts-suse.patch
BuildRequires: fdupes
BuildRequires: hicolor-icon-theme
BuildRequires: intltool
BuildRequires: libxml2-python
BuildRequires: mate-common >= 1.9.0
BuildRequires: popt-devel
BuildRequires: update-desktop-files
BuildRequires: yelp-tools
BuildRequires: pkgconfig(NetworkManager)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(dconf)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(libcanberra-gtk)
BuildRequires: pkgconfig(libmate-menu)
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(libwnck-1.0)
BuildRequires: pkgconfig(mate-desktop-2.0) >= 1.9.2
BuildRequires: pkgconfig(mateweather) >= 1.9.0
BuildRequires: pkgconfig(sm)
Requires: %{name}-branding = %{version}
Requires: NetworkManager-gnome
Requires: gsettings-backend-dconf
Requires: gvfs-backends
Recommends: %{name}-lang
# Remove old packages.
Obsoletes: mate-panel-matecomponent-support
%description
This package contains MATE Desktop Panel. The panel is an
easy-to-use and functional interface to manage your desktop, start
programs, and organize access to your data.
%package branding-upstream
Summary: The MATE Desktop Panel -- Upstream default layout
License: GPL-2.0+
Group: System/GUI/Other
Requires: %{name} = %{version}
Supplements: packageand(%{name}:branding-upstream)
Conflicts: otherproviders(%{name}-branding)
Provides: %{name}-branding = %{version}
BuildArch: noarch
#BRAND: Provides /usr/share/mate-panel/panel-default-layout.layout
#BRAND: which contains the default layout.
#BRAND: Branding package should require packages with applets in
#BRAND: the default layout.
%glib2_gsettings_schema_requires
%description branding-upstream
This package contains the MATE Desktop Panel. The panel is an
easy-to-use and functional interface to manage your desktop, start
programs, and organize access to your data.
This package contains the upstream default layout for MATE Panel.
%package -n %{lname}
Summary: MATE Panel Applet Library -- matecomponent-based library
License: LGPL-2.1+
Group: System/Libraries
%description -n %{lname}
This package contains MATE Desktop Panel. The panel is an
easy-to-use and functional interface to manage your desktop, start
programs, and organize access to your data.
%package -n %{typelib}
Summary: MATE Panel Applet Library typelib
License: GPL-2.0+
Group: System/GUI/Other
%description -n %{typelib}
This package contains MATE Desktop Panel. The panel is an
easy-to-use and functional interface to manage your desktop, start
programs, and organize access to your data.
%package devel
Summary: MATE Panel Applet Library -- Development Files
License: GPL-2.0+
Group: Development/Libraries/Other
Requires: %{lname} = %{version}
Requires: %{typelib} = %{version}
%description devel
This package contains the MATE Desktop Panel. The panel is an
easy-to-use and functional interface to manage your desktop, start
programs, and organize access to your data.
%lang_package
%prep
%setup -q
%patch0 -p1
cp -a %{SOURCE1} zz-mate-panel-upream-branding.gschema.override
# Switch to mate-menu in openSUSE branding.
sed -i 's/GNOMEMainMenuFactory::GNOMEMainMenu/MateMenuAppletFactory::MateMenuApplet/' data/opensuse.layout
%build
%configure \
--libexecdir=%{_libexecdir}/%{name} \
--disable-static \
--enable-introspection \
--disable-scrollkeeper
make %{?_smp_mflags}
%install
%make_install
mkdir -p %{buildroot}%{_datadir}/mate/
%find_lang %{name} %{?no_lang_C}
find %{buildroot} -type f -name "*.la" -delete -print
%fdupes %{buildroot}%{_datadir}/mate/
%fdupes %{buildroot}%{_datadir}/mate-panel/
%fdupes %{buildroot}%{_includedir}/
%suse_update_desktop_file %{name}
if [ -d %{buildroot}%{_datadir}/MateConf/ ]; then
rm -rf %{buildroot}%{_datadir}/MateConf/
fi
# And install schema override file to get it applied.
mkdir -p %{buildroot}%{_datadir}/glib-2.0/schemas/
install -m 0644 zz-mate-panel-upream-branding.gschema.override %{buildroot}%{_datadir}/glib-2.0/schemas/
%post
%desktop_database_post
%icon_theme_cache_post
%glib2_gsettings_schema_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%glib2_gsettings_schema_postun
%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%post branding-upstream
%glib2_gsettings_schema_post
%postun branding-upstream
%glib2_gsettings_schema_postun
%files
%defattr(-,root,root)
%doc ChangeLog README COPYING
%{_mandir}/man?/mate-panel.?%{?ext_man}
%{_mandir}/man?/mate-panel-test-applets.?%{?ext_man}
%{_mandir}/man?/mate-desktop-item-edit.?%{?ext_man}
%{_bindir}/mate-desktop-item-edit
%{_bindir}/mate-panel
%{_bindir}/mate-panel-test-applets
%{_libexecdir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/dbus-1/services/*.service
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/help/C/
%{_datadir}/icons/hicolor/*/apps/%{name}*
%{_datadir}/%{name}/
#%{_datadir}/mate-panelrc
# Files from branding-upstream
%exclude %{_datadir}/glib-2.0/schemas/zz-mate-panel-upream-branding.gschema.override
%files branding-upstream
%defattr (-, root, root)
%{_datadir}/glib-2.0/schemas/zz-mate-panel-upream-branding.gschema.override
%files -n %{lname}
%defattr(-,root,root)
%dir %{_datadir}/mate
%{_libdir}/libmate-panel-applet-4.so.*
%files -n %{typelib}
%defattr(-,root,root)
%{_libdir}/girepository-1.0/MatePanelApplet-4.0.typelib
%files devel
%defattr(-,root,root)
%{_includedir}/mate-panel-4.0/
%{_libdir}/pkgconfig/libmatepanelapplet-4.0.pc
%{_libdir}/*.so
%{_datadir}/gir-1.0/MatePanelApplet-4.0.gir
%{_datadir}/gtk-doc/html/%{name}-applet/
%files lang -f %{name}.lang
%defattr(-,root,root)
%{_datadir}/help/
%exclude %{_datadir}/help/C/
%changelog