Summary:	The MATE Panel
Name:		mate-panel
Version:	1.14.1
Release:	1%{?_dist_release}

Source0:	http://pub.mate-desktop.org/releases/1.14/%{name}-%{version}.tar.xz
Source1:	vine.layout

# for Vine
Patch2000:	mate-panel-1.6.1-about-vine.patch
Patch2001:	mate-panel-1.12.0-vine-layout.patch
Patch2002:	mate-panel-1.12.0-ja.po.patch

License:	GPLv2
Group:		User Interface/Desktops
URL:		http://mate-desktop.org/

BuildRequires:	mate-common
BuildRequires:	mate-doc-utils
BuildRequires:	mate-desktop-devel
BuildRequires:	mate-menus-devel
BuildRequires:	libmateweather-devel
BuildRequires:	gtk2-devel
BuildRequires:	libSM-devel
BuildRequires:	libcanberra-devel
BuildRequires:	dbus-glib-devel
BuildRequires:	libwnck-devel
BuildRequires:	librsvg2-devel
BuildRequires:	evolution-data-server-devel
BuildRequires:	NetworkManager-devel
BuildRequires:	dconf-devel
BuildRequires:	gtk-doc
BuildRequires:	itstool
BuildRequires:	autoconf
BuildRequires:	automake

Requires:		vine-menus
Requires(posttrans,postun):	glib2
Requires(post,postun):	gtk2
Requires(post,postun):	desktop-file-utils

BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi


%description
mate-panel contains the MATE panel, the libmate-panel-applet library and
several applets:

  + the MATE panel is the area on your desktop from which you can run
    applications and applets, and perform other tasks.

  + the libmate-panel-applet library allows to develop small applications
    which may be embedded in the panel. These are called applets.
    Documentation for the API is available with gtk-doc.

  + the applets supplied here include the Workspace Switcher, the Window
    List, the Window Selector, the Notification Area, the Clock and the
    infamous 'Wanda the Fish'.


%package		devel
Summary:        Development tools for mate-panel
Summary(ja):    mate-panel の開発環境
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description	devel
Header files and libraries for building a extension library for the
mate-panel.


%package        docs
Summary:        Documentation for mate-panel
Summary(ja):    mate-panel 用のドキュメント
Group:          Documentation
Requires:       %{name} = %{version}-%{release}
Obsoletes:      %{name}-doc < 1.10.1
BuildArch:      noarch

%description    docs
This package contains documentation for mate-panel.


%prep
%setup -q
%patch2000 -p1 -b .vine
%patch2001 -p1 -b .vine
%patch2002 -p1 -b .vine

%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi)
%configure \
	--libexecdir=%{_libexecdir}/mate \
	--disable-static \
	--disable-scrollkeeper \
	--enable-introspection \
	--enable-matecomponent

%{__make} %{?_smp_mflags}


%install
%{__rm} -rf ${RPM_BUILD_ROOT}

%{__make} install DESTDIR=${RPM_BUILD_ROOT}

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

install -c -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/layouts/

%find_lang %{name}


%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%post
/sbin/ldconfig
update-desktop-database %{_datadir}/applications >& /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor
gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:

%postun
/sbin/ldconfig
if [ $1 -eq 0 ]; then
  update-desktop-database %{_datadir}/applications >& /dev/null ||:
  touch --no-create %{_datadir}/icons/hicolor
  gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:
  glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
fi

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


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_bindir}/mate-desktop-item-edit
%{_bindir}/mate-panel
%{_bindir}/mate-panel-test-applets
%{_libdir}/girepository-1.0/MatePanelApplet-4.0.typelib
%{_libdir}/libmate-panel-applet-*.so.*
%{_libexecdir}/mate/clock-applet
%{_libexecdir}/mate/fish-applet
%{_libexecdir}/mate/notification-area-applet
%{_libexecdir}/mate/wnck-applet
%{_datadir}/applications/mate-panel.desktop
%{_datadir}/dbus-1/services/*.service
%{_datadir}/glib-2.0/schemas/org.mate.panel.applet.clock.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.panel.applet.fish.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.panel.applet.window-list.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.panel.applet.workspace-switcher.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.panel.enums.xml
%{_datadir}/glib-2.0/schemas/org.mate.panel.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.panel.menubar.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.panel.object.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.panel.toplevel.gschema.xml
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/help
%{_datadir}/mate-panel
%{_mandir}/man1/mate-panel.1.gz
%{_mandir}/man1/mate-desktop-item-edit.1.gz
%{_mandir}/man1/mate-panel-test-applets.1.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/mate-panel-4.0/
%{_libdir}/libmate-panel-applet-*.so
%{_libdir}/pkgconfig/libmatepanelapplet-4.0.pc
%{_datadir}/gir-1.0/MatePanelApplet-4.0.gir

%files docs
%defattr(-,root,root,-)
%{_datadir}/gtk-doc/html/mate-panel-applet


%changelog
* Wed Jun 15 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.14.1-1
- new upstream release

* Sun May 08 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.14.0-1
- new upstream release

* Sun Feb 14 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.2-1
- new upstream release

* Tue Dec 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.1-1
- new upstream release

* Sat Nov 07 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.0-1
- new upstream release
- update Patch2001 (mate-panel-1.12.0-vine-layout.patch)
- update Patch2002 (mate-panel-1.12.0-ja.po.patch)

* Sun Aug 30 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.1-2
- add Patch2002 (mate-panel-1.10.1-ja.po.patch)

* Sat Jul 11 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.1-1
- new upstream release

* Sat May 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-1
- new upstream release
- remove Patch2002 (mate-panel-1.8.0-ja.po.patch)

* Wed Nov 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.1-1
- rename Source (vine.layout)

* Sun Jun 08 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.0-2
- rename Source (vine.layout)
- add Patch2001 (mate-panel-1.8.0-vine-layout.patch)
- add Patch2002 (mate-panel-1.8.0-ja.po.patch)

* Tue Apr 15 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.0-1
- new upstream release
- change BuildRequires: libwnck-devel instead of libmatewnck-devel
- add BuildRequires: itstool

* Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-3
- rebuild with VineSeed environment

* Wed Sep 25 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-2
- change Source1 (panel-default-layout.mate.vine)
- add Patch2000 (mate-panel-1.6.1-about-vine.patch)
- add Requires: vine-menus

* Sun Sep 22 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-1
- new upstream release

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.0-1
- new upstream release
- remove BuildRequires: mate-conf-devel, libmatecomponentui-devel
- add BuildRequires: dconf-devel

* Wed Aug 01 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.0-1
- new upstream release
- remove Patch0 (mate-panel-1.2.1-configure.patch)
- change BuildRequires: libmatewnck-devel instead of libwnck-devel

* Sat May 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.1-1
- new upstream release
- add Patch0 (mate-panel-1.2.1-configure.patch)

* Fri Dec 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.0-2
- change category

* Fri Dec 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.0-1
- initial build for Vine Linux

