%define pkg_version 3.6.2
%define pkg_release 1%{?_dist_release}

Summary:     Window and compositing manager based on Clutter
Name:        mutter
Version:     %{pkg_version}
Release:     %{pkg_release}
Source0:     http://ftp.gnome.org/pub/GNOME/sources/%{name}/3.6/%{name}-%{version}.tar.xz

Patch101:    mutter-vine-customize.patch

License:     GPLv2+
Group:       User Interface/Desktops
URL:         http://git.gnome.org/browse/mutter

Requires(post,postun): scrollkeeper >= 0.1.4
BuildRequires: pkgconfig
BuildRequires: gtk3-devel
BuildRequires: clutter-devel
BuildRequires: libSM-devel
BuildRequires: gobject-introspection-devel
BuildRequires: python-devel
BuildRequires: startup-notification-devel
BuildRequires: libcanberra-gtk3-devel
BuildRequires: gnome-doc-utils
BuildRequires: desktop-file-utils
BuildRequires: zenity
BuildRequires: gsettings-desktop-schemas-devel >= 3.4.0
BuildRoot: %{_tmppath}/%{name}-%{version}-root

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi


%description
Mutter is a minimal X window manager aimed at nontechnical users and is designed to integrate well with the GNOME desktop. Mutter lacks some features that may be expected by traditional UNIX or other technical users; these users may want to investigate other available window managers for use with GNOME or standalone.


%package devel
Summary:     Development files of the mutter library.
Group:       Development/Libraries

Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
Requires: gtk-doc
Requires: gtk3-devel
Requires: clutter-devel
Requires: libX11-devel

%description devel
Development files of the mutter library.


%prep
%setup -q
%patch101 -p1 -b .vine


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


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

%find_lang %{name}

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


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


%post 
/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

%postun
/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}/mutter
%{_bindir}/mutter-message
%{_libdir}/lib*.so.*
%{_libdir}/mutter/*
%{_datadir}/GConf/gsettings/mutter-schemas.convert
%{_datadir}/applications/*
%{_datadir}/glib-2.0/schemas/org.gnome.mutter.gschema.xml
%{_datadir}/gnome/wm-properties/*
%{_datadir}/gnome-control-center/keybindings/50-mutter-windows.xml
%{_datadir}/mutter/*
%{_mandir}/man1/mutter.1.gz
%{_mandir}/man1/mutter-message.1.gz

%files devel
%defattr(-,root,root,-)
%{_bindir}/mutter-theme-viewer
%{_bindir}/mutter-window-demo
%{_includedir}/mutter/*
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
%{_mandir}/man1/mutter-theme-viewer.1.gz
%{_mandir}/man1/mutter-window-demo.1.gz

%changelog
* Wed Nov 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.2-1
- new upstream release

* Tue Oct 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-1
- new upstream release

* Sat Sep 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release
- remove BuildRequires: GConf2-devel

* Sat Apr 21 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.1-1
- new upstream release
- update Patch101 (mutter-vine-customize.patch)
- add BuildRequires: gsettings-desktop-schemas-devel

* Sat Jan 21 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.2-1
- new upstream release

* Fri Oct 21 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.1-1
- new upstream release

* Wed Sep 28 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.0-1
- new upstream release

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.92-1
- new upstream release

* Sun Sep 18 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.91.1-1
- new upstream release
- add Requires: gtk3-devel, libX11-devel (-devel package)

* Sat Sep 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.90.1-1
- new upstream release
- add BuildRequires: zenity

* Fri Aug 12 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.4-1
- new upstream release
- change BuildRequires: gobject-introspection-devel instead of gir-repository-devel 
- change BuildRequires: gtk3-devel instead of gtk2-devel
- change BuildRequires: libcanberra-gtk3-devel instead of libcanberra-devel
- add Patch101 (mutter-vine-customize.patch)

* Thu Sep 23 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.29.1-2
- rebuild with rpm-4.8.1 for pkg-config file

* Thu Apr 29 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.29.1-1
- new upstream release
- add BuildRequires: libcanberra-devel
- Requires: clutter-devel (devel package)

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

