/[packages]/cauldron/dcraw/pristine/SPECS/dcraw.spec
ViewVC logotype

Contents of /cauldron/dcraw/pristine/SPECS/dcraw.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 53153 - (show annotations) (download)
Thu Feb 17 16:09:32 2011 UTC (13 years, 2 months ago) by ahmad
File size: 7225 byte(s)
Copying release 9.05-1mdv2011.0 to pristine/ directory.
1 %define name dcraw
2 %define version 9.05
3 %define release %mkrel 1
4
5 %define withgimp2 1
6
7 Name: %name
8 Version: %version
9 Release: %release
10 Summary: Reads the raw image formats of 279 digital cameras
11 Group: Graphics
12 URL: http://www.cybercom.net/~dcoffin/dcraw/
13 # do not use source code, but the archive tarball
14 # it contains all additional localizations
15 Source0: http://www.cybercom.net/~dcoffin/dcraw/archive/%name-%version.tar.gz
16 Source2: http://www.cybercom.net/~dcoffin/dcraw/rawphoto.c
17 Source3: http://www.cybercom.net/~dcoffin/dcraw/.badpixels
18 Source4: http://www.cybercom.net/~dcoffin/dcraw/dcraw.1.html
19 Source5: dcwrap
20 Source6: http://www.cybercom.net/~dcoffin/dcraw/parse.c
21 Source240: http://www.cybercom.net/~dcoffin/dcraw/clean_crw.c
22 Source7: fixdates.c
23 Source8: http://www.cybercom.net/~dcoffin/dcraw/decompress.c
24 Source9: pgm.c
25 Source210: http://www.cybercom.net/~dcoffin/dcraw/sony_clear.c
26 Source10: http://neuemuenze.heim1.tu-clausthal.de/~sven/crwinfo/CRWInfo-0.2.tar.bz2
27 Source11: http://www.cybercom.net/~dcoffin/dcraw/fujiturn.c
28 Source250: http://www.cybercom.net/~dcoffin/dcraw/fuji_green.c
29 Source220: renum
30 Source230: lcfile
31 # This is a copy of the dcraw home page with camera list, usage info, FAQ,
32 # ...
33 Source100: http://www.cybercom.net/~dcoffin/dcraw/dcraw.html.bz2
34 Source110: secrets.html
35 # program to read Nikon Dust Off images (NDF files)
36 Source260: read_ndf.c
37 # Remove multiple-line string constant from crwinfo.c, gcc cannot handle it
38 Patch0: crwinfo-help.patch
39 # gcc 4.x does not allow cast on left hand side of assignment
40 Patch1: dcraw-7.42-sony-clear-gcc-4.patch
41 License: Freely redistributable without restriction
42 %if %withgimp2
43 BuildRequires: libgimp-devel >= 2.0
44 %endif
45 BuildRequires: libjpeg-devel, lcms-devel
46 Buildroot: %_tmppath/%name-%version-%release-root
47
48 %description
49 Reads and processes raw images from more than 279 digital cameras.
50
51 Raw images are the data directly read from the CCD of the camera,
52 without in-camera processing, without lossy JPEG compression, and in
53 36 or 48 bits color depth (TIFF has 24 bits). Problem of the raw
54 images is that they are in proprietary, camera-specific formats as
55 once, there seems not to be a standard format for high-color-depth
56 images, and second, the raw images contain headers with information
57 about camera settings.
58
59 This is a collection of command line tools to read and convert the raw
60 image files and also to get camera setting information out of them.
61
62 This program does not download the files from the camera, it only
63 processes the already downloaded files. Depending on your camera
64 model, mount your camera as a USB mass-storage device, use GPhoto2
65 ("gtkam", "digikam", "flphoto", "gphoto2"), or a flash card reader for
66 downloading the files.
67
68
69 %if %withgimp2
70 %package gimp2.0
71 Summary: A GIMP plug-in to load raw files of digicams (GIMP 2.x)
72 Group: Graphics
73 Requires: gimp dcraw
74 Conflicts: rawphoto ufraw
75
76 %description gimp2.0
77 GIMP 2.x plug-in to load all raw image files of digital cameras
78 supported by the dcraw package. This allows direct editing of the
79 original images of the camera, without any conversion or compression
80 loss.
81 %endif
82
83 %prep
84 rm -rf $RPM_BUILD_DIR/%{name}-%{version}
85 mkdir $RPM_BUILD_DIR/%{name}-%{version}
86 %if %withgimp2
87 mkdir $RPM_BUILD_DIR/%{name}-%{version}/gimp2.0
88 %endif
89 cd $RPM_BUILD_DIR/%{name}-%{version}
90
91 %if %withgimp2
92 install -m644 %{SOURCE2} gimp2.0/rawphoto.c
93 %endif
94 install -m644 %{SOURCE3} .badpixels
95 install -m644 %{SOURCE4} dcraw.1
96 install -m644 %{SOURCE5} dcwrap
97 install -m644 %{SOURCE6} parse.c
98 install -m644 %{SOURCE240} clean_crw.c
99 install -m644 %{SOURCE7} fixdates.c
100 install -m644 %{SOURCE8} decompress.c
101 install -m644 %{SOURCE9} pgm.c
102 install -m644 %{SOURCE210} sony_clear.c
103 install -m644 %{SOURCE11} fujiturn.c
104 install -m644 %{SOURCE250} fuji_green.c
105 install -m644 %{SOURCE220} renum
106 install -m644 %{SOURCE230} lcfile
107 install -m644 %{SOURCE100} dcraw.html
108 install -m644 %{SOURCE110} secrets.html
109 install -m644 %{SOURCE260} read_ndf.c
110 #cd ljpeg_decode
111 #ln -s ../dcraw.c .
112 #cd ..
113 %setup -q -T -D -a0 -a10 -n %{name}-%{version}
114 cd CRWInfo*
115 %patch0 -p0 -b .help
116 cd ..
117 %patch1 -p0 -b .gcc4
118
119 %build
120 cd $RPM_BUILD_DIR/%{name}-%{version}
121 %setup_compile_flags
122
123 cd dcraw
124 cc ${CFLAGS:-%optflags} %{ldflags} -DLOCALEDIR='"%{_datadir}/locale/"' \
125 dcraw.c -o dcraw -lm -ljpeg -llcms
126 cd ..
127
128 # Build simple C programs
129 # fixed overlinking issues by appending -Wl,--as-needed -lm
130 for file in *.c; do
131 if [ "$file" != "dcraw.c" ]; then
132 cc ${CFLAGS:-%optflags} -o ${file%.c} $file %{ldflags} -lm
133 fi
134 done
135
136 # Build GIMP plug-in
137 %if %withgimp2
138 gimptool-2.0 --build gimp2.0/rawphoto.c
139 mv rawphoto gimp2.0
140 %endif
141
142 # Build programs provided in tarballs
143 cd CRWInfo*
144 %make
145 cd ..
146
147 #cd ljpeg_decode
148 #make
149 #cd ..
150
151 %install
152 cd $RPM_BUILD_DIR/%{name}-%{version}
153
154 rm -rf %buildroot
155
156 # Directories
157 install -d %{buildroot}%{_bindir}
158 install -d %{buildroot}%{_mandir}/man1
159 %if %withgimp2
160 install -d %{buildroot}%{_libdir}/gimp/2.0/plug-ins
161 %endif
162
163 # Program files
164 #install -m 755 ljpeg_decode/dcraw %{buildroot}%{_bindir}
165 install -m 755 dcraw/dcraw %{buildroot}%{_bindir}
166 install -m 755 decompress %{buildroot}%{_bindir}
167 install -m 755 fixdates %{buildroot}%{_bindir}
168 install -m 755 fujiturn %{buildroot}%{_bindir}
169 install -m 755 fuji_green %{buildroot}%{_bindir}
170 install -m 755 parse %{buildroot}%{_bindir}
171 install -m 755 clean_crw %{buildroot}%{_bindir}
172 install -m 755 pgm %{buildroot}%{_bindir}
173 %if %withgimp2
174 install -m 755 gimp2.0/rawphoto %{buildroot}%{_libdir}/gimp/2.0/plug-ins
175 %endif
176 install -m 755 CRWInfo*/crwinfo %{buildroot}%{_bindir}
177 install -m 755 sony_clear %{buildroot}%{_bindir}
178 install -m 755 renum %{buildroot}%{_bindir}
179 install -m 755 lcfile %{buildroot}%{_bindir}
180
181 # Documentation
182 install -m 644 .badpixels badpixels
183 install -m 644 CRWInfo*/README README.crwinfo
184 install -m 644 CRWInfo*/spec spec.crwinfo
185
186 cp dcraw/dcraw.1 %{buildroot}%{_datadir}/man/man1
187
188 # Localisations installation taken from dcraw install script
189 cd dcraw
190 for langchar in \
191 fr.latin1 it.latin1 de.latin1 pt.latin1 es.latin1 nl.latin1 sv.latin1 \
192 ca.latin1 cs.latin2 hu.latin2 pl.latin2 eo.latin3 ru.koi8-r \
193 zh_TW.big5 zh_CN.gb2312
194 do
195 lang=`echo $langchar | cut -d. -f1`
196 char=`echo $langchar | cut -d. -f2-`
197 mkdir -p -m 755 %{buildroot}/%{_datadir}/man/$lang/man1
198 if [ -f dcraw_$lang.1 ]; then
199 iconv -f utf-8 -t $char dcraw_$lang.1 > \
200 %{buildroot}/%{_datadir}/man/$lang/man1/dcraw.1
201 #mkdir -p -m 755 %{buildroot}/%{_datadir}/man/$lang.UTF-8/man1
202 #cp dcraw_$lang.1 %{buildroot}/%{_datadir}/man/$lang.UTF-8/man1/dcraw.1
203 fi
204 if [ -f dcraw_$lang.po ]; then
205 mkdir -p -m 755 %{buildroot}/%{_datadir}/locale/$lang/LC_MESSAGES
206 msgfmt -o %{buildroot}/%{_datadir}/locale/$lang/LC_MESSAGES/dcraw.mo \
207 dcraw_$lang.po
208 fi
209 done
210 mkdir -p -m 755 %{buildroot}/%{_datadir}/locale/nl/LC_MESSAGES
211 msgfmt -o %{buildroot}/%{_datadir}/locale/nl/LC_MESSAGES/dcraw.mo dcraw_nl.po
212 cd -
213
214 %find_lang %{name} --with-man
215
216 %clean
217 rm -rf %buildroot
218
219 %files -f %{name}.lang
220 %defattr(-,root,root)
221 %doc dcraw.html secrets.html badpixels README.crwinfo spec.crwinfo
222 %{_bindir}/*
223 %{_mandir}/man1/dcraw.1*
224
225 %if %withgimp2
226 %files gimp2.0
227 %defattr(-,root,root)
228 %{_libdir}/gimp/2.0/plug-ins/*
229 %endif
230
231
232

  ViewVC Help
Powered by ViewVC 1.1.30