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

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

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

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

BuildRequires:	gtk3-devel >= 3.3.3
BuildRequires:	clutter-devel >= 1.7.5
BuildRequires:	cairo-devel >= 1.10.0
BuildRequires:	GConf2-devel >= 2.14.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:	zenity
BuildRequires:	gnome-doc-utils

Requires(post,pre,preun): GConf2

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 -n linuxmint-muffin-010e441

%build
%configure --disable-static --enable-compile-warnings=minimum
make %{?_smp_mflags} 

%install
rm -rf $RPM_BUILD_ROOT
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
make install DESTDIR=$RPM_BUILD_ROOT
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

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

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/muffin.schemas > /dev/null || :

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


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc README NEWS COPYING AUTHORS
%{_sysconfdir}/gconf/schemas/muffin.schemas
%{_bindir}/muffin
%{_bindir}/muffin-message
%{_bindir}/muffin-theme-viewer
%{_bindir}/muffin-window-demo
%{_libdir}/libmuffin.so.*
%{_libdir}/%{name}/Meta-3.0.typelib
%{_libdir}/%{name}/plugins
%{_datadir}/applications/muffin.desktop
%{_datadir}/gnome/wm-properties/muffin-wm.desktop
%{_datadir}/%{name}/icons/muffin-window-demo.png
%{_mandir}/man1/*.1.gz

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


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