%define withgimp2 1 %define abi_version 2.0 Name: dcraw Version: 9.28.0 Release: %mkrel 12 Summary: Reads the raw image formats of 279 digital cameras Group: Graphics/Photography License: Freely redistributable without restriction URL: https://www.dechifro.org/dcraw/ # do not use source code, but the archive tarball # it contains all additional localizations Source0: https://www.cybercom.net/~dcoffin/dcraw/archive/%{name}-%{version}.tar.gz Source2: https://www.dechifro.org/dcraw/rawphoto.c Source3: https://www.dechifro.org/dcraw/.badpixels # This URL is bad Source4: https://www.cybercom.net/~dcoffin/dcraw/dcraw.1.html Source5: dcwrap Source6: https://www.dechifro.org/dcraw/parse.c Source240: https://www.dechifro.org/dcraw/clean_crw.c Source7: fixdates.c Source8: https://www.dechifro.org/dcraw/decompress.c Source9: pgm.c Source210: https://www.dechifro.org/dcraw/sony_clear.c # This URL is bad Source10: http://neuemuenze.heim1.tu-clausthal.de/~sven/crwinfo/CRWInfo-0.2.tar.bz2 Source11: https://www.dechifro.org/dcraw/fujiturn.c Source250: https://www.dechifro.org/dcraw/fuji_green.c Source220: renum Source230: lcfile # This is a copy of the dcraw home page with camera list, usage info, FAQ, # ... Source100: https://www.cybercom.net/~dcoffin/dcraw/dcraw.html.bz2 Source110: secrets.html # program to read Nikon Dust Off images (NDF files) Source260: https://www.dechifro.org/dcraw/read_ndf.c # Remove multiple-line string constant from crwinfo.c, gcc cannot handle it Patch0: crwinfo-help.patch # gcc 4.x does not allow cast on left hand side of assignment Patch1: dcraw-7.42-sony-clear-gcc-4.patch Patch3: dcraw-9.27.0-CVE-2013-1438.patch # Patch from Fedora for MGA#23252 Patch4: dcraw-CVE-2018-5801.patch Patch5: dcraw-CVE-2017-13735.patch Patch6: dcraw-CVE-2017-14608.patch Patch7: dcraw-CVE-2018-19655.patch Patch8: fuji_green.c_fix_gcc_warnings.patch Patch9: iowrappers-part1.patch Patch10: iowrappers-part2.patch Patch11: dcraw-CVE-2021-3624.patch %if %{withgimp2} BuildRequires: pkgconfig(gimp-%{abi_version}) %else Obsoletes: gimp-plugin-dcraw < %{version}-%{release} %endif BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(lcms2) BuildRequires: pkgconfig(jasper) %description Reads and processes raw images from more than 279 digital cameras. Raw images are the data directly read from the CCD of the camera, without in-camera processing, without lossy JPEG compression, and in 36 or 48 bits color depth (TIFF has 24 bits). Problem of the raw images is that they are in proprietary, camera-specific formats as once, there seems not to be a standard format for high-color-depth images, and second, the raw images contain headers with information about camera settings. This is a collection of command line tools to read and convert the raw image files and also to get camera setting information out of them. This program does not download the files from the camera, it only processes the already downloaded files. Depending on your camera model, mount your camera as a USB mass-storage device, use GPhoto2 ("gtkam", "digikam", "flphoto", "gphoto2"), or a flash card reader for downloading the files. %if %{withgimp2} %package -n gimp-plugin-dcraw Summary: A GIMP plug-in to load raw files of digicams (GIMP 2.x) Group: Graphics/Photography Requires: gimp Requires: dcraw Provides: dcraw-gimp2.0 = %{version}-%{release} %description -n gimp-plugin-dcraw GIMP 2.x plug-in to load all raw image files of digital cameras supported by the dcraw package. This allows direct editing of the original images of the camera, without any conversion or compression loss. %endif %prep %setup -qc -a10 %if %{withgimp2} mkdir gimp2.0 install -m644 %{SOURCE2} gimp2.0/rawphoto.c %endif install -m644 %{SOURCE3} .badpixels install -m644 %{SOURCE4} dcraw.1 install -m644 %{SOURCE5} dcwrap install -m644 %{SOURCE6} parse.c install -m644 %{SOURCE240} clean_crw.c install -m644 %{SOURCE7} fixdates.c install -m644 %{SOURCE8} decompress.c install -m644 %{SOURCE9} pgm.c install -m644 %{SOURCE210} sony_clear.c install -m644 %{SOURCE11} fujiturn.c install -m644 %{SOURCE250} fuji_green.c install -m644 %{SOURCE220} renum install -m644 %{SOURCE230} lcfile bzcat %{SOURCE100} > dcraw.html install -m644 %{SOURCE110} secrets.html install -m644 %{SOURCE260} read_ndf.c #cd ljpeg_decode #ln -s ../dcraw.c . #cd .. pushd CRWInfo* %patch0 -p0 -b .help popd %patch1 -p0 -b .gcc4 %patch8 -p0 -b .fuji_green.c_fix_gcc_warnings %patch10 -p1 -b .iowrappers-part2 pushd dcraw %patch3 -p1 -b .CVE-2013-1438 %patch4 -p1 -b .CVE-2018-5801 %patch5 -p1 -b .CVE-2017-13735 %patch6 -p1 -b .CVE-2017-14608 %patch7 -p1 -b .CVE-2018-19655 %patch9 -p1 -b .iowrappers-part1 %patch11 -p1 -b .CVE-2021-3624 popd %build %set_build_flags cd dcraw cc ${CFLAGS:-%optflags} %{ldflags} -DLOCALEDIR='"%{_datadir}/locale/"' \ dcraw.c -o dcraw -lm -ljpeg -llcms2 -ljasper cd .. # Build simple C programs # fixed overlinking issues by appending -Wl,--as-needed -lm for file in *.c; do if [ "$file" != "dcraw.c" ]; then cc ${CFLAGS:-%optflags} -o ${file%.c} $file %{ldflags} -lm fi done # Build GIMP plug-in %if %{withgimp2} gimptool-%{abi_version} --build gimp2.0/rawphoto.c mv rawphoto gimp2.0 %endif # Build programs provided in tarballs cd CRWInfo* %make_build cd .. #cd ljpeg_decode #make #cd .. %install # Directories install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_mandir}/man1 %if %{withgimp2} install -d %{buildroot}%{_libdir}/gimp/%{abi_version}/plug-ins %endif # Program files #install -m 755 ljpeg_decode/dcraw %%{buildroot}%%{_bindir} install -m 755 dcraw/dcraw %{buildroot}%{_bindir} install -m 755 decompress %{buildroot}%{_bindir} install -m 755 fixdates %{buildroot}%{_bindir} install -m 755 fujiturn %{buildroot}%{_bindir} install -m 755 fuji_green %{buildroot}%{_bindir} install -m 755 parse %{buildroot}%{_bindir} install -m 755 clean_crw %{buildroot}%{_bindir} install -m 755 pgm %{buildroot}%{_bindir} %if %{withgimp2} install -m 755 gimp2.0/rawphoto %{buildroot}%{_libdir}/gimp/%{abi_version}/plug-ins %endif install -m 755 CRWInfo*/crwinfo %{buildroot}%{_bindir} install -m 755 sony_clear %{buildroot}%{_bindir} install -m 755 renum %{buildroot}%{_bindir} # lcfile is python2 only #install -m 755 lcfile %%{buildroot}%%{_bindir} # Documentation install -m 644 .badpixels badpixels install -m 644 CRWInfo*/README README.crwinfo install -m 644 CRWInfo*/spec spec.crwinfo install -D -m 644 dcraw/dcraw.1 %{buildroot}%{_datadir}/man/man1 pushd dcraw for lang in fr it de pt es nl sv ca cs hu pl eo ru zh_TW zh_CN da do if [ -f dcraw_$lang.po ]; then mkdir -p -m 755 %{buildroot}/%{_datadir}/locale/$lang/LC_MESSAGES msgfmt -o %{buildroot}/%{_datadir}/locale/$lang/LC_MESSAGES/dcraw.mo \ dcraw_$lang.po echo "%lang($lang) %{_datadir}/locale/$lang/LC_MESSAGES/dcraw.mo" >> ../%{name}.lang fi if [ -f dcraw_$lang.1 ]; then install -m 644 -D dcraw_$lang.1 %{buildroot}/%{_datadir}/man/$lang/man1/dcraw_$lang.1 echo "%lang($lang) %{_datadir}/man/$lang/man1/dcraw_$lang.1*" >> ../%{name}.lang fi done popd #%%find_lang %%{name} --with-man %files -f %{name}.lang %doc dcraw.html secrets.html badpixels README.crwinfo spec.crwinfo %{_bindir}/* %{_mandir}/man1/dcraw.1* %if %{withgimp2} %files -n gimp-plugin-dcraw %{_libdir}/gimp/%{abi_version}/plug-ins/* %endif %changelog * Fri Oct 13 2023 daviddavid <daviddavid> 9.28.0-12.mga10 + Revision: 1996006 - rebuild for new jasper 4.0.0 * Tue Feb 07 2023 daviddavid <daviddavid> 9.28.0-11.mga9 + Revision: 1939228 - remove old and useless ufraw and rawphoto Conflicts * Sun Feb 05 2023 daviddavid <daviddavid> 9.28.0-10.mga9 + Revision: 1938621 - re-enable gimp 2.0 plugin (mga#28914) - rename as gimp-plugin-dcraw * Tue Nov 22 2022 daviddavid <daviddavid> 9.28.0-9.mga9 + Revision: 1910121 - rebuild for new jasper 3.0.6 * Thu Apr 21 2022 ns80 <ns80> 9.28.0-8.mga9 + Revision: 1852325 - fix CVE-2018-1956[5-8], CVE-2018-580[56], CVE-2021-3624 (mga#24107) * Tue Mar 29 2022 umeabot <umeabot> 9.28.0-7.mga9 + Revision: 1831160 - Mageia 9 Mass Rebuild * Fri Jan 01 2021 luigiwalser <luigiwalser> 9.28.0-6.mga8 + Revision: 1667479 - obsolete gimp2.0 plugin - try rebuilding gimp plugin * Wed Apr 01 2020 ns80 <ns80> 9.28.0-5.mga8 + Revision: 1563910 - add Fedora patch for CVE-2018-19655 (mga#26406) * Wed Mar 04 2020 ns80 <ns80> 9.28.0-4.mga8 + Revision: 1553650 - add Fedora patches for CVE-2017-13735 and CVE-2017-14608 (mga#21757) * Mon Feb 24 2020 daviddavid <daviddavid> 9.28.0-3.mga8 + Revision: 1549958 - drop python2 only lcfile binary + umeabot <umeabot> - Mageia 8 Mass Rebuild + wally <wally> - replace deprecated %%setup_compile_flags * Sun Sep 23 2018 umeabot <umeabot> 9.28.0-2.mga7 + Revision: 1297419 - Mageia 7 Mass Rebuild * Wed Jul 04 2018 shlomif <shlomif> 9.28.0-1.mga7 + Revision: 1241670 - New version + mga#23252 * Mon Apr 16 2018 daviddavid <daviddavid> 9.27.0-2.mga7 + Revision: 1219283 - rebuild for new jasper 2.0.14 * Wed May 25 2016 luigiwalser <luigiwalser> 9.27.0-1.mga6 + Revision: 1018474 - 9.27.0 - rediff patch 3 * Sat Dec 26 2015 luigiwalser <luigiwalser> 9.26.0-1.mga6 + Revision: 915283 - 9.26.0 - update CVE-2013-1438 patch - remove CVE-2015-3885 patch (fixed upstream) * Tue May 12 2015 shlomif <shlomif> 9.22-4.mga5 + Revision: 821937 - Add the patch for MGA#15910 - integer overflow. * Wed Oct 15 2014 umeabot <umeabot> 9.22-3.mga5 + Revision: 748331 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 9.22-2.mga5 + Revision: 678695 - Mageia 5 Mass Rebuild * Wed Jul 02 2014 luigiwalser <luigiwalser> 9.22-1.mga5 + Revision: 642314 - 9.22 * Thu Jun 05 2014 luigiwalser <luigiwalser> 9.21-1.mga5 + Revision: 633285 - 9.21 * Sat Feb 15 2014 luigiwalser <luigiwalser> 9.20-1.mga5 + Revision: 592314 - remove no longer needed lcms2 patch - 9.20 * Thu Dec 26 2013 luigiwalser <luigiwalser> 9.19-3.mga4 + Revision: 560818 - add patches from fedora to build against lcms2 and fix CVE-2013-1438 * Sat Oct 19 2013 umeabot <umeabot> 9.19-2.mga4 + Revision: 529010 - Mageia 4 Mass Rebuild * Sun Jun 30 2013 luigiwalser <luigiwalser> 9.19-1.mga4 + Revision: 448609 - 9.19 - incorporate some spec changes from mdv/rosa/omdv * Sun Mar 17 2013 lmenut <lmenut> 9.12-4.mga3 + Revision: 403598 - rebuild for new rpm-mageia-setup do not own man lang directories (mga #9055) * Thu Jan 24 2013 fwang <fwang> 9.12-3.mga3 + Revision: 391807 - update rpm group + umeabot <umeabot> - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Thu Jan 12 2012 doktor5000 <doktor5000> 9.12-1.mga2 + Revision: 195450 - new version 9.12 - updated dcraw.1.html - updated parse.c - add URL for read_ndf.c - removed empty %%clean section and empty %%defattrs * Fri Nov 18 2011 pterjan <pterjan> 9.11-1.mga2 + Revision: 168820 - Update to 9.11 * Thu Sep 08 2011 tv <tv> 9.10-1.mga2 + Revision: 141509 - new release - build with jasper support - uncompress html doc * Thu Feb 17 2011 ahmad <ahmad> 9.06-1.mga1 + Revision: 53331 - update to 9.06 - imported package dcraw * Tue Dec 21 2010 Götz Waschk <waschk@mandriva.org> 9.05-1mdv2011.0 + Revision: 623628 - update to new version 9.05 * Mon Aug 09 2010 Funda Wang <fwang@mandriva.org> 9.04-1mdv2011.0 + Revision: 568053 - new version 9.04 * Sun Jan 10 2010 Oden Eriksson <oeriksson@mandriva.com> 8.96-2mdv2010.1 + Revision: 488744 - rebuilt against libjpeg v8 * Sun Aug 23 2009 Frederik Himpe <fhimpe@mandriva.org> 8.96-1mdv2010.0 + Revision: 419909 - update to new version 8.96 - update to new version 8.95 * Sat Aug 15 2009 Oden Eriksson <oeriksson@mandriva.com> 8.93-3mdv2010.0 + Revision: 416649 - rebuilt against libjpeg v7 * Sun Aug 09 2009 Oden Eriksson <oeriksson@mandriva.com> 8.93-2mdv2010.0 + Revision: 413343 - rebuild * Sun Mar 22 2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 8.93-1mdv2009.1 + Revision: 360202 - Updated to version 8.93 - Make sure we enable internationalization defining LOCALEDIR in dcraw build. - Provide main dcraw man page. * Thu Nov 13 2008 Frederic Crozat <fcrozat@mandriva.com> 8.88-1mdv2009.1 + Revision: 302685 - Release 8.88 - a lot of specfile cleanup and improvement from Florian Hubold * Mon Jun 16 2008 Thierry Vignaud <tv@mandriva.org> 8.80-2mdv2009.0 + Revision: 220577 - rebuild - fix spacing at top of description - kill re-definition of %%buildroot on Pixel's request + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Sun Nov 18 2007 Giuseppe Ghibò <ghibo@mandriva.com> 8.80-1mdv2008.1 + Revision: 109824 - Release 8.80. * Sat Sep 15 2007 Adam Williamson <awilliamson@mandriva.org> 8.61-2mdv2008.0 + Revision: 85822 - oops, correct fix for doc install failure - fix installation of .badpixels - correct buildrequires - rebuild for 2008 - new doc policy (don't use a versioned directory) - Fedora license policy * Sun Feb 25 2007 Emmanuel Andry <eandry@mandriva.org> 8.61-1mdv2007.0 + Revision: 125628 - New version 8.61 - uncompress patches - change number of supported cameras to 254 - Import dcraw * Fri Aug 25 2006 Till Kamppeter <till@mandriva.com> 8.31-2mdv2007.0 - Shortened the package description. * Wed Aug 23 2006 Till Kamppeter <till@mandriva.com> 8.31-1mdv2007.0 - Updated to version 8.31 (Many new cameras supported). - Also updated: rawphoto.c, dcraw.1, parse.c, dcraw.html * Sat May 13 2006 Till Kamppeter <till@mandriva.com> 8.15-2mdk - Rebuild. * Sat May 13 2006 Till Kamppeter <till@mandriva.com> 8.15-1mdk - Updated to version 8.15 (New cameras supported, including Canon EOS 30D). - Also updated: parse.c dcraw.html, dcraw.1 * Sat May 13 2006 Till Kamppeter <till@mandriva.com> 8.03-3mdk - Rebuild to make Cooker consistent again. * Sat May 13 2006 Stefan van der Eijk <stefan@eijk.nu> 8.03-2mdk - rebuild for sparc * Fri Feb 03 2006 Till Kamppeter <till@mandriva.com> 8.03-1mdk - Updated to version 7.49 (New cameras supported, including Sony DSC R1, Pentax *istDL, Olympus E-500, Canon EOS 5D; Color management based on LittleCMS). - Also updated: rawphoto.c, parse.c dcraw.html, dcraw.1 - Re-introduced GIMP plug-in, it builds again. - Introduced %%mkrel. * Sat Sep 03 2005 Till Kamppeter <till@mandriva.com> 7.49-2mdk - Removed unneeded "Requires: ". - Removed GIMP plug-in. Does not build any more and there are several better ones around (ex.: ufraw). * Mon Aug 15 2005 Till Kamppeter <till@mandriva.com> 7.49-1mdk - Updated to version 7.49 (New cameras supported, including Minolta Alpha/Dynax/Maxxum 5D and Olympus C770UZ). - Updated also: rawphoto, parse. * Mon Jul 18 2005 Till Kamppeter <till@mandriva.com> 7.42-1mdk - Updated to version 7.42 (New cameras supported, including Nikon D50). - Updated also: parse. - Removed restriction on using gcc 3.x, it works with gcc 4.x now. - Patch1 to make sony_clear working with gcc 4.x. * Sun May 15 2005 Till Kamppeter <till@mandriva.com> 7.21-1mdk - Updated to version 7.21 (New cameras supported, including Canon EOS 350D). - Updated also: .badpixels, parse, fujiturn. - Still some compatibility issues with GCC 4.x, using 3.x for now. * Fri Apr 22 2005 Till Kamppeter <till@mandriva.com> 7.14-1mdk - Updated to version 7.14 (Many new cameras, support for the Adobe Digital Negative format, DNG). - Updated also: rawphoto, parse. * Mon Mar 07 2005 Till Kamppeter <till@mandrakesoft.com> 6.35-2mdk - Added "Conflicts: ufraw" to the GIMP 2 plugin package. * Mon Mar 07 2005 Till Kamppeter <till@mandrakesoft.com> 6.35-1mdk - Updated to version 6.35. - Updated also: parse. - Updated to "Requires: jpeg-progs". - Updated to "Requires: gimp" (it is every day changing). * Fri Feb 11 2005 Till Kamppeter <till@mandrakesoft.com> 6.34-1mdk - Updated to version 6.34. - Updated also: dcwrap, parse, rawphoto. * Sat Jan 15 2005 Couriousous <couriousous@mandrake.org> 6.18-2mdk - Fix gimp requires * Fri Dec 17 2004 Till Kamppeter <till@mandrakesoft.com> 6.18-1mdk - Updated to version 6.18 (New cameras supported, especially all recent DSLRs). * Wed Sep 08 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 0.20040813-2mdk - add BuildRequires: libjpeg-devel * Sat Aug 14 2004 Till Kamppeter <till@mandrakesoft.com> 0.20040813-1mdk - Updated to the state of 13/08/2004 (More camera models supported). - Removed support for GIMP 1.x as dcraw is in main and GIMP 1.x in contrib. * Wed May 12 2004 Till Kamppeter <till@mandrakesoft.com> 0.20040511-1mdk - Updated to the state of 11/05/2004 (Many new camera models supported). * Thu Mar 25 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.20040317-2mdk - rebuild for gimp2 * Wed Mar 17 2004 Till Kamppeter <till@mandrakesoft.com> 0.20040317-1mdk - Updated to the state of 15/12/2003 (Many new camera models supported, GIMP 2.0 support, some new tools added).