argyllcms/argyllcms.spec
Klaus Kämpf bd101b881b Accepting request 99876 from multimedia:photo
let's move argyllcms there, so we could use this project as devel repository for factory submission

OBS-URL: https://build.opensuse.org/request/show/99876
OBS-URL: https://build.opensuse.org/package/show/multimedia:color_management/argyllcms?expand=0&rev=1
2012-01-12 09:42:03 +00:00

172 lines
4.6 KiB
RPMSpec

#define alphaversion Beta8
#define alphatag .%{alphaversion}
%define archivename Argyll_V%{version}%{?alphaversion}_src.zip
Name: argyllcms
Version: 1.3.5
Release: 1
Summary: ICC compatible color management system
Group: System/X11/Utilities
License: GPLv3 and MIT
URL: http://www.%{name}.com/
Source0: %{url}%{archivename}
Source1: 19-color.fdi
Source2: color-device-file.policy
# Many thanks to Alastair M. Robinson and Roland Mas (debian)
Patch1: Argyll_V1.3.0_autotools.patch
# new and changed files in 1.3.5
Patch2: Argyll_V1.3.5_autotools.patch
# Patch applied for legal reasons
Patch4: argyllcms-1.0.2-legal.patch
# drop udev-acl stuff, handled by udev directly (Mandriva)
Patch5: argyllcms-1.3.0-udev151.patch
# add support for colorhug (http://hughski.com)
Patch6: ColorHug-sensor-driver.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: libtiff-devel unzip
BuildRequires: xorg-x11-devel
BuildRequires: udev
Requires: udev
%if %suse_version < 1120
BuildRequires: hal
Requires: hal
%endif
%description
The Argyll color management system supports accurate ICC profile creation for
scanners, CMYK printers, film recorders and calibration and profiling of
displays.
Spectral sample data is supported, allowing a selection of illuminants observer
types, and paper fluorescent whitener additive compensation. Profiles can also
incorporate source specific gamut mappings for perceptual and saturation
intents. Gamut mapping and profile linking uses the CIECAM02 appearance model,
a unique gamut mapping algorithm, and a wide selection of rendering intents. It
also includes code for the fastest portable 8 bit raster color conversion
engine available anywhere, as well as support for fast, fully accurate 16 bit
conversion. Device color gamuts can also be viewed and compared using a VRML
viewer.
%package doc
Summary: Argyll CMS documentation
Group: System/X11/Utilities
# Does not really make sense without Argyll CMS itself
Requires: %{name} = %{version}-%{release}
%description doc
The Argyll color management system supports accurate ICC profile creation for
scanners, CMYK printers, film recorders and calibration and profiling of
displays.
This package contains the Argyll color management system documentation.
%package -n libicc2
Summary: Libraries for icclib
Group: System/Libraries
%description -n libicc2
The icclib is a set of routines which implement the reading and
writing of color profile files that conform to the International
Color Consortium (ICC) Profile Format Specification, Version 3.4.
%package -n libicc-devel
Summary: Development libraries, header files for icclib
Group: Development/Libraries/C and C++
Requires: libicc2 = %{version}
%description -n libicc-devel
The icclib is a set of routines which implement the reading and
writing of color profile files that conform to the International
Color Consortium (ICC) Profile Format Specification, Version 3.4.
%prep
%setup -q -n Argyll_V%{version}
# Autotools support
%patch1 -p1 -b .auto
%patch2 -p1
# Legal patch required
#patch4 -p1 -b .legal
%if %suse_version >= 1120
%patch5 -p1 -b .udev151
%if %suse_version >= 1140
# colorhug is for openSUSE >= 11.4 only
%patch6 -p1
%endif
%endif
#needed by patches 1
autoreconf -i
%build
%configure
make
%install
make install DESTDIR=%{buildroot}
# remove unpackaged files
rm -f %{buildroot}/%{_libdir}/argyll/*.{la,a,so} %{buildroot}/%{_libdir}/*.{la,a}
%if %suse_version < 1120
# Do some device permission magic
install -d -m 0755 %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/
install -p -m 0644 %{SOURCE1} \
%{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/
install -d -m 0755 %{buildroot}%{_datadir}/PolicyKit/policy/
install -p -m 0644 %{SOURCE2} \
%{buildroot}%{_datadir}/PolicyKit/policy/
%else
install -d -m 0755 %{buildroot}%{_sysconfdir}/udev/rules.d
install -p -m 0644 libusb1/55-Argyll.rules \
%{buildroot}%{_sysconfdir}/udev/rules.d
%endif
%clean
rm -rf %{buildroot}
%post -n libicc2 -p /sbin/ldconfig
%postun -n libicc2 -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc *.txt
%{_bindir}/*
%{_libdir}/argyll
%dir %{_datadir}/color
%{_datadir}/color/argyll
%if %suse_version < 1120
%{_datadir}/hal/fdi/policy/10osvendor/19-color.fdi
%{_datadir}/PolicyKit/policy/color-device-file.policy
%else
%{_sysconfdir}/udev/rules.d/55-Argyll.rules
%endif
%exclude %{_datadir}/doc
%files doc
%defattr(-,root,root,-)
%doc doc/*.html doc/*.jpg doc/*.txt
%files -n libicc2
%defattr(-,root,root,-)
%{_libdir}/*.so.2*
%files -n libicc-devel
%defattr(-,root,root,-)
%{_libdir}/*.so
%{_includedir}/*
%changelog