File compicc.spec of Package compicc

# spec file for package compiz
# Copyright (c) 2012 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

Name:                compicc
Version:             0.8.5
Source:              compicc-0.8.5.tar.gz
Release:             0
License:             BSD-3-Clause
Group:               Productivity/Graphics/Other
%define icondir  /usr/share/ccsm/icons/hicolor/scalable/apps/
Summary:             Compiz ICC Colour Management Server
BuildRoot:           %{_tmppath}/%{name}-root
Prefix:              %{_prefix}

# for mandriva; the compiz-devel package comes not with dependencies, so fit the compiz way
%define _disable_ld_no_undefined 1

BuildRequires:       liboyranos-alpha-devel
Requires:            liboyranos0-monitor
Recommends:          oyranos-monitor
Recommends:          oyranos-monitor-nvidia
Recommends:          oyranos-qcmsevents
BuildRequires:       compiz < 0.9
Requires:            compiz < 0.9
Recommends:          compizconfig-settings-manager < 0.9

%if 0%{?suse_version} > 0
BuildRequires:       gcc-c++
BuildRequires:       doxygen
BuildRequires:       graphviz
BuildRequires:       pkgconfig
BuildRequires:       libpng-devel
BuildRequires:       libjpeg-devel
BuildRequires:       xorg-x11-Mesa
BuildRequires:       xorg-x11-Mesa-devel
BuildRequires:       xdg-utils
BuildRequires:       compiz-devel < 0.9
BuildRequires:       libXcm-devel
BuildRequires:       netpbm
BuildRequires:       libtool
%if 0%{?suse_version} > 910
BuildRequires:  bash binutils diffutils file filesystem findutils flex fontconfig fontconfig-devel freetype2 freetype2-devel gcc gcc-c++ gdbm gdbm-devel gettext gettext-devel glibc glibc-devel grep gzip make patch pkgconfig rpm sed tar util-linux zlib zlib-devel
%if 0%{?suse_version} > 1010
BuildRequires:  Mesa Mesa-devel gcc-c++ gettext doxygen graphviz pkgconfig xorg-x11-fonts-devel xorg-x11-libICE xorg-x11-libICE-devel xorg-x11-libSM xorg-x11 xorg-x11-devel xorg-x11-libSM-devel xorg-x11-libX11 xorg-x11-libX11-devel xorg-x11-libXau xorg-x11-libXau-devel xorg-x11-libXdmcp xorg-x11-libXdmcp-devel xorg-x11-libXext xorg-x11-libXext-devel xorg-x11-libXfixes xorg-x11-libXfixes-devel xorg-x11-libXmu xorg-x11-libXmu-devel xorg-x11-libXp xorg-x11-libXp-devel xorg-x11-libXpm xorg-x11-libXpm-devel xorg-x11-libXprintUtil xorg-x11-libXprintUtil-devel xorg-x11-libXrender xorg-x11-libXrender-devel xorg-x11-libXt xorg-x11-libXt-devel xorg-x11-libXv xorg-x11-libXv-devel xorg-x11-libfontenc xorg-x11-libfontenc-devel xorg-x11-libs xorg-x11-libxkbfile xorg-x11-libxkbfile-devel xorg-x11-proto-devel xorg-x11-util-devel xorg-x11-xtrans-devel
%if 0%{?mandriva_version} > 0
BuildRequires:  Mesa mesagl-devel gcc-c++ gettext doxygen graphviz pkgconfig lcms-devel xdg-utils compiz-devel libXcm-devel netpbm libtool-devel
%if 0%{?fedora_version} > 0
BuildRequires:  Mesa Mesa-devel gcc-c++ doxygen pkgconfig    xorg-x11-devel xorg-x11-Mesa-devel libXxf86vm-devel  liblcms-devel xdg-utils libXcm-devel libXrandr-devel libXinerama-devel libXmu-devel netpbm elektra-devel compiz-devel
%if 0%{?debian_version} > 0
BuildRequires: gcc-c++ gettext doxygen graphviz fltk fltk-devel libpng-devel libjpeg-devel pkgconfig xorg-x11 xorg-x11-devel xorg-x11-Mesa-devel xorg-x11-libXext xorg-x11-libXext-devel  xorg-x11-libXpm xorg-x11-libXpm-devel  libtiff-devel libxml2-devel cairo-devel liblcms-devel elektra-devel xdg-utils cups-devel libqt4-devel compiz-devel libXcm-dev netpbm

The Compiz ICC colour server, or short compicc, lets you colour manage your 
whole desktop at once and in hardware. Play movies, watch images on wide or 
narrow gamut displays. Each connected monitor is colour corrected for its own.

%setup -n %{name}-%{version}

%configure --enable-debug

make %{_smp_mflags}
make DESTDIR=%{buildroot} install-main
rm -fr %{buildroot}/%{_datadir}/doc/%{name}

# enable the plugin
test -f /usr/share/compizconfig/global.xml && (if [ "`cat /usr/share/compizconfig/global.xml | grep compicc | wc -l`" = "0" ]; then cat /usr/share/compizconfig/global.xml | sed 's/<value>core<\/value>/<value>core<\/value>\n                                        <value>compicc<\/value>/'> ccp_global.xml; mv -v ccp_global.xml /usr/share/compizconfig/global.xml; fi)
exit 0


%defattr(-, root, root)
%dir %{_libdir}/compiz/
%dir %{_datadir}/compiz/
%dir /usr/share/ccsm/
%dir /usr/share/ccsm/icons/
%dir /usr/share/ccsm/icons/hicolor/
%dir /usr/share/ccsm/icons/hicolor/scalable/
%dir %{icondir}/