%define pkg_version 2.29.1
%define pkg_release 2%{?_dist_release}

Summary:     Window management and application launching for GNOME
Name:        gnome-shell
Version:     %{pkg_version}
Release:     %{pkg_release}
Source0:     %{name}-%{version}.tar.bz2
License:     GPLv2+
Group:       User Interface/Desktops
URL:         http://live.gnome.org/GnomeShell

Requires(post,postun): scrollkeeper >= 0.1.4
Requires(post,pre,preun): GConf2 >= 2.14
Requires: mutter

BuildRequires: gnome-common
BuildRequires: libtool
BuildRequires: automake
BuildRequires: autoconf

BuildRequires: pkgconfig
BuildRequires: gtk2-devel
BuildRequires: clutter-devel
BuildRequires: mutter-devel
BuildRequires: gjs-devel
BuildRequires: gnome-desktop-devel
BuildRequires: gnome-menus-devel
BuildRequires: libSM-devel
BuildRequires: libffi-devel
BuildRequires: GConf2-devel
BuildRequires: startup-notification-devel
BuildRequires: gnome-doc-utils
BuildRequires: desktop-file-utils
BuildRequires: xulrunner-devel
BuildRequires: libcroco-devel
BuildRequires: librsvg2-devel
BuildRequires: gir-repository-devel
BuildRequires: gobject-introspection-devel
BuildRequires: gstreamer-devel
BuildRequires: dbus-glib-devel
BuildRequires: intltool

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

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi


%description
GNOME Shell is the defining technology of the GNOME 3 desktop user experience. It provides core interface functions like switching to windows and launching applications. GNOME Shell takes advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a delightful and easy to use experience. 


%prep
%setup -q


%build
%configure --disable-static
%{__make} %{?_smp_mflags} 


%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__make} install DESTDIR=${RPM_BUILD_ROOT}

%find_lang %{name}

%{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/*.la


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


%post 
/sbin/ldconfig
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule \
    %{_sysconfdir}/gconf/schemas/gnome-shell.schemas \
  > /dev/null || :
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi

%pre 
if [ "$1" -gt 1 ]; then
  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  gconftool-2 --makefile-uninstall-rule \
    %{_sysconfdir}/gconf/schemas/gnome-shell.schemas \
    > /dev/null || :
fi

%preun 
if [ "$1" -eq 0 ]; then
  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  gconftool-2 --makefile-uninstall-rule \
    %{_sysconfdir}/gconf/schemas/gnome-shell.schemas \
    > /dev/null || :
fi

%postun
scrollkeeper-update -q || :
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi


%files -f %{name}.lang
%defattr(-,root,root)
%doc COPYING ChangeLog NEWS README
%{_bindir}/gnome-shell
%{_libdir}/gnome-shell/*
%{_libdir}/mutter/plugins/*
%{_datadir}/applications/*
%{_datadir}/gnome-shell/*
%{_datadir}/man/man1/*.1.gz
%{_sysconfdir}/gconf/schemas/*


%changelog
* Sun May 02 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.29.1-2
- add Requires: mutter

* Sun May 02 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.29.1-1
- new upstream release

* Sun Feb 28 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.28.0-1
- initial build for Vine Linux

