File libXcm.spec of Package libXcm

#
# spec file for package libXcm
#
# Copyright (c) 2011 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/
#


Version:        0.4.2
Release:        1
Source:         http://downloads.sourceforge.net/projects/oyranos/libXcm/libXcm-0.4.x/libXcm-0.4.2.tar.bz2
%define pixmapdir       /usr/share/pixmaps
%define desktopdir      /usr/share/applications
Summary:        X Color Management Library

Name:           libXcm
License:        MIT
Group:          System/Libraries
Url:            http://www.oyranos.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Prefix:         %{_prefix}

%if 0%{?suse_version} > 0
BuildRequires:  gcc-c++ pkgconfig xorg-x11-Mesa xorg-x11-Mesa-devel
%endif
%if 0%{?suse_version} > 910
%endif
%if 0%{?suse_version} > 1010
BuildRequires:  Mesa Mesa-devel gcc-c++ pkgconfig xorg-x11 xorg-x11-devel xorg-x11-libX11 xorg-x11-libX11-devel xorg-x11-libXfixes xorg-x11-libXfixes-devel xorg-x11-libXmu-devel xorg-x11-libs xorg-x11-util-devel
%endif
%if 0%{?mandriva_version} > 0
BuildRequires:  Mesa gcc-c++ mesagl-devel pkgconfig
%endif
%if 0%{?fedora_version} > 0
BuildRequires:  Mesa Mesa-devel gcc-c++ libXfixes-devel libXmu-devel xdg-utils xorg-x11-Mesa-devel xorg-x11-devel xorg-x11-proto-devel xorg-x11-xtrans-devel

%endif
%if 0%{?debian_version} > 0
BuildRequires:  gcc-c++ pkgconfig xdg-utils xorg-x11 xorg-x11-Mesa-devel xorg-x11-devel
%endif

%package      -n %{name}0

Summary:        X Color Management Library
Group:          Development/Libraries/Other

%package      devel

Summary:        Headers, Configuration and static Libs + Documentation
Group:          Development/Libraries/Other
Requires:       %{name}0 = %{version}

%description
The libXcm library is colour management helper for Xorg. It contains a 
reference implementation of the net-color spec.
It allows to attach colour regions to X windows to communicate with colour
servers. A EDID parser and a observer tool are included.

%description -n %{name}0
The libXcm library is a reference implementation of the net-color spec.
It allows to attach colour regions to X windows to communicate with colour
servers. A EDID parser and a colour management event observer are included.

%description devel
The libXcm library is a reference implementation of the net-color spec.
It allows to attach colour regions to X windows to communicate with colour
servers. A EDID parser and a colour management event observer are included.
The package contains headers and other development files.



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

%build
%ifarch %arm
export CFLAGS="${RPM_OPT_FLAGS} -fPIC"
export CXXFLAGS="${RPM_OPT_FLAGS} -fPIC"
%endif
%configure --disable-static
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install-main

#Remove installed doc
rm -fr %{buildroot}/%{_datadir}/doc/%{name}

#Fix timestamp to prevent multilibs conflict
touch -r ChangeLog doc/man/*

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

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

%files -n %{name}0
%defattr(-, root, root)
%{_libdir}/%{name}.so.*

%files devel
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog README
%doc docs/net-color-spec
%{_libdir}/%{name}.so
%dir %{_includedir}/X11/Xcm
%{_includedir}/X11/Xcm/*.h
%{_libdir}/pkgconfig/xcm.pc
%{_mandir}/man3/*.3*

%changelog
openSUSE Build Service is sponsored by