1 # 2 # spec file for package SUNWdcraw 3 # 4 # Copyright 2008 Sun Microsystems, Inc. 5 # This file and all modifications and additions to the pristine 6 # package are under the same license as the package itself. 7 # 8 %define owner bnitz 9 # 10 11 %include Solaris.inc 12 13 %define OSR 8098:8.81 14 15 Name: SUNWdcraw 16 Summary: dcraw - Decoding RAW digital photos 17 URL: http://www.cybercom.net/~dcoffin/dcraw/ 18 Version: 8.95 19 SUNW_BaseDir: %{_basedir} 20 SUNW_Copyright: %{name}.copyright 21 Source: http://cybercom.net/~dcoffin/dcraw/archive/dcraw-%{version}.tar.gz 22 # date:2008-02-22 owner:fujiwara type:bug bugster:6666520 23 Patch1: dcraw-01-locale-h.diff 24 SUNW_BaseDir: %{_basedir} 25 BuildRoot: %{_tmppath}/%{name}-%{version}-build 26 %include default-depend.inc 27 Requires: SUNWlibmsr 28 Requires: SUNWjpg 29 Requires: SUNWlcms 30 BuildRequires: SUNWlcms 31 BuildRequires: SUNWgnome-common-devel 32 33 %if %build_l10n 34 %package l10n 35 Summary: %{summary} - l10n files 36 SUNW_BaseDir: %{_basedir} 37 %include default-depend.inc 38 Requires: %{name} 39 %endif 40 41 %prep 42 %setup -q -c -n %{name}-%{version} 43 cd dcraw 44 %patch1 -p1 45 cd .. 46 47 %build 48 cd dcraw 49 # There's no Makefiles - it's just a single .c file 50 export CFLAGS="%optflags `pkg-config --cflags lcms` -o dcraw -lm -ljpeg `pkg-config --libs lcms`" 51 export CFLAGS="$CFLAGS -DLOCALEDIR=\"%{_datadir}/locale\"" 52 ${CC} $CFLAGS dcraw.c 53 54 %install 55 rm -rf $RPM_BUILD_ROOT 56 mkdir $RPM_BUILD_ROOT 57 mkdir -p $RPM_BUILD_ROOT%{_bindir} 58 cd dcraw 59 cp dcraw $RPM_BUILD_ROOT%{_bindir} 60 61 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 62 cp dcraw.1 $RPM_BUILD_ROOT%{_mandir}/man1 63 64 %if %build_l10n 65 for po in dcraw_*.po 66 do 67 lang=`basename $po .po | sed -e 's/^dcraw_//'` 68 mkdir -p -m 755 $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES 69 msgfmt -o $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/dcraw.mo dcraw_$lang.po 70 done 71 %endif 72 73 %clean 74 rm -rf $RPM_BUILD_ROOT 75 76 %files 77 %defattr(-, root, bin) 78 %dir %attr (0755, root, bin) %{_bindir} 79 %{_bindir}/dcraw 80 %dir %attr (0755, root, sys) %{_datadir} 81 %dir %attr (0755, root, bin) %{_mandir} 82 %dir %attr (0755, root, bin) %{_mandir}/man1 83 %{_mandir}/man1/dcraw.1 84 85 %if %build_l10n 86 %files l10n 87 %defattr(-, root, other) 88 %dir %attr(0755, root, sys) %{_datadir} 89 %{_datadir}/locale/* 90 %endif 91 92 %changelog 93 * Thu Oct 22 2009 - harry.lu@sun.com 94 * Remove "in Linux" from summary 95 * Wed Aug 12 2009 - christian.kelly@sun.com 96 - Bump to 8.95. 97 * Tue Sep 23 2008 - dave.lin@sun.com 98 - Remove %{_datadir}/doc since it doesn't exist. 99 * Fri May 16 2008 - damien.carbery (at] sun.com 100 - Use pkg-config to determine CFLAGS and LIBS for lcms. 101 * Fri Feb 22 2008 - takao.fujiwara (at] sun.com 102 - Add dcraw-01-locale-h.diff to avoid build errors. 103 * Mon Feb 18 2008 - damien.carbery (at] sun.com 104 - Set %attr for %_datadir in l10n package. 105 * Fri Feb 15 2008 - dermot.mccluskey (at] sun.com 106 - put l10n files in optionally build -l10n pkg 107 - use CC and CFLAGS to compile 108 * Tue Feb 12 2008 - dermot.mccluskey (at] sun.com 109 - initial version 110 111