File dng4ps2.spec of Package dng4ps2

Name: dng4ps2
Version: 0.2.2
Release: 0
License: GNU GPL v2
Group:	Productivity/Graphics/Convertors
Summary: Convert Canon PowerShot raw files (CHDK) into DNG

BuildRequires: gcc-c++ libstdc++-devel libXMP-devel libdng-devel boost-devel dos2unix
%if 0%{?mandriva_version} > 0
BuildRequires: libwxgtk2.8-devel
%if 0%{?suse_version} >= 1140
BuildRequires: wxWidgets-devel
BuildRequires: wxGTK-devel
%if 0%{?suse_version} == 1010
BuildRequires: libexif
BuildRequires: libexif-devel 
%if 0%{?fedora_version} >= 16
BuildRequires:	jasper-libs
Source: dng4ps2-r62.tar.bz2
Patch:  dng4ps2-compile.diff
Patch1: dng4ps2-Makefile.diff
Patch2: sd990.diff
Patch3:	filelist-debug.diff
Patch4:	oldwx.diff
Patch5:	large-exif.diff

AutoReqProv: on
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Prefix: /usr

DNG for PowerShot-2 (DNG4PS-2) is free software for conversion of Canon PowerShot cameras RAW files into Digital Negative (DNG) format. 

Supported cameras: A610, A620, A630, A640, A710 IS, S2 IS, S3 IS, A700, G7, A560, A570 IS, IXUS 700, IXUS 70, IXUS 800, A720 IS, S5 IS, IXUS 950, A650 IS, A460, SD800 IS, A530, A540. 

Batch conversion RAW files into DNG (with DNG file lossless compression ability) 
Preview insertion 
Regulation folders by image date 
Import image exif data from JPEG file (date, time, ISO, focal length, etc) 
Artist name insertion into image data 
ISO calculation in AutoISO mode 
Can run from command line (only in beta) 
Translated in languages: english, norwegian, german, spanish, italian, chinese, finnish and russian

%setup -n dng4ps2-r62
%patch -p1
%patch1 -p1
%patch2 -p1
#%patch3 -p1
%if 0%{?suse_version} == 1010
%patch4 -p1
#%patch5 -p1
cat >dng4ps2.desktop << 'EOF'
[Desktop Entry]
Name=Canon PS Raw Converter dng4ps2
GenericName=Raw Image Converter
Comment=A utility to convert raw images from Canon compact cameras (CHDK) to DNG

cd src
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" %{?jobs:-j%jobs}

cd src
make install PREFIX=%{_prefix} DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir}
install -d $RPM_BUILD_ROOT/%{_datadir}/applications
install -m 0644 ../dng4ps2.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/
install -d %{buildroot}/%{_datadir}/dng4ps2/langs
install -m 0644 langs/* %{buildroot}/%{_datadir}/dng4ps2/langs/
%if 0%{?suse_version} == 1010
install -d %{buildroot}/%{_datadir}/pixmaps
install -m 0644 images/dng4ps2.png %{buildroot}/%{_datadir}/pixmaps/
install -d %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps
install -m 0644 images/dng4ps2.png %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps/
dos2unix changes_en.txt readme_en.txt

%dir %{_datadir}/dng4ps2
%doc src/changes_en.txt src/readme_en.txt src/html/*
%if 0%{?suse_version} == 1010

* Wed Mar 24 2009 -
- Canon IXUS 980 IS / PS SD990 support.
* Tue Mar 24 2009 -
- Inital package creation.