A new user interface for you! Read more...

File oyranos.spec of Package oyranos

#
# spec file for package oyranos
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011-2013 Kai-Uwe Behrmann <ku.b@gmx.de>
#
# 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/
#


Version:        0.9.4
Release:        0
Source:         oyranos-%{version}.tar.bz2
%define syscolordir     /usr/share/color
%define usercolordir    ~/.config/color
%define usercolordata   ~/.local/share/color
%define iccdirname      icc
%define cmmsubpath      colour/modules
%define metasubpath     oyranos
%define settingsdirname settings
%define targetdirname   target
%define pixmapdir       /usr/share/pixmaps
%define icondir         /usr/share/icons
%define desktopdir      /usr/share/applications

Summary:        Color Management System
License:        BSD-3-Clause and GPL-2.0
Group:          Development/Libraries/Other

Name:           oyranos
Url:            http://www.oyranos.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Prefix:         %{_prefix}

Source1:        oyranos-rpmlintrc
BuildRequires:  cmake
BuildRequires:  color-filesystem
BuildRequires:  desktop-file-utils
BuildRequires:  lcms2

%if 0%{?suse_version} > 0
BuildRequires:  cairo-devel
BuildRequires:  cups-devel
BuildRequires:  doxygen
BuildRequires:  fltk
BuildRequires:  fltk-devel
BuildRequires:  gcc-c++
BuildRequires:  gettext
BuildRequires:  graphviz
BuildRequires:  libXcm-devel >= 0.5.1
BuildRequires:  libjpeg-devel
BuildRequires:  liblcms-devel
BuildRequires:  libpng-devel
BuildRequires:  libqt4-devel
BuildRequires:  libtiff-devel
BuildRequires:  libxml2-devel
BuildRequires:  netpbm
BuildRequires:  pkgconfig
BuildRequires:  xdg-utils
BuildRequires:  xorg-x11-Mesa
BuildRequires:  xorg-x11-Mesa-devel
BuildRequires:  chrpath
%endif

%if 0%{?suse_version} > 910
%endif

%if 0%{?suse_version} > 1010
BuildRequires:  Mesa
BuildRequires:  Mesa-devel
BuildRequires:  doxygen
BuildRequires:  fltk
BuildRequires:  fltk-devel
BuildRequires:  gcc-c++
BuildRequires:  gettext
BuildRequires:  graphviz
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  netpbm
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  xorg-x11
BuildRequires:  xorg-x11-devel
BuildRequires:  xorg-x11-fonts-devel
BuildRequires:  xorg-x11-libICE
BuildRequires:  xorg-x11-libICE-devel
BuildRequires:  xorg-x11-libSM
BuildRequires:  xorg-x11-libSM-devel
BuildRequires:  xorg-x11-libX11
BuildRequires:  xorg-x11-libX11-devel
BuildRequires:  xorg-x11-libXau
BuildRequires:  xorg-x11-libXau-devel
BuildRequires:  xorg-x11-libXdmcp
BuildRequires:  xorg-x11-libXdmcp-devel
BuildRequires:  xorg-x11-libXext
BuildRequires:  xorg-x11-libXext-devel
BuildRequires:  xorg-x11-libXfixes
BuildRequires:  xorg-x11-libXfixes-devel
BuildRequires:  xorg-x11-libXmu
BuildRequires:  xorg-x11-libXmu-devel
BuildRequires:  xorg-x11-libXp
BuildRequires:  xorg-x11-libXp-devel
BuildRequires:  xorg-x11-libXpm
BuildRequires:  xorg-x11-libXpm-devel
BuildRequires:  xorg-x11-libXprintUtil
BuildRequires:  xorg-x11-libXprintUtil-devel
BuildRequires:  xorg-x11-libXrender
BuildRequires:  xorg-x11-libXrender-devel
BuildRequires:  xorg-x11-libXt
BuildRequires:  xorg-x11-libXt-devel
BuildRequires:  xorg-x11-libXv
BuildRequires:  xorg-x11-libXv-devel
BuildRequires:  xorg-x11-libfontenc
BuildRequires:  xorg-x11-libfontenc-devel
BuildRequires:  xorg-x11-libs
BuildRequires:  xorg-x11-libxkbfile
BuildRequires:  xorg-x11-libxkbfile-devel
BuildRequires:  xorg-x11-proto-devel
BuildRequires:  xorg-x11-util-devel
BuildRequires:  xorg-x11-xtrans-devel
%endif

%if 0%{?suse_version} > 1130
BuildRequires:  libexiv2-devel
BuildRequires:  libraw-devel
BuildRequires:  libraw-devel-static
BuildRequires:  libyajl-devel
%endif

%if 0%{?suse_version} > 1200
BuildRequires:  libltdl-devel
%endif

%if 0%{?suse_version} > 1210
BuildRequires:  Mesa-libGLU-devel
%endif

%if 0%{?mandriva_version} > 0
BuildRequires:  Mesa
BuildRequires:  cairo-devel
BuildRequires:  cups-devel
BuildRequires:  doxygen
BuildRequires:  fltk
BuildRequires:  fltk-devel
BuildRequires:  gcc-c++
BuildRequires:  gettext
BuildRequires:  graphviz
BuildRequires:  lcms-devel
BuildRequires:  libXcm-devel >= 0.5.1
BuildRequires:  libjpeg
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libqt4-devel
BuildRequires:  libtiff-devel
BuildRequires:  libtool-devel
BuildRequires:  libxinerama-devel
BuildRequires:  libxml2-devel
BuildRequires:  libxrandr-devel
BuildRequires:  mesagl-devel
BuildRequires:  netpbm
BuildRequires:  pkgconfig
BuildRequires:  xdg-utils
BuildRequires:  xorg-x11
%endif

%if 0%{?fedora_version} > 0 && 0%{?rhel_version} < 600
BuildRequires:  LibRaw-devel
BuildRequires:  Mesa
BuildRequires:  Mesa-devel
BuildRequires:  cairo-devel
BuildRequires:  cups-devel
BuildRequires:  doxygen
BuildRequires:  exiv2-devel
BuildRequires:  fltk
BuildRequires:  fltk-devel
BuildRequires:  fltk-fluid
BuildRequires:  gcc-c++
BuildRequires:  gettext
BuildRequires:  graphviz
BuildRequires:  libXcm-devel >= 0.5.1
BuildRequires:  libXmu-devel
BuildRequires:  libXxf86vm-devel
BuildRequires:  libjpeg
BuildRequires:  libjpeg-devel
BuildRequires:  liblcms-devel
BuildRequires:  liblcms2-devel
BuildRequires:  libpng-devel
BuildRequires:  libqt4-devel
BuildRequires:  libtiff-devel
BuildRequires:  libtool
BuildRequires:  libtool-ltdl-devel
BuildRequires:  libxml2-devel
BuildRequires:  netpbm
BuildRequires:  pkgconfig
BuildRequires:  xdg-utils
BuildRequires:  xorg-x11-Mesa-devel
BuildRequires:  xorg-x11-devel
BuildRequires:  yajl-devel
%endif

%if 0%{?centos_version} >= 600
BuildRequires:  Mesa
BuildRequires:  Mesa-devel
BuildRequires:  cairo-devel
BuildRequires:  cups-devel
BuildRequires:  doxygen
BuildRequires:  exiv2-devel
BuildRequires:  gcc-c++
BuildRequires:  gettext
BuildRequires:  graphviz
BuildRequires:  libXcm-devel >= 0.5.1
BuildRequires:  libXmu-devel
BuildRequires:  libXxf86vm-devel
BuildRequires:  libjpeg
BuildRequires:  libjpeg-devel
BuildRequires:  liblcms-devel
BuildRequires:  liblcms2-devel
BuildRequires:  libpng-devel
BuildRequires:  libqt4-devel
BuildRequires:  libtiff-devel
BuildRequires:  libtool
BuildRequires:  libtool-ltdl
BuildRequires:  libtool-ltdl-devel
BuildRequires:  libxml2-devel
BuildRequires:  netpbm
BuildRequires:  pkgconfig
BuildRequires:  xdg-utils
BuildRequires:  xorg-x11-Mesa-devel
BuildRequires:  xorg-x11-devel
BuildRequires:  yajl-devel
%endif

%if 0%{?rhel_version} >= 600
BuildRequires:  Mesa
BuildRequires:  Mesa-devel
BuildRequires:  cairo-devel
BuildRequires:  cups-devel
BuildRequires:  doxygen
BuildRequires:  gcc-c++
BuildRequires:  gettext
BuildRequires:  libXcm-devel >= 0.5.1
BuildRequires:  libXmu-devel
BuildRequires:  libXxf86vm-devel
BuildRequires:  libjpeg
BuildRequires:  libjpeg-devel
BuildRequires:  liblcms2-devel
BuildRequires:  libpng-devel
BuildRequires:  libqt4-devel
BuildRequires:  libtiff-devel
BuildRequires:  libtool
BuildRequires:  libxml2-devel
BuildRequires:  libyajl2-devel
BuildRequires:  netpbm
BuildRequires:  pkgconfig
BuildRequires:  xdg-utils
BuildRequires:  xorg-x11-Mesa-devel
BuildRequires:  xorg-x11-devel
%endif

%package      -n lib%{name}0
Summary:        Color Management System Libraries
Group:          Development/Libraries/Other
# assume users want the device modules
Requires:       lib%{name}0-cups = %{version}
%if 0%{?suse_version} > 1130 || 0%{?fedora_version} > 0
Requires:       lib%{name}0-lraw = %{version}
%endif
Requires:       lib%{name}0-monitor = %{version}
# we need rgb, lab, xyz gray and cmyk profiles
# the proper names: sRGB.icc, XYZ.icc, Lab.icc are in the OpenICC-data package
Requires:       icc-profiles

%package      -n lib%{name}-devel
Summary:        Headers, Configuration and static Libs + Documentation
Group:          Development/Libraries/Other
Requires:       lib%{name}0 = %{version}
Requires:       libxml2-devel
%if 0%{?suse_version} > 1130
Requires:       libyajl-devel
%endif

%package      -n lib%{name}-alpha-devel
Summary:        Alpha and Pre Alpha Headers
Group:          Development/Libraries/Other
Requires:       lib%{name}-devel = %{version}

%package      -n lib%{name}-alpha-devel-doc
Summary:        Alpha and Pre Alpha Documentation
Group:          Development/Libraries/Other
Requires:       lib%{name}-alpha-devel = %{version}

%package      -n lib%{name}0-monitor
Summary:        Oyranos Monitor dependent Libraries
Group:          Development/Libraries/Other
Requires:       libXcm0 >= 0.5.2
Requires:       xcalib

%package      monitor
Summary:        Oyranos Monitor Tools
Group:          Development/Libraries/Other
Requires:       lib%{name}0-monitor >= %{version}

%package      profile-graph
Summary:        Profile 2D graph tool
Group:          Development/Libraries/Other

%package      -n lib%{name}0-cups
Summary:        CUPS device support
Group:          Development/Libraries/Other
Requires:       cups

%if 0%{?suse_version} > 1130 || 0%{?fedora_version} > 0
%package      -n lib%{name}0-lraw
Summary:        LibRaw device support
Group:          Development/Libraries/Other
%endif

%package      ui-fltk
Summary:        Example Configuration Panel
Group:          System/GUI/Other
Requires:       fltk

%package      qcmsevents
Summary:        Xorg Color management Event observer applet
Group:          System/Monitoring

%description
Oyranos is a colour management system.
Features:
o configuration for cross application colour agreement 
o plugable and selectable modules (known as CMM's)
o pixel conversions
o profile handling
o named colours
o device profile assignment


Authors:
--------
    Oyranos     Kai-Uwe Behrmann <www.behrmann.name>
    CUPS        Joe Simon <jsimon184@yahoo.com>
    lraw, oyRE, grantlee code generator
                Yiannis Belias <yiannisbe@gmail.com>

used components and libraries with divergine FOSS licenses:
    md5         L. Peter Deutsch
    libXNVCtrl  Nvidia
    FLMM        Matthias Melcher
    lookup3     Bob Jenkins


%description -n lib%{name}0
Oyranos is usable to store default profiles and paths and
query for profiles in that paths.
An internal device profile API allowes configuring of a 
profile in X.
The documentation in html format is included.
The object oriented Oyranos API's provide advanced access to
ICC profiles, allow for filtering profile lists and provide
a CMM independent colour conversion API. Single colour lookups 
are supported.
These API's are to be considered for changing very frequently.

%description -n lib%{name}-devel
Header files, libraries and documentation for development.
Oyranos is usable to store default profiles and paths and
query for profiles in that paths.
The documentation in html format is included.

%description -n lib%{name}-alpha-devel
Header files and libraries for development.
The object oriented Oyranos API's provide advanced access to
ICC profiles, allow for filtering profile lists and provide
a CMM independent colour conversion API. Single colour lookups 
are supported.
These API's are to be considered for changing very frequently.

%description -n lib%{name}-alpha-devel-doc
Documentation for development.
These API's are to be considered for changing very frequently.

%description  monitor
The monitor profile configuration tool.

%description  -n lib%{name}0-monitor
The monitor support libraries of the
Oyranos colour management system.

%description  profile-graph
The grapher renders a simple gamut 
hull of a ICC profile in 2D.

%description  -n lib%{name}0-cups
CUPS device support for the
Oyranos colour management system.

%if 0%{?suse_version} > 1130 || 0%{?fedora_version} > 0
%description  -n lib%{name}0-lraw
LibRaw device support for the
Oyranos colour management system.
%endif

%description  ui-fltk
The example configuration GUI.
Oyranos is a colour management system.

%description  qcmsevents
the applet shows if a colour server is running through a icon in 
the system tray.

%prep
%setup -q

%build
%configure --enable-debug
%{__make} VERBOSE=1 %{_smp_mflags} || make

%install
%make_install
rm -fr %{buildroot}/%{_datadir}/doc/%{name}
cp -av src/tools/qcmsevents/qcmsevents-applet.desktop .
cp -av extras/%{name}-profile-install.desktop .
echo 'X-SuSE-translate=true' >> qcmsevents-applet.desktop
echo 'X-SuSE-translate=true' >> %{name}-profile-install.desktop
desktop-file-install --dir=%{buildroot}/%{desktopdir} qcmsevents-applet.desktop
desktop-file-install --dir=%{buildroot}/%{desktopdir} %{name}-profile-install.desktop
mkdir -p %{buildroot}/etc/xdg/autostart/
cp -av %{name}-profile-install.desktop %{buildroot}/etc/xdg/autostart/%{name}-monitor-setup.desktop

#fix rpath issues
chrpath --delete %{buildroot}/%{_bindir}/oyranos-xforms-modules 

%find_lang %{name}       # generate a special file list

%post -n lib%{name}0 -p /sbin/ldconfig

%postun -n lib%{name}0 -p /sbin/ldconfig

%files -f %{name}.lang
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog README
%{_bindir}/%{name}-icc
%{_bindir}/%{name}-policy
%{_bindir}/%{name}-profile
%{_bindir}/%{name}-profiles
%{_bindir}/%{name}-profile-install
%{_bindir}/%{name}-xforms-modules
%{_mandir}/man1/%{name}-policy*
%{_mandir}/man1/%{name}-profile.1*
%{_mandir}/man1/%{name}-profiles.1*
%{_mandir}/man1/%{name}-profile-install.1*
%{_mandir}/man1/%{name}-xforms-modules.1*
%{pixmapdir}/oyranos_logo.*
%{pixmapdir}/lcms_logo2.png
%dir %{syscolordir}/%{settingsdirname}
%{syscolordir}/%{settingsdirname}/*.policy.xml
%{desktopdir}/%{name}-profile-install.desktop

%files -n lib%{name}0
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog README
%{_libdir}/lib%{name}_core.so.*
%{_libdir}/lib%{name}_object.so.*
%{_libdir}/lib%{name}_modules.so.*
%{_libdir}/lib%{name}_config.so.*
%{_libdir}/lib%{name}.so.*
%dir %{_libdir}/colour/
%dir %{_libdir}/%{cmmsubpath}/
%dir %{_libdir}/%{metasubpath}/
%{_libdir}/%{cmmsubpath}/lib%{name}_lcm*
%{_libdir}/%{cmmsubpath}/lib%{name}_oyra_cmm_module*
%{_libdir}/%{cmmsubpath}/lib%{name}_oicc_cmm_module*
%{_libdir}/%{cmmsubpath}/lib%{name}_oPNG_cmm_module*
%{_libdir}/%{metasubpath}/lib%{name}_oyIM_cmm_module*

%files -n lib%{name}-devel
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog README
%{_bindir}/%{name}-config
%{_libdir}/lib%{name}_core.so
%{_libdir}/lib%{name}_object.so
%{_libdir}/lib%{name}_modules.so
%{_libdir}/lib%{name}_config.so
%{_libdir}/lib%{name}.so
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/icc34.h
%{_includedir}/%{name}/oy*.h
%{_libdir}/pkgconfig/*
%dir %{_libdir}/oyranos/cmake
%{_libdir}/oyranos/cmake/*.cmake
%{_libdir}/lib%{name}_core-static.a
%{_libdir}/lib%{name}_object-static.a
%{_libdir}/lib%{name}_modules-static.a
%{_libdir}/lib%{name}_config-static.a
%{_libdir}/lib%{name}-static.a
%{_mandir}/man3/%{name}-config.3*
%{_mandir}/man3/%{name}.*
%doc doc/html

%files -n lib%{name}-alpha-devel
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog README
%dir %{_includedir}/%{name}/alpha
%{_includedir}/%{name}/alpha/%{name}_alpha.h

%files -n lib%{name}-alpha-devel-doc
%defattr(-, root, root)
%doc doc/doc_alpha/html

%files monitor
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog README
%{_bindir}/%{name}-monitor
%{_bindir}/%{name}-monitor-daemon
%{_mandir}/man1/%{name}-monitor.1*
%{_mandir}/man1/%{name}-monitor-daemon.1*
/etc/xdg/autostart/%{name}-monitor-setup.desktop

%files -n lib%{name}0-monitor
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog README
%dir %{_libdir}/colour/
%dir %{_libdir}/%{cmmsubpath}/
%{_libdir}/%{cmmsubpath}/lib%{name}_oyX1_cmm_module*
%{_libdir}/%{cmmsubpath}/lib%{name}_oydi_cmm_module*

%files -n lib%{name}0-cups
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog README
%dir %{_libdir}/colour/
%dir %{_libdir}/%{cmmsubpath}/
%{_libdir}/%{cmmsubpath}/lib%{name}_CUPS_cmm_module*

%if 0%{?suse_version} > 1130 || 0%{?fedora_version} > 0
%files -n lib%{name}0-lraw
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog README
%dir %{_libdir}/colour/
%dir %{_libdir}/%{cmmsubpath}/
%{_libdir}/%{cmmsubpath}/lib%{name}_lraw_cmm_module*
%{_libdir}/%{cmmsubpath}/lib%{name}_oyRE_cmm_module*
%endif

%files ui-fltk
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog README
%{_bindir}/%{name}-config-fl*
%{_mandir}/man1/%{name}-config-fltk.1*

%files qcmsevents
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog README
%{_bindir}/qcmsevents
%{_mandir}/man1/qcmsevents.1*
%{pixmapdir}/qcmsevents.*
%{desktopdir}/qcmsevents-applet.desktop

%files profile-graph
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog README
%{_bindir}/%{name}-profile-graph
%{_mandir}/man1/%{name}-profile-graph.1*

%changelog