Summary:	Applets for MATE panel
Name:		mate-applets
Version:	1.1.0
Release:	2%{?_dist_release}
Source0:	%{name}-%{version}.tar.xz
License:	GPLv2
Group:		User Interface/Desktops
URL:		https://matsusoft.com.ar/projects/mate/

BuildRequires:	mate-common
BuildRequires:	mate-doc-utils
BuildRequires:	mate-conf-devel
BuildRequires:	mate-icon-theme
BuildRequires:	mate-panel-devel
BuildRequires:	mate-desktop-devel
BuildRequires:	mate-settings-daemon-devel
BuildRequires:	libmatenotify-devel
BuildRequires:	libmateweather-devel
BuildRequires:	gtk2-devel
BuildRequires:	libSM-devel
BuildRequires:	libwnck-devel
BuildRequires:	libgtop2-devel
BuildRequires:	dbus-devel
BuildRequires:	polkit-devel
BuildRequires:	NetworkManager-devel
BuildRequires:	popt-devel
BuildRequires:	gtk-doc
BuildRequires:	autoconf
BuildRequires:	automake

Requires(post,pre,preun):	mate-conf
Requires(post,postun):	desktop-file-utils

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

Patch0:		mate-applets-1.1.0-x-lib.patch

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi


%description
MATE (GNU Network Object Model Environment) is a user-friendly
set of applications and desktop tools to be used in conjunction with a
window manager for the X Window System.  MATE is similar in purpose and
scope to CDE and KDE, but MATE is based completely on Open Source
software.  The mate-applets package provides Panel applets which
enhance your MATE experience.


%prep
%setup -q
%patch0 -p1 -b .xlib


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

%{__make} %{?_smp_mflags}


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

export MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
%{__make} install DESTDIR=${RPM_BUILD_ROOT}
unset MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

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

%find_lang %{name}-2.0


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

%post
/sbin/ldconfig

export MATECONF_CONFIG_SOURCE=`mateconftool-2 --get-default-source`

SCHEMAS=" \
  battstat.schemas \
  charpick.schemas \
  cpufreq-applet.schemas \
  drivemount.schemas \
  geyes.schemas \
  multiload.schemas \
  stickynotes.schemas"
for S in $SCHEMAS; do
  echo %{_sysconfdir}/mateconf/schemas/$S; done \
  | xargs mateconftool-2 --makefile-install-rule >& /dev/null ||:

%pre
if [ "$1" -gt 1 ]; then
  export MATECONF_CONFIG_SOURCE=`mateconftool-2 --get-default-source`

  SCHEMAS=" \
    battstat.schemas \
    charpick.schemas \
    cpufreq-applet.schemas \
    drivemount.schemas \
    geyes.schemas \
    multiload.schemas \
    stickynotes.schemas"
  for S in $SCHEMAS; do
    echo %{_sysconfdir}/mateconf/schemas/$S; done \
    | xargs mateconftool-2 --makefile-uninstall-rule >& /dev/null ||:
fi

%preun
if [ "$1" -eq 0 ]; then
  export MATECONF_CONFIG_SOURCE=`mateconftool-2 --get-default-source`

  SCHEMAS=" \
    battstat.schemas \
    charpick.schemas \
    cpufreq-applet.schemas \
    drivemount.schemas \
    geyes.schemas \
    multiload.schemas \
    stickynotes.schemas"
  for S in $SCHEMAS; do
    echo %{_sysconfdir}/mateconf/schemas/$S; done \
    | xargs mateconftool-2 --makefile-uninstall-rule >& /dev/null ||:
fi

%postun
/sbin/ldconfig
update-desktop-database %{_datadir}/applications >& /dev/null ||:


%files -f %{name}-2.0.lang
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_sysconfdir}/dbus-1/system.d/org.mate.CPUFreqSelector.conf
%{_sysconfdir}/mateconf/schemas/battstat.schemas
%{_sysconfdir}/mateconf/schemas/charpick.schemas
%{_sysconfdir}/mateconf/schemas/cpufreq-applet.schemas
%{_sysconfdir}/mateconf/schemas/drivemount.schemas
%{_sysconfdir}/mateconf/schemas/geyes.schemas
%{_sysconfdir}/mateconf/schemas/multiload.schemas
%{_sysconfdir}/mateconf/schemas/stickynotes.schemas
%{_sysconfdir}/sound/events/mate-battstat_applet.soundlist
%{_bindir}/mate-cpufreq-selector
%{_libdir}/matecomponent/servers/MATE_CDPlayerApplet.server
%{_libdir}/matecomponent/servers/MATE_KeyboardApplet.server
%{_libdir}/matecomponent/servers/MATE_MailcheckApplet_Factory.server
%{_libdir}/matecomponent/servers/MATE_MiniCommanderApplet.server
%{_libdir}/matecomponent/servers/MATE_MixerApplet.server
%{_libdir}/matecomponent/servers/MATE_NullApplet_Factory.server
%{_libdir}/matecomponent/servers/MATE_Panel_WirelessApplet.server
%{_libexecdir}/mate/accessx-status-applet
%{_libexecdir}/mate/battstat-applet-2
%{_libexecdir}/mate/charpick_applet2
%{_libexecdir}/mate/cpufreq-applet
%{_libexecdir}/mate/drivemount_applet2
%{_libexecdir}/mate/geyes_applet2
%{_libexecdir}/mate/mateweather-applet-2
%{_libexecdir}/mate/multiload-applet-2
%{_libexecdir}/mate/null_applet
%{_libexecdir}/mate/stickynotes_applet
%{_libexecdir}/mate/trashapplet
%{_datadir}/dbus-1/services/*.service
%{_datadir}/dbus-1/system-services/org.mate.CPUFreqSelector.service
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/icons/mate/48x48/apps/ax-applet.png
%{_datadir}/mate/help
%{_datadir}/mate-2.0/ui/*.xml
%{_datadir}/%{name}
%{_datadir}/mate-panel/applets/*
%{_datadir}/omf
%{_datadir}/pixmaps/mate-accessx-status-applet
%{_datadir}/pixmaps/mate-cpufreq-applet
%{_datadir}/pixmaps/mate-stickynotes
%{_datadir}/polkit-1/actions/org.mate.cpufreqselector.policy


%changelog
* 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

