File ufraw.spec of Package ufraw

# spec file for package ufraw (Version 0.18)
# 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

# norootforbuild

Name:           ufraw
BuildRequires:  gcc-c++ gimp-devel libgtkimageview-devel liblcms-devel libjpeg-devel libpng-devel libstdc++-devel libtiff-devel update-desktop-files
BuildRequires:  libexiv2-devel zlib-devel libbz2-devel libjasper-devel
BuildRequires:	lensfun-devel
# gimptool-2.0 --gimpplugindir
%define _gimpplugindir %(gimptool-2.0 --gimpplugindir)
License:        GPL v2 or later
Group:          Productivity/Graphics/Other
AutoReqProv:    on
Version:        0.19.2
Release:        6
%define vversion 0.19.2
Summary:        The Unidentified Flying Raw
Source:         %{name}-%{version}.tar.bz2
Patch:          %{name}-desktop.patch
Patch1:         %{name}-boundary.patch
Patch2:         %{name}-glibc210.patch
Patch3:		sd990.diff
Patch4:		ufraw-Makefile-opt.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       %{name}-lang = %{version}

Application to read and manipulate raw images from digital cameras. It
takes care of the color management, handles the Nikon curve formats and
has an editor for the tone curves. For batch processing of images you
can use the command-line.

    Udi Fuchs

%package -n gimp-ufraw
License:        GPL v2 or later
Summary:        Raw photo loader plugin for The GIMP
Group:          Productivity/Graphics/Other
Obsoletes:      rawphoto ufraw-gimp
Provides:       gimp-2.0-dcraw-plugin rawphoto ufraw-gimp
Enhances:       gimp-2.0
Suggests:       dcraw-gnome
AutoReqProv:    on
%if %{?gimp_api_version:1}0
Requires:       gimp(abi) = %{gimp_abi_version}
Requires:       gimp(api) = %{gimp_api_version}
%requires_eq gimp

%description -n gimp-ufraw
UFRaw is a utility to read and manipulate raw images from digital
cameras. It can be used as a GIMP plug-in. It reads raw images using
Dave Coffin's raw conversion utility DCRaw. And it supports basic color
management using Little CMS, allowing the user to apply color profiles.

    Udi Fuchs

%setup -q -n %{name}-%{vversion}
%patch2 -p1
%patch3 -p1
%patch4 -p1

%ifarch ppc64
  export CFLAGS="-m64 $RPM_OPT_FLAGS"
%ifarch %{ix86} x86_64
export dcraw_CPPFLAGS="-O3 -funroll-loops -momit-leaf-frame-pointer"
export dcraw_CPPFLAGS="-O3 -funroll-loops"
%configure --enable-contrast --enable-dst-correction --with-lensfun
make %{?jobs:-j%jobs} V=1 dcraw_CPPFLAGS="$dcraw_CPPFLAGS"

%suse_update_desktop_file -i ufraw Photography
%find_lang %name


%files lang -f %name.lang


%files -n gimp-ufraw