File compiz.spec of Package compiz
#
# spec file for package compiz
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: compiz
Version: 0.8.8
Release: 0
Url: http://www.compiz.org
Requires(pre): %fillup_prereq
Summary: OpenGL window and compositing manager
License: HPND and GPL-2.0+
Group: System/GUI/Other
BuildRequires: Mesa-devel
BuildRequires: freeglut-devel
BuildRequires: fuse-devel
BuildRequires: gcc-c++
BuildRequires: intltool
BuildRequires: libgnome-desktop-2-devel
BuildRequires: librsvg-devel
BuildRequires: libwnck2-devel
BuildRequires: libxslt-devel
BuildRequires: metacity
BuildRequires: perl-XML-Parser
BuildRequires: pkg-config
BuildRequires: translation-update-upstream
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-devel
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(gconf-2.0)
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(libwnck-1.0)
BuildRequires: pkgconfig(pango)
%if "%_repository" == "SLE_10"
BuildRequires: xorg-x11-compat70-devel
%endif
BuildRequires: gnome-control-center-devel
BuildRequires: metacity-devel
####
#
# KDE4 Extension disabled for openSUSE 11.2, due to incompatibility
# with KDE 4.3 that makes the kde4-decorator crash. This has been
# fixed already in Compiz 0.8.2, which is too far from
# our package for a proper / tested backport at this time.
# Disabled by dimstar@opensuse.org
#
%if 0%{?suse_version} < 1310
BuildRequires: kde4-kwin
BuildRequires: kdebase4-workspace-devel
BuildRequires: kwin
BuildRequires: libkde4-devel
%else
Recommends: compiz-emerald
%endif
Recommends: compiz-plugins-main
#BuildRequires: libgnome-window-settings-devel
BuildRequires: libgnomeui-devel
# KWin has, since 4.11 version, dropped support for Compiz in KDecoration
# For details see http://lists.kde.org/?l=kwin&m=136335502805911&w=2 and commit c146941 in kde-workspace
%if 0%{?suse_version} > 1230
#Obsoletes: compiz-kde4
%endif
# To be nuked: MesaLib, patch60 $mesagl
Source: compiz-%{version}.tar.bz2
Source1: opensuse.png
Source2: sle.png
Source3: compiz-decorator
Source4: kde-compiz.desktop
Source5: startkde-compiz
# PATCH-FIX-UPSTREAM compiz-java-config-notify.diff dreveman@novell.com -- Java config notify workaround
Patch0: compiz-java-config-notify.diff
# PATCH-FEATURE-OPENSUSE dimstar@opensuse.org -- Compiz default settings for openSUSE
Patch1: compiz-default-settings.diff
# PATCH-FIX-UPSTREAM bnc#449168 dreveman@novell.com - Avoid independent output painting
Patch2: bug-449168-avoid-independent-output-painting.diff
# PATCH-FIX-UPSTREAM bnc#474862 dreveman@novell.com -- Allow moving focus to fs window
Patch3: bug-474862-allow-moving-focus-to-fs-window.diff
# PATCH-FIX-UPSTREAM kde-auto-comp.diff dreveman@novell.com -- unknown
Patch4: kde-auto-comp.diff
# PATCH-FIX-UPSTREAM compiz-unmanaged-window-position.patch dimstar@opensuse.org -- Fix gravity of unmanaged windows (clock applet for example)
Patch6: compiz-unmanaged-window-position.patch
# PATCH-FIX-UPSTREAM compiz-global_Region_define.patch kai-uwe.behrmann@opensuse.org -- Fix compiler irritation about X11 ::Region versus KDecorationDefines::Region
Patch7: compiz-global_Region_define.patch
# PATCH-FIX-OPENSUSE ro@suse.de -- kde-4.9 buildfix taken from gentoo
Patch8: compiz-kde-4.9.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch9: compiz-0.8.8-non-abstract-KWD-Window.patch
Requires: compiz-branding = %{version}
Requires: compiz-decorator = %{version}
Provides: windowmanager
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 ppc ppc64 ia64
%define gnome_prefix %(pkg-config --variable=prefix gnome-desktop-2.0)
%if "%gnome_prefix" == "/usr"
%define gnome_etc /etc
%else
%define gnome_etc /etc%gnome_prefix
%endif
%gconf_schemas_prereq
%define want_kde3 0
%if 0%want_kde3
%define kde_prefix %(kde-config --prefix)
%endif
Recommends: compicc < 0.9
# ccp
Recommends: libcompizconfig < 0.9
%description
Compiz is an OpenGL compositing manager that use
GLX_EXT_texture_from_drawable for binding redirected top-level windows
to texture objects. It has a flexible plug-in system and it is designed
to run well on most graphics hardware.
%package gnome
Summary: OpenGL window and compositing manager configuration utilities
License: GPL-2.0+ and HPND
Group: System/GUI/GNOME
Requires: %{name} = %{version}
Requires: 3ddiag
%if 0%{?suse_version} < 01220
Requires: freeglut
%else
Requires: Mesa-demo-x
%endif
Requires: gnome-desktop2
Requires: pciutils
%if 0%{?suse_version} <= 01100
Requires: xgl-hardware-list >= 060526
%endif
Requires: metacity >= 2.15.1
%if 0%{?suse_version} > 01030
Requires: gnome-control-center
%endif
%if 0%{?suse_version} <= 01030
Requires: control-center2
%endif
Provides: compiz-decorator = %{version}
%description gnome
This package contains Gnome based configuration utilities for the
Compiz compositing manager.
%if 0%want_kde3
%package kde
Summary: OpenGL window and compositing managerdecorator
License: GPL-2.0+ and HPND
Group: System/GUI/KDE
Requires: %{name} = %{version}
Provides: compiz-decorator = %{version}
%description kde
This package contains the KDE window decorator for the Compiz
compositing manager.
%endif
%package kde4
Summary: OpenGL window and compositing managerdecorator for kde4
License: HPND and GPL-2.0+ and LGPL-2.1+
Group: System/GUI/KDE
Requires: %{name} = %{version}
%if 0%{?suse_version} > 1130 && 0%{?suse_version} < 1310
BuildRequires: kdebase4-session
BuildRequires: kdebase4-workspace-devel
Requires: kde4-kwin
Requires: kdebase4-session
Recommends: simple-ccsm-kde4
%kde4_runtime_requires
Recommends: icc_examin
%else
Recommends: icc-examin
%endif
Recommends: kolor-manager
Provides: compiz-decorator = %{version}
%description kde4
This package contains the KDE4 window decorator for the Compiz
compositing manager.
%package devel
Summary: OpenGL window and compositing manager
License: HPND and GPL-2.0+ and LGPL-2.1+
Group: System/GUI/Other
Requires: %{name} = %{version}
Requires: Mesa-devel
Requires: freeglut-devel
Requires: fuse-devel
Requires: gcc-c++
Requires: gnome-control-center-devel
Requires: intltool
Requires: librsvg-devel
Requires: libxslt-devel
Requires: metacity-devel
Requires: perl-XML-Parser
Requires: update-desktop-files
Requires: xorg-x11-devel
Requires: pkgconfig(gconf-2.0)
Requires: pkgconfig(gtk+-2.0)
Requires: pkgconfig(libstartup-notification-1.0)
Requires: pkgconfig(libwnck-1.0)
Requires: pkgconfig(libxml-2.0)
Requires: pkgconfig(pango)
%description devel
Compiz is an OpenGL compositing manager that use
GLX_EXT_texture_from_drawable for binding redirected top-level windows
to texture objects. It has a flexible plug-in system and it is designed
to run well on most graphics hardware.
%package branding-openSUSE
Summary: OpenGL window and compositing manager
License: HPND and GPL-2.0+ and LGPL-2.1+
Group: System/GUI/Other
Requires(pre): /bin/ln
Requires(pre): /bin/rm
Requires: %{name} = %{version}
Supplements: packageand(branding-openSUSE:compiz)
Provides: compiz-branding = %{version}
%description branding-openSUSE
Compiz is an OpenGL compositing manager that use
GLX_EXT_texture_from_drawable for binding redirected top-level windows
to texture objects. It has a flexible plug-in system and it is designed
to run well on most graphics hardware.
%package branding-SLE
Summary: OpenGL window and compositing manager
License: HPND and GPL-2.0+ and LGPL-2.1+
Group: System/GUI/Other
Requires(pre): /bin/ln
Requires(pre): /bin/rm
Requires: %{name} = %{version}
Supplements: packageand(branding-SLED:compiz)
Provides: compiz-branding = %{version}
%description branding-SLE
Compiz is an OpenGL compositing manager that use
GLX_EXT_texture_from_drawable for binding redirected top-level windows
to texture objects. It has a flexible plug-in system and it is designed
to run well on most graphics hardware.
%package branding-upstream
Summary: OpenGL window and compositing manager
License: HPND and GPL-2.0+ and LGPL-2.1+
Group: System/GUI/Other
Requires(pre): /bin/ln
Requires(pre): /bin/rm
Requires: %{name} = %{version}
Supplements: packageand(branding-upstream:compiz)
Provides: compiz-branding = %{version}
%description branding-upstream
Compiz is an OpenGL compositing manager that use
GLX_EXT_texture_from_drawable for binding redirected top-level windows
to texture objects. It has a flexible plug-in system and it is designed
to run well on most graphics hardware.
%prep
%setup -q
translation-update-upstream
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch6 -p1 -R
%patch7 -p1
%patch8 -p1
%if 0%{?suse_version} > 1220
%patch9
%endif
%build
%configure \
--disable-static \
--with-pic \
--sysconfdir=%gnome_etc \
--disable-schemas-install \
--enable-gtk \
%if 0%want_kde3
--enable-kde \
%else
--disable-kde \
%endif
%if 0%{?suse_version} > 1310
--disable-metacity \
%else
--enable-metacity \
%endif
%if 0%{?suse_version} > 1230
--disable-kde4 \
%endif
QTLIB=%{_prefix}/lib/qt3/%{_lib} \
--with-default-plugins=core,ccp,compicc,png,dbus,move,place,resize,decoration,minimize,regex,annotate,wobbly,cube,expo,rotate,scale
make %{?_smp_mflags}
%install
%make_install
find %{buildroot} -type f -name '*.la' -delete -print
#remove locale data as it is not required anymore, translations are merged in .xml and .schemas
rm -r %{buildroot}%{_datadir}/locale
install -m 444 %_sourcedir/opensuse.png %{buildroot}%{_datadir}/compiz/
install -m 444 %_sourcedir/sle.png %{buildroot}%{_datadir}/compiz/
install -m 755 %_sourcedir/compiz-decorator %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_datadir}/xsessions/
%if 0%{?suse_version} < 1310
install -m 444 %_sourcedir/kde-compiz.desktop %{buildroot}%{_datadir}/xsessions/
install -m 755 %_sourcedir/startkde-compiz %{buildroot}%{_bindir}/
%endif
%find_gconf_schemas
touch %{name}.schemas_pre %{name}.schemas_preun %{name}.schemas_posttrans %{name}.schemas_list
%pre -f %{name}.schemas_pre
%preun -f %{name}.schemas_preun
%post -p /sbin/ldconfig
%post -n compiz-branding-openSUSE
/bin/ln -sf /usr/share/compiz/opensuse.png /usr/share/compiz/cube-image.png
%post -n compiz-branding-SLE
/bin/ln -sf /usr/share/compiz/sle.png /usr/share/compiz/cube-image.png
%post -n compiz-branding-upstream
/bin/ln -sf /usr/share/compiz/freedesktop.png /usr/share/compiz/cube-image.png
%postun -p /sbin/ldconfig
%postun -n compiz-branding-openSUSE
if [ -f /usr/share/compiz/cube-image.png ]; then
rm /usr/share/compiz/cube-image.png || true
fi
%postun -n compiz-branding-SLE
if [ -f /usr/share/compiz/cube-image.png ]; then
rm /usr/share/compiz/cube-image.png || true
fi
%postun -n compiz-branding-upstream
if [ -f /usr/share/compiz/cube-image.png ]; then
rm /usr/share/compiz/cube-image.png || true
fi
%posttrans -f %{name}.schemas_posttrans
%clean
rm -rf %{buildroot}
%files -f %{name}.schemas_list
%defattr(-, root, root)
%{_bindir}/compiz
%{_bindir}/compiz-decorator
%{_libdir}/libdecoration.so.*
%dir %{_libdir}/compiz
%{_libdir}/compiz/libannotate.so
%{_libdir}/compiz/libblur.so
%{_libdir}/compiz/libclone.so
%{_libdir}/compiz/libcommands.so
%{_libdir}/compiz/libcube.so
%{_libdir}/compiz/libdbus.so
%{_libdir}/compiz/libdecoration.so
%{_libdir}/compiz/libfade.so
%{_libdir}/compiz/libfs.so
%{_libdir}/compiz/libini.so
%{_libdir}/compiz/libinotify.so
%{_libdir}/compiz/libminimize.so
%{_libdir}/compiz/libmove.so
%{_libdir}/compiz/libobs.so
%{_libdir}/compiz/libplace.so
%{_libdir}/compiz/libpng.so
%{_libdir}/compiz/libregex.so
%{_libdir}/compiz/libresize.so
%{_libdir}/compiz/librotate.so
%{_libdir}/compiz/libscale.so
%{_libdir}/compiz/libscreenshot.so
%{_libdir}/compiz/libswitcher.so
%{_libdir}/compiz/libvideo.so
%{_libdir}/compiz/libwater.so
%{_libdir}/compiz/libwobbly.so
%{_libdir}/compiz/libzoom.so
%dir %{_datadir}/compiz
%{_datadir}/compiz/icon.png
%{_datadir}/compiz/*.xml
#%{_datadir}/applications/compiz.desktop
%files devel
%defattr(-, root, root)
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libdecoration.so
%dir %{_includedir}/compiz
%{_includedir}/compiz/*.h
%{_datadir}/compiz/*.xslt
%files gnome
%defattr(-, root, root)
%{_bindir}/gtk-window-decorator
%{_libdir}/compiz/libglib.so
%{_libdir}/compiz/libgconf.so
%{_libdir}/compiz/libgnomecompat.so
%{_libdir}/compiz/libsvg.so
#%gnome_prefix/%{_lib}/window-manager-settings/libcompiz*
#%gnome_prefix//share/gnome/wm-properties/compiz-wm.desktop
%if "%gnome_prefix" != "/usr"
%gnome_etc/gconf/schemas/*.schemas
%endif
#%dir %gnome_prefix/share/gnome-control-center/keybindings/
#%gnome_prefix/share/gnome-control-center/keybindings/*
%if 0%want_kde3
%files kde
%defattr(-, root, root)
%{_bindir}/kde-window-decorator
%{_libdir}/compiz/libkconfig.so
%kde_prefix/share/config/compizrc
%kde_prefix/share/config.kcfg/compiz-*
%endif
%files kde4
%defattr(-, root, root)
%if 0%{?suse_version} < 1310
%{_bindir}/kde4-window-decorator
%{_bindir}/startkde-compiz
%{_datadir}/xsessions/kde-compiz.desktop
%endif
%files branding-openSUSE
%defattr(-, root, root)
%{_datadir}/compiz/opensuse.png
%files branding-SLE
%defattr(-, root, root)
%{_datadir}/compiz/sle.png
%files branding-upstream
%defattr(-, root, root)
%{_datadir}/compiz/freedesktop.png
%changelog