File compiz.spec of Package compiz
#
# spec file for package compiz (Version 0.7.8)
#
# Copyright (c) 2009 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
BuildRequires: Mesa-devel
BuildRequires: freeglut-devel
BuildRequires: fuse-devel
BuildRequires: gcc-c++
BuildRequires: gconf2-devel
BuildRequires: gnome-desktop-devel
BuildRequires: gtk2-devel
BuildRequires: intltool
%if 0%{suse_version} < 01120
BuildRequires: kdebase3-devel
BuildRequires: kdelibs3-devel
%endif
BuildRequires: librsvg-devel
BuildRequires: libwnck-devel
BuildRequires: libxslt-devel
BuildRequires: metacity
BuildRequires: pango-devel
BuildRequires: perl-XML-Parser
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-devel
%if "%_repository" == "SUSE_Linux_10.1" || "%_repository" == "SLE_10"
BuildRequires: xorg-x11-compat70-devel
%endif
%if 0%{suse_version} >= 01021
BuildRequires: metacity-devel
%endif
%if 0%{suse_version} > 01030
BuildRequires: gnome-control-center-devel
%endif
####
#
# 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} == 01030 || 0%{suse_version} > 1120
BuildRequires: kde4-kwin
BuildRequires: kdebase4-workspace-devel
BuildRequires: libkde4-devel
%endif
%if 0%{suse_version} <= 01030
BuildRequires: control-center2-devel
%endif
%if 0%{suse_version} >= 01120
BuildRequires: libgnome-window-settings-devel
BuildRequires: libgnomeui-devel
%endif
License: GPL v2 or later ; LGPL v2.1 or later ; MIT License (or similar)
Url: http://www.compiz.org
Group: System/GUI/Other
PreReq: %fillup_prereq
%if 0%{suse_version} <= 01100
Enhances: xgl >= git_070104
%endif
Version: 0.7.8
Release: 43.<RELEASE2>
Summary: OpenGL window and compositing manager
# To be nuked: MesaLib, patch60 $mesagl
Source: compiz-%version.tar.bz2
Source1: MesaLib-6.5.2.tar.bz2
Source2: gnome-xgl-settings-0.9.tar.gz
Source3: opensuse.png
Source4: compiz-decorator
Source5: sle.png
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch: compiz-java-config-notify.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch1: compiz-default-settings.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch4: compiz-ldpreload-indirect.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch5: compiz-no-focus-prevention-for-windows-without-decorations.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch6: compiz-scale-mode-toggle-1.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch8: compiz-core-default-plugins.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch9: compiz-kde4-decorator-rollback.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch10: compiz-kde4-paint-fix.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch11: compiz-missing-translations.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch12: compiz-kde4-decorator-update.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch13: kde-auto-comp.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch29: gnome-xgl-settings-remove-gconf.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch36: gnome-xgl-settings-hwinfo-primary-display-bno335445.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch60: Mesa-x86_64-fixes.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch61: compiz-place-fix-bnc442052.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch62: bug-449168-avoid-independent-output-painting.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch63: bug-474862-allow-moving-focus-to-fs-window.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch64: bug-475349-moveInputFocusToOtherWindow.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch65: compiz-dmx-ignore-glx.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch80: compiz-0.7.8-NOMAD.diff
# PATCH-FIX-UPSTREAM compiz-metacity-private.patch bnc#481519 dominique-obs@leuenberger.net -- Fix missing window decoration with newer metacity private (taken from upstream git)
Patch81: compiz-metacity-private.patch
# PATCH-FIX-UPSTREAM compiz-gconf_includes.patch dimstar@opensuse.org -- gtk/gnome is missing -I for the gconf2 headers.
Patch82: compiz-gconf_includes.patch
Requires: compiz-branding = %{version}
Requires: compiz-decorator = %{version}
Provides: windowmanager
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 ppc ppc64 ia64
%if "%(xft-config --prefix)" == "/usr"
%define xorg_prefix %{_prefix}
%else
%define xorg_prefix %{_prefix}/X11R6
%endif
%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
%define kde_prefix %(kde-config --prefix)
%gconf_schemas_prereq
%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
License: GPL v2 or later ; MIT License (or similar)
Summary: OpenGL window and compositing manager configuration utilities
Group: System/GUI/GNOME
Requires: %name = %version
Requires: 3ddiag
Requires: freeglut
Requires: gnome-desktop
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%{suse_version} < 01120
%package kde
License: GPL v2 or later ; MIT License (or similar)
Summary: OpenGL window and compositing managerdecorator
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
License: GPL v2 or later ; LGPL v2.1 or later ; MIT License (or similar)
Summary: OpenGL window and compositing managerdecorator for kde4
Group: System/GUI/KDE
Requires: %name = %version
Requires: kde4-kwin
Recommends: simple-ccsm-kde4
Provides: compiz-decorator = %version
%description kde4
This package contains the KDE4 window decorator for the Compiz
compositing manager.
%package devel
License: GPL v2 or later ; LGPL v2.1 or later ; MIT License (or similar)
Summary: OpenGL window and compositing manager
Group: System/GUI/Other
Requires: %name = %version
Requires: Mesa-devel
Requires: freeglut-devel
Requires: fuse-devel
Requires: gcc-c++
Requires: gconf2-devel
Requires: gtk2-devel
Requires: intltool
%if 0%{suse_version} < 01120
Requires: kdebase3-devel
Requires: kdelibs3-devel
%endif
Requires: librsvg-devel
Requires: libwnck-devel
Requires: libxml2-devel
Requires: libxslt-devel
Requires: metacity-devel
Requires: pango-devel
Requires: perl-XML-Parser
Requires: startup-notification-devel
Requires: update-desktop-files
Requires: xorg-x11-devel
%if 0%{suse_version} > 01030
Requires: gnome-control-center-devel
%endif
%if 0%{suse_version} <= 01030
Requires: control-center2-devel
%endif
%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
License: GPL v2 or later ; LGPL v2.1 or later ; MIT License (or similar)
Summary: OpenGL window and compositing manager
Group: System/GUI/Other
PreReq: /bin/ln
PreReq: /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
License: GPL v2 or later ; LGPL v2.1 or later ; MIT License (or similar)
Summary: OpenGL window and compositing manager
Group: System/GUI/Other
PreReq: /bin/ln
PreReq: /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
License: GPL v2 or later ; LGPL v2.1 or later ; MIT License (or similar)
Summary: OpenGL window and compositing manager
Group: System/GUI/Other
PreReq: /bin/ln
PreReq: /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 -c -n %name -T -a 0
cd compiz-*
%patch80 -p1
%patch81 -p1
%patch82 -p1
%patch -p1
%patch1 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%if 0%{suse_version} <= 01100
%patch9 -p1
%patch10 -p1
%endif
%patch11 -p1
if [ -f /usr/include/plasma/framesvg.h ] ; then
%patch12 -p1
fi
%patch13 -p1
#%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
%patch65 -p1
cd -
%build
#
##### Mesa
#
#if [ -f /usr/%{_lib}/libIndirectGL.so.1 ] ; then
if /bin/true ; then
mesagl="--prefix=%{_prefix}"
else
echo 1>&2 ""
echo 1>&2 "###########################################################"
echo 1>&2 "Building with statically linked Mesa for indirect rendering"
echo 1>&2 "###########################################################"
echo 1>&2 ""
pushd Mesa-*
ln -snf linux-indirect-static configs/current
make EXTRA_LIB_PATH=-L%xorg_prefix/%{_lib} \
LIB_DIR=%{_lib} \
ARCH_FLAGS="-fno-strict-aliasing %{optflags}"
popd
mesagl="--with-gl-libs=`echo %_builddir/compiz/Mesa-*/%{_lib}/libGL.a` -L%xorg_prefix/%{_lib} -lX11 -lXext -lXxf86vm -pthread -ldrm"
fi
#
##### compiz
#
pushd compiz-*
autoreconf -fi
%configure \
--disable-static \
--with-pic \
--sysconfdir=%gnome_etc \
--disable-schemas-install \
%if 0%{suse_version} < 01120
QTLIB=%{_prefix}/lib/qt3/%{_lib} \
%else
--disable-kde \
%endif
"$mesagl"
make %{?jobs:-j%jobs} CFLAGS="%{optflags}"
if [ ! -f /usr/%{_lib}/libIndirectGL.so.1 ] ; then
# sed -i -e "s@$mesagl@@g" compiz.pc
:
fi
popd
%install
pushd compiz-*
%makeinstall
#remove locale data as it is not required anymore, translations are merged in .xml and .schemas
rm -r %{buildroot}%{_datadir}/locale
popd
install -d -m 755 %{buildroot}%xorg_prefix
install -d -m 755 %{buildroot}%{_localstatedir}/adm/fillup-templates
find %{buildroot} -type f -name '*.la' -delete -print
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}/
%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/libcube.so
%{_libdir}/compiz/libdbus.so
%{_libdir}/compiz/libdecoration.so
%{_libdir}/compiz/libfade.so
%{_libdir}/compiz/libfs.so
%{_libdir}/compiz/libglx.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/libwm.so
%{_libdir}/compiz/libwobbly.so
%{_libdir}/compiz/libzoom.so
%dir %{_datadir}/compiz
%{_datadir}/compiz/icon.png
%{_datadir}/compiz/*.xml
%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/libsvg.so
%gnome_prefix/%{_lib}/window-manager-settings/libcompiz*
#%if 0%{suse_version} > 01100
#%dir %gnome_prefix/share/gnome/wm-properties
#%endif
%gnome_prefix/share/gnome/wm-properties/compiz.desktop
%if "%gnome_prefix" != "/usr"
%gnome_etc/gconf/schemas/*.schemas
%endif
%if 0%{suse_version} >= 01021
%dir %gnome_prefix/share/gnome-control-center/keybindings/
%gnome_prefix/share/gnome-control-center/keybindings/*
%endif
%if 0%{suse_version} < 01120
%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
%if 0%{suse_version} == 01030 || 0%{suse_version} > 1120
%files kde4
%defattr(-, root, root)
%{_bindir}/kde4-window-decorator
%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