# # spec file for package dcraw # # 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/ # # norootforbuild Name: dcraw Version: 9.06 Release: 1 Summary: Raw Digital Photo Decoding License: PERMISSIVE-OSI-COMPLIANT Url: http://www.cybercom.net/~dcoffin/dcraw/ Group: Productivity/Graphics/Convertors # http://www.cybercom.net/~dcoffin/dcraw/archive/dcraw-9.06.tar.gz Source0: %{name}-%{version}.tar.bz2 #*** NOTE: run "sh update_dcraw" to update to latest version of the following sources. wget, rcs and lynx are required for the update. Source1: README # http://www.cybercom.net/~dcoffin/dcraw/.badpixels Source2: badpixels Source3: http://www.cybercom.net/~dcoffin/dcraw/clean_crw.c Source4: http://www.cybercom.net/~dcoffin/dcraw/fuji_green.c Source5: http://www.cybercom.net/~dcoffin/dcraw/fujiturn.c Source6: http://www.cybercom.net/~dcoffin/dcraw/parse.c Source7: http://www.cybercom.net/~dcoffin/dcraw/rawphoto.c #*** Source100: README.SuSE Source101: update_dcraw # PATCH-FEATURE-OPENSUSE dcraw-omp.patch postadal@suse.cz -- Speed up decoding (-fomp disabled by default) Patch0: dcraw-omp.patch # PATCH-FIX-OPENSUSE dcraw.1.patch asterios.dramis@gmail.com -- Fix "macro `LO' not defined" rpm post build check warning Patch1: dcraw.1.patch # PATCH-FIX-OPENSUSE fuji_green.c_fix_gcc_warnings.patch asterios.dramis@gmail.com - Fix gcc implicit declaration warning Patch2: fuji_green.c_fix_gcc_warnings.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gettext-runtime BuildRequires: libjpeg-devel BuildRequires: liblcms-devel Recommends: %{name}-lang = %{version} %description Command line tools for raw digital photo decoding and processing. %lang_package %prep %setup -q -n %{name} cp -a %SOURCE3 %SOURCE4 %SOURCE5 %SOURCE6 . %patch0 %patch1 %patch2 %build export CFLAGS="%{optflags} -fno-strict-aliasing -fstack-protector-all" for file in *.c ; do LDFLAGS= OTHERFLAGS= if test $file = dcraw.c ; then LDFLAGS="-lm -ljpeg -llcms -DLOCALEDIR=\""%{_datadir}/locale"\"" # gcc $CFLAGS -fopenmp -o ${file%.c}-omp $file $LDFLAGS fi if test $file = fuji_green.c ; then LDFLAGS="-lm" fi gcc $CFLAGS $OTHERFLAGS -o ${file%.c} $file $LDFLAGS done # Compile with -D_16BIT to rotate 48-bit PPM images gcc $CFLAGS -D_16BIT -o fujiturn16 fujiturn.c # Build language catalogs for catsrc in dcraw_*.po ; do lang="${catsrc%.po}" lang="${lang#dcraw_}" msgfmt -o "dcraw_${lang}.mo" "$catsrc" done %install install -d -m 0755 %{buildroot}%{_bindir} install -d -m 0755 %{buildroot}%{_mandir}/man1 install -pm 0755 dcraw %{buildroot}%{_bindir}/ #install -pm 0755 dcraw-omp %{buildroot}%{_bindir}/ install -pm 0644 dcraw.1 %{buildroot}%{_mandir}/man1/ install -pm 0755 clean_crw %{buildroot}%{_bindir}/ install -pm 0755 fuji_green %{buildroot}%{_bindir}/ install -pm 0755 fujiturn %{buildroot}%{_bindir}/ install -pm 0755 fujiturn16 %{buildroot}%{_bindir}/ install -pm 0755 parse %{buildroot}%{_bindir}/dcparse # Install language catalogs for catalog in dcraw_*.mo ; do lang="${catalog%.mo}" lang="${lang#dcraw_}" install -d -m 0755 "%{buildroot}%{_datadir}/locale/${lang}/LC_MESSAGES" install -pm 0644 "$catalog" "%{buildroot}%{_datadir}/locale/${lang}/LC_MESSAGES/dcraw.mo" done # Install localized manpages for manpage in dcraw_*.1 ; do lang="${manpage%.1}" lang="${lang#dcraw_}" install -d -m 0755 "%{buildroot}%{_mandir}/${lang}/man1" install -pm 0644 "${manpage}" "%{buildroot}%{_mandir}/${lang}/man1/dcraw.1" done # Documentation cp -a %SOURCE1 %SOURCE2 %SOURCE7 %SOURCE100 . mv badpixels .badpixels %find_lang %{name} --with-man %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc .badpixels README README.SuSE rawphoto.c %{_bindir}/clean_crw %{_bindir}/dcparse %{_bindir}/dcraw %{_bindir}/fuji_green %{_bindir}/fujiturn %{_bindir}/fujiturn16 %doc %{_mandir}/man1/dcraw.1%{ext_man} %files lang -f %{name}.lang %defattr(-,root,root,-) %dir %{_mandir}/ca %dir %{_mandir}/ca/man1 %dir %{_mandir}/cs %dir %{_mandir}/cs/man1 %dir %{_mandir}/da %dir %{_mandir}/da/man1 %dir %{_mandir}/eo %dir %{_mandir}/eo/man1 %dir %{_mandir}/hu %dir %{_mandir}/hu/man1 %dir %{_mandir}/pl %dir %{_mandir}/pl/man1 %dir %{_mandir}/pt %dir %{_mandir}/pt/man1 %if 0%{?suse_version} < 1130 %dir %{_mandir}/ru %dir %{_mandir}/ru/man1 %endif %dir %{_mandir}/sv %dir %{_mandir}/sv/man1 %dir %{_mandir}/zh_CN %dir %{_mandir}/zh_CN/man1 %dir %{_mandir}/zh_TW %dir %{_mandir}/zh_TW/man1 %changelog