%define pkg_version 3.18.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.18/%{name}-%{version}.tar.xz

Patch100:    mutter-3.18.1-roundf.patch

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

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

BuildRequires:	pkgconfig
BuildRequires:	gtk3-devel
BuildRequires:	clutter-devel
BuildRequires:	mesa-libgbm-devel >= 10.3
BuildRequires:	libSM-devel
BuildRequires:	libxkbfile-devel
BuildRequires:	xkeyboard-config
BuildRequires:	libxkbcommon-devel
BuildRequires:	python-devel
BuildRequires:	gnome-desktop3-devel
BuildRequires:	gobject-introspection-devel
BuildRequires:	startup-notification-devel
BuildRequires:	libcanberra-gtk3-devel
BuildRequires:	upower-devel >= 0.9.11
BuildRequires:	desktop-file-utils
BuildRequires:	zenity
BuildRequires:	gsettings-desktop-schemas-devel >= 3.4.0

Requires:		%{name}-libs = %{version}-%{release}
Requires(postun,posttrans):	desktop-file-utils


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}-libs = %{version}-%{release}
Requires:       pkgconfig
Requires:       gtk3-devel
Requires:       clutter-devel
Requires:       libX11-devel

%description    devel
Development files of the mutter library.


%package        libs
Summary:        Libraries for %{name}
Summary(ja):    %{name} の共有ライブラリ
Group:          System Environment/Libraries

%description    libs
The %{name}-libs package contains the runtime shared libraries for
%{name}.


%prep
%setup -q
%patch100 -p1 

%build
export CFLAGS="$RPM_OPT_FLAGS -Wno-error=unused-variable -Wno-error=sign-compare"
intltoolize --force --copy
autoreconf -if
%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 
touch --no-create %{_datadir}/icons/hicolor

%postun
if [ "$1" -eq 0 ]; then
	touch --no-create %{_datadir}/icons/hicolor
	gtk-update-icon-cache -q %{_datadir}/icons/hicolor
	update-desktop-database -q > /dev/null || :
fi

%posttrans
gtk-update-icon-cache -q %{_datadir}/icons/hicolor
update-desktop-database -q > /dev/null || :

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig


%files -f %{name}.lang
%defattr(-,root,root)
%doc COPYING ChangeLog NEWS README
%{_bindir}/mutter
%{_libdir}/mutter/plugins/default.so
%{_libexecdir}/mutter-restart-helper
%{_datadir}/GConf/gsettings/mutter-schemas.convert
%{_datadir}/applications/*
%{_datadir}/glib-2.0/schemas/org.gnome.mutter.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.mutter.wayland.gschema.xml
%{_datadir}/gnome-control-center/keybindings/50-mutter-navigation.xml
%{_datadir}/gnome-control-center/keybindings/50-mutter-system.xml
%{_datadir}/gnome-control-center/keybindings/50-mutter-windows.xml
%{_mandir}/man1/mutter.1.gz

%files libs
%defattr(-,root,root,-)
%{_libdir}/lib*.so.*
%{_libdir}/mutter/Meta-3.0.typelib

%files devel
%defattr(-,root,root,-)
%{_includedir}/mutter/*
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
%{_libdir}/mutter/Meta-3.0.gir


%changelog
* Fri Nov 13 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.2-1
- new upstream release

* Sat Oct 31 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.1-1
- new upstream release
- add Patch100 (mutter-3.18.1-roundf.patch)
- remove %%{name}-docs subpackage

* Sat May 16 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.2-1
- new upstream release

* Sat May 16 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.2-1
- new upstream release

* Sun Apr 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.1.1-1
- new upstream release

* Sun Mar 29 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.0-1
- new upstream release

* Mon Dec 22 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.3-1
- new upstream release

* Wed Nov 19 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.2-1
- new upstream release

* Sat Nov 08 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.14.1.5-1
- new upstream release
- add BuildRequires: mesa-libgbm-devel, libxkbfile-devel, xkeyboard-config, libxkbcommon-devel

* Sun Sep 21 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.2-2
- rebuild with upower-0.99.1

* Wed May 14 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.2-1
- new upstream release

* Sat Apr 19 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.1-1
- new upstream release

* Sat Apr 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.0-1
- new upstream release

* Sat Jan 25 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.3-1
- new upstream release

* Sun Nov 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.2-1
- new upstream release

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.1.1-1
- new upstream release
- add BuildRequires: gnome-desktop3-devel, upower-devel
- create libs subpackage
- add Patch0 (mutter-3.10.0.1-introspection.patch)

* Sun Aug 11 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.4-1
- new upstream release

* Sun Jun 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.3-1
- new upstream release

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.2-1
- new upstream release
- remove Patch101 (mutter-vine-customize.patch)

* Thu Apr 18 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.1-1
- new upstream release
- create %%{name}-doc subpackage

* Sun Feb 17 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.3-1
- new upstream release

* 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

