Name: 		muffin
Summary: 	The cinnamon window manager based on mutter
Version: 	2.2.1
Release: 	1%{?_dist_release}

Group: 		User Interface/Desktops
License:	GPLv2+
URL: 		http://cinnamon.linuxmint.com/

Source0: 	%{name}-%{version}.tar.gz

Patch0:		muffin-2.2.1-cogl-1.18.x.patch

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

BuildRequires:	cinnamon-desktop-devel >= 1.0.0
BuildRequires:	gtk3-devel >= 3.3.7
BuildRequires:	clutter-devel >= 1.7.5
BuildRequires:	cairo-devel >= 1.10.0
BuildRequires:	gobject-introspection-devel >= 0.9.5
BuildRequires:	libcanberra-gtk3-devel >= 0.26
BuildRequires:	startup-notification-devel
BuildRequires:	libSM-devel
BuildRequires:	libXcomposite-devel >= 0.2
BuildRequires:	libXcursor-devel
BuildRequires:	libXinerama-devel
BuildRequires:	gsettings-desktop-schemas-devel
BuildRequires:	zenity
BuildRequires:	gnome-doc-utils
BuildRequires:	gnome-common

Requires(postun,posttrans): glib2

Vendor:			Project Vine
Distribution:	Vine Linux
Packager:		Takemikaduchi

%description
The Cinnamon Window Manager Based on Mutter 3.2.1.


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

%description	devel
Header files and libraries for building a extension library for the
muffin.


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

%build
export CFLAGS="$CFLAGS -Wno-deprecated-declarations"
NOCONFIGURE=1 ./autogen.sh
%configure --disable-static --enable-compile-warnings=minimum
make %{?_smp_mflags} 

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

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

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig

%postun
/sbin/ldconfig
if [ $1 -eq 0 ]; then
  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 README NEWS COPYING AUTHORS
%{_bindir}/muffin
%{_bindir}/muffin-message
%{_bindir}/muffin-theme-viewer
%{_bindir}/muffin-window-demo
%{_libdir}/libmuffin.so.*
%{_libdir}/%{name}/Meta-Muffin.0.typelib
%{_libdir}/%{name}/plugins
%{_datadir}/GConf/gsettings/muffin-schemas.convert
%{_datadir}/applications/muffin.desktop
%{_datadir}/glib-2.0/schemas/org.cinnamon.muffin.gschema.xml
%{_datadir}/%{name}/icons/muffin-window-demo.png
%{_mandir}/man1/*.1.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/muffin
%{_libdir}/libmuffin.so
%{_libdir}/%{name}/Meta-Muffin.0.gir
%{_libdir}/pkgconfig/libmuffin.pc
%{_libdir}/pkgconfig/muffin-plugins.pc


%changelog
* Sun Apr 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.1-1
- new upstream release
- add BuildRequires: cinnamon-desktop-devel
- add Patch0 (muffin-2.2.1-cogl-1.18.x.patch)

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.2-1
- update to 1.8.2

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.1-1
- new upstream release

* Sun Apr 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.7.4-1
- new upstream release

* Fri Oct 26 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.2-1
- new upstream release

* Sun Sep 30 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.1-1
- new upstream release
- add BuildRequires: gsettings-desktop-schemas-devel

* Tue Jun 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.3-UP1-1
- initial build for Vine Linux