Name:          muffin
Version:       3.8.3
Release:       1%{?dist}
Summary:       Window and compositing manager based on Clutter

License:       GPLv2+
URL:           https://github.com/linuxmint/
Source0:       %{url}/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:       muffin-adwaita.txt

Patch0:        remove_muffin_binary.patch

BuildRequires: pkgconfig(clutter-1.0) >= 1.7.5
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(libcanberra)
BuildRequires: pkgconfig(cinnamon-desktop) >= 3.8.0
BuildRequires: pkgconfig(gnome-doc-utils)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: zenity
# Bootstrap requirements
BuildRequires: pkgconfig(gtk-doc)
BuildRequires: gnome-common
BuildRequires: intltool

Requires: dbus-x11
Requires: zenity
Requires(postun): /sbin/ldconfig

%description
Muffin is a window and compositing manager that displays and manages
your desktop via OpenGL. Muffin combines a sophisticated display engine
using the Clutter toolkit with solid window-management logic inherited
from the Metacity window manager.

Muffin is very extensible via plugins, which
are used both to add fancy visual effects and to rework the window
management behaviors to meet the needs of the environment.

%package devel
Summary: Development package for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}


%description devel
Header files and libraries for developing Muffin plugins. Also includes
utilities for testing Metacity/Muffin themes.

%prep
%autosetup -p1

NOCONFIGURE=1 ./autogen.sh

%build
%configure --disable-static \
           --enable-compile-warnings=minimum

sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool

%make_build V=1

%install
%make_install

# Create a dummy themes directory so that cinnamon settings will see
# the Adwaita fallback theme which has been removed from gnome-themes-standard
mkdir -p %{buildroot}/%{_datadir}/themes/Adwaita/metacity-1/
cp %{SOURCE1} %{buildroot}/%{_datadir}/themes/Adwaita/metacity-1/

#Remove libtool archives.
find %{buildroot} -name '*.la' -exec rm -f {} ';'

%find_lang %{name}

%post
/sbin/ldconfig
if [ $1 -eq 0 ] ; then
	/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi

%posttrans
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :

%postun -p /sbin/ldconfig

%files -f %{name}.lang
%doc README AUTHORS NEWS HACKING doc/theme-format.txt
%license COPYING
%{_libdir}/libmuffin.so.*
%{_libdir}/muffin/
%exclude %{_libdir}/muffin/Meta-Muffin.0.gir
%dir %{_datadir}/muffin/
%{_datadir}/muffin/theme/
%{_datadir}/glib-2.0/schemas/org.cinnamon.muffin.gschema.xml
%{_datadir}/themes/Adwaita/metacity-1/

%files devel
%{_bindir}/muffin-theme-viewer
%{_bindir}/muffin-window-demo
%{_datadir}/muffin/icons/
%{_datadir}/gtk-doc/html/muffin/
%{_includedir}/muffin/
%{_libdir}/libmuffin.so
%{_libdir}/muffin/Meta-Muffin.0.gir
%{_libdir}/pkgconfig/*
%{_mandir}/man1/muffin-*

%changelog
* Fri Sep 21 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.8.3-1
- Update to 3.8.3 release

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Fri Jun 08 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.8.2-1
- Update to 3.8.2 release

* Sun May 06 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.8.1-1
- Update to 3.8.1 release

* Fri Apr 20 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.8.0-1
- Update to 3.8.0 release

* Sun Mar 04 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.6.1-0.2.20180304giteeb19df
- update to git snapshot

* Thu Feb 15 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.6.1-0.1.20180209git441939a
- update to git snapshot

* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Tue Oct 24 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.6.0-1
- update to 3.6.0 release

* Wed Aug 30 2017 Björn Esser <besser82@fedoraproject.org> - 3.4.1-3
- Fix invocation of `/sbin/ldconfig`

* Wed Aug 30 2017 Björn Esser <besser82@fedoraproject.org> - 3.4.1-2
- Adjustments for EPEL7

* Wed Aug 09 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.4.1-1
- update to 3.4.1 release

* Mon Jul 31 2017 Florian Weimer <fweimer@redhat.com> - 3.4.0-4
- Rebuild with binutils fix for ppc64le (#1475636)

* Thu Jul 27 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.4.0-3
- Add build requires mesa-libGL-devel

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Wed May 03 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.4.0-1
- update to 3.4.0 release

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Nov 23 2016 leigh scott <leigh123linux@googlemail.com> - 3.2.1-1
- update to 3.2.1 release
- remove ibus patch (fixed upstream)

* Mon Nov 07 2016 Leigh Scott <leigh123linux@googlemail.com> - 3.2.0-1
- update to 3.2.0 release

* Fri Jun 24 2016 Leigh Scott <leigh123linux@googlemail.com> - 3.0.5-1
- update to 3.0.5 release

* Mon Jun 13 2016 Leigh Scott <leigh123linux@googlemail.com> - 3.0.4-2
- Fix window size issue

* Sun May 22 2016 Leigh Scott <leigh123linux@googlemail.com> - 3.0.4-1
- update to 3.0.4 release

* Mon May 16 2016 Leigh Scott <leigh123linux@googlemail.com> - 3.0.2-1
- update to 3.0.2 release

* Sat May 07 2016 leigh <leigh123linux@googlemail.com> - 3.0.0-3
- make adwaita show in cinnamon-settings theme (Joseph Wang)

* Fri May 06 2016 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-2
- fix cinnamon crash

* Sun Apr 24 2016 Leigh Scott <leigh123linux@googlemail.com> - 3.0.0-1
- update to 3.0.0 release

* Wed Mar 09 2016 Leigh Scott <leigh123linux@googlemail.com> - 2.8.5-1
- update to 2.8.5 release

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Sat Nov 21 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.8.4-1
- update to 2.8.4 release

* Mon Nov 09 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.8.2-2
- rebuilt

* Mon Nov 09 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.8.2-1
- update to 2.8.2 release

* Thu Oct 22 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.8.1-1
- update to 2.8.1 release

* Fri Oct 16 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.8.0-1
- update to 2.8.0 release

* Sun Oct 11 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.6.1-3
- add mtwebster's nvidia sync fixes

* Tue Jun 16 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.6.1-2
- fix packaging error (bz 1230988)

* Sun May 31 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.6.1-1
- update to 2.6.1 release

* Wed May 20 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.6.0-1
- update to 2.6.0 release

* Tue May 05 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.5.0-0.2.git5e7b945
- update to git snapshot

* Tue May 05 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.5.0-0.1.gita25a885
- update to git snapshot

* Thu Apr 02 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.4.5-2
- bump release

* Tue Mar 31 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.4.5-1
- update to 2.4.5

* Mon Feb 02 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.4.4-1
- update to 2.4.4
- drop upstream patches

* Thu Jan 29 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.4.3-4
- more CSD fixes

* Tue Jan 27 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.4.3-3
- more CSD fixes
- edit description
- add CSD fixes to f20 as well

* Fri Jan 23 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.4.3-2
- fix CSD tiling for F21+

* Fri Jan 16 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.4.3-1
- update to 2.4.3

* Sun Nov 23 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.4.2-1
- update to 2.4.2

* Sat Nov 08 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.4.1-1
- update to 2.4.1

* Fri Oct 31 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.4.0-1
- update to 2.4.0

* Thu Oct 02 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.4.0-0.2.gitd9f4fcd
- update to latest git

* Tue Sep 30 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.4.0-0.1.gita9a68ed
- update to latest git

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Tue Jul 22 2014 Kalev Lember <kalevlember@gmail.com> - 2.2.6-2
- Rebuilt for gobject-introspection 1.41.4

* Fri Jun 27 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.2.6-1
- update to 2.2.6

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 21 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.2.5-1
- update to 2.2.5

* Tue May 20 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.2.4-1
- update to 2.2.4

* Thu May 15 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.2.3-3
- patch to remove unused binaries to clean debug package
  
* Wed May 14 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.2.3-2
- remove unused binaries (bz 1097542)

* Sun May 11 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.2.3-1
- update to 2.2.3

* Fri May 02 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.2.2-1
- update to 2.2.2

* Mon Apr 14 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.2.1-1
- update to 2.2.1

* Sat Apr 12 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.2.0-1
- update to 2.2.0

* Fri Apr 11 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.0.5-5
- revert ibus commit (bz 1082118)

* Thu Feb 20 2014 Kalev Lember <kalevlember@gmail.com> - 2.0.5-4
- Rebuilt for cogl soname bump

* Mon Feb 10 2014 Peter Hutterer <peter.hutterer@redhat.com> - 2.0.5-3
- Rebuild for libevdev soname bump

* Thu Feb 06 2014 Leigh Scott <leigh123linux@googlemail.com> - 2.0.5-2
- rebuilt for new cogl .so version

* Sun Nov 24 2013 Leigh Scott <leigh123linux@googlemail.com> - 2.0.5-1
- update to 2.0.5

* Sun Nov 10 2013 Leigh Scott <leigh123linux@googlemail.com> - 2.0.4-1
- update to 2.0.4

* Thu Oct 24 2013 Leigh Scott <leigh123linux@googlemail.com> - 2.0.3-1
- update to 2.0.3

* Fri Oct 18 2013 Leigh Scott <leigh123linux@googlemail.com> - 2.0.2-1
- update to 2.0.2

* Wed Oct 09 2013 Leigh Scott <leigh123linux@googlemail.com> - 2.0.1-1
- update to 2.0.1

* Mon Oct 07 2013 Leigh Scott <leigh123linux@googlemail.com> - 2.0.0-1
- update to 2.0.0

* Mon Sep 30 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.9.1-1
- update to 1.9.1

* Mon Sep 16 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.3-0.6.gitc13a698
- update to latest git

* Sun Aug 25 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.3-0.5.git6ead0af
- update to latest git
- Change buildrequires to cinnamon-desktop-devel
- drop upstream patch

* Thu Aug 22 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.3-0.4.git9611aa2
- rebuilt

* Fri Aug 09 2013 Kalev Lember <kalevlember@gmail.com> - 1.8.3-0.3.git9611aa2
- Rebuilt for cogl 1.15.4 soname bump

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.3-0.2.git9611aa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Tue Jul 23 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.3-0.1.git9611aa2
- rebase for muffin next

* Fri Jun 14 2013 leigh scott <leigh123linux@googlemail.com> - 1.8.2-2
- patch to fix bzr 957421

* Mon May 20 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.2-1
- Update to version 1.8.2
- drop merged patch

* Tue May 14 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.1-2
- add patch to fix dnd issue

* Sun May 12 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.1-1
- Update to version 1.8.1

* Thu May 09 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.0-3
- fix alt-tab keybinding

* Thu May 09 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.8.0-2
- revert some of the previous changes

* Wed May 08 2013 Dan Mashal <dan.mashal@fedoraproject.org> - 1.8.0-1
- Update to version 1.8.0

* Thu Feb 21 2013 Kalev Lember <kalevlember@gmail.com> - 1.1.2-3
- Rebuilt for cogl soname bump

* Fri Jan 25 2013 Leigh Scott <leigh123linux@googlemail.com> - 1.1.2-2
- rebuilt for new cogl .so version

* Wed Oct 24 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.1.2-1
- update to 1.1.2 release
- change build requires style

* Thu Sep 27 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.1.1-1
- update to 1.1.1 release

* Tue Sep 18 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.1.0-2
- rebuild

* Mon Sep 17 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.1.0-1
- update to 1.1.0 release
- drop cogl patch

* Fri Aug 17 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.6-4
- rebuilt for new cogl version
- patch for new cogl api

* Tue Aug 14 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.6-3
- update scriptlets
- move gir file to devel

* Tue Aug 14 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.6-2
- Fix unused-direct-shlib-dependency rpmlint warnings
- remove .gz extension from the man files

* Thu Jul 26 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.6-1
- update to 1.0.6 release

* Wed Jul 18 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.4-0.1.gitfcea2f1
- update to latest git snapshot
- drop patch
- remove gconf bits

* Mon May 28 2012 leigh scott <leigh123linux@googlemail.com> - 1.0.3-3
- add patch to fix black border issue

* Mon May 28 2012 leigh scott <leigh123linux@googlemail.com> - 1.0.3-2
- rebuilt

* Sat May 05 2012 leigh scott <leigh123linux@googlemail.com> - 1.0.3-1
- update to 1.0.3

* Wed Mar 14 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.2-2
- rebuilt

* Tue Mar 13 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.2-1
- update to 1.0.2

* Mon Mar 12 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.1-1
- update to 1.0.1 

* Mon Mar 12 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.0-3
- patch for gtk and cogl changes

* Thu Feb 02 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.0-2
- make review changes

* Wed Jan 04 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.0.0-1
- initial package based on fedora mutter srpm
