3 %bcond_without openmp # OpenMP support
4 %bcond_without gpl2 # GPL v2+ demosaic pack
5 %bcond_without gpl3 # GPL v3+ demosaic pack
6 %bcond_without zlib # ZLIB for deflated DNG format support
11 Summary: LibRaw - a library for reading RAW files
12 Summary(pl.UTF-8): LibRaw - biblioteka do odczytu plików RAW
15 %define demosaic_ver 0.18.8
23 License: LGPL v2.1 or CDDL v1.0
27 #Source0Download: http://www.libraw.org/download#stable
28 Source0: https://www.libraw.org/data/LibRaw-%{version}.tar.gz
29 # Source0-md5: b7b65b3f05f4b4b570b07799b1a5a467
30 Source1: https://www.libraw.org/data/LibRaw-demosaic-pack-GPL2-%{demosaic_ver}.tar.gz
31 # Source1-md5: 68b821b4a72054d0c0908e4d7b16fcfe
32 Source2: https://www.libraw.org/data/LibRaw-demosaic-pack-GPL3-%{demosaic_ver}.tar.gz
33 # Source2-md5: 260cd142472027c8f7710a1a4edc9975
34 Patch0: %{name}-zlib.patch
35 URL: https://www.libraw.org/
36 BuildRequires: autoconf >= 2.50
37 BuildRequires: automake
38 %{?with_openmp:BuildRequires: gcc >= 6:4.2}
39 BuildRequires: jasper-devel
40 BuildRequires: lcms2-devel >= 2
41 %{?with_openmp:BuildRequires: libgomp-devel}
42 BuildRequires: libjpeg-devel >= 8
43 BuildRequires: libstdc++-devel
44 BuildRequires: libtool
45 BuildRequires: pkgconfig
46 # zlib with pkgconfig support
47 %{?with_zlib:BuildRequires: zlib-devel >= 1.2.3.3}
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 LibRaw is a library for reading RAW files obtained from digital photo
52 cameras (CRW/CR2, NEF, RAF, DNG, and others).
54 LibRaw is based on the source codes of the dcraw utility, where part
55 of drawbacks have already been eliminated and part will be fixed in
56 future. The users of the library are provided with API to be built
57 into their software programs.
59 %description -l pl.UTF-8
60 LibRaw to biblioteka do odczytu plików RAW uzyskanych z cyfrowych
61 aparatów fotograficznych (w formacie CRW/CR2, NEF, RAF, DNG i innych).
63 LibRaw jest oparty na kodzie źródłowym dcraw, z którego część wad
64 została już wyeliminowana, a część zostanie poprawiona w przyszłości.
67 Summary: LibRaw sample programs
68 Summary(pl.UTF-8): Programy przykładowe do LibRaw
69 Group: Applications/Graphics
72 LibRaw sample programs.
74 %description samples -l pl.UTF-8
75 Programy przykładowe do LibRaw.
78 Summary: Header files for LibRaw
79 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LibRaw
80 Group: Development/Libraries
81 Requires: %{name} = %{version}-%{release}
82 Requires: jasper-devel
83 Requires: lcms2-devel >= 2
84 %{?with_openmp:Requires: libgomp-devel}
85 Requires: libjpeg-devel >= 8
86 Requires: libstdc++-devel
87 %{?with_zlib:Requires: zlib-devel >= 1.2.3.3}
90 Header files for LibRaw.
92 %description devel -l pl.UTF-8
93 Pliki nagłówkowe biblioteki LibRaw.
96 Summary: Static LibRaw library
97 Summary(pl.UTF-8): Statyczna biblioteka LibRaw
98 Group: Development/Libraries
99 Requires: %{name}-devel = %{version}-%{release}
102 Static LibRaw library.
104 %description static -l pl.UTF-8
105 Statyczna biblioteka LibRaw.
108 %setup -q -n LibRaw-%{version} %{?with_gpl2:-a1} %{?with_gpl3:-a2}
112 for f in LibRaw-demosaic-pack-GPL2-%{demosaic_ver}/{COPYRIGHT,Changelog,README} ; do
113 cp -p $f $(basename $f).demosaic-pack-GPL2
117 for f in LibRaw-demosaic-pack-GPL3-%{demosaic_ver}/{COPYRIGHT,Changelog,README} ; do
118 cp -p $f $(basename $f).demosaic-pack-GPL3
128 --enable-demosaic-pack-gpl2=%{?with_gpl2:LibRaw-demosaic-pack-GPL2-%{demosaic_ver}}%{!?with_gpl2:no} \
129 --enable-demosaic-pack-gpl3=%{?with_gpl3:LibRaw-demosaic-pack-GPL3-%{demosaic_ver}}%{!?with_gpl3:no} \
130 %{!?with_openmp:--disable-openmp} \
131 %{?with_zlib:--enable-zlib}
134 %{?with_openmp:lib_libraw_la_LIBADD=-lgomp lib_libraw_r_la_LIBADD=-lgomp}
137 rm -rf $RPM_BUILD_ROOT
140 DESTDIR=$RPM_BUILD_ROOT
142 # obsoleted by pkg-config
143 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libraw*.la
146 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
149 rm -rf $RPM_BUILD_ROOT
151 %post -p /sbin/ldconfig
152 %postun -p /sbin/ldconfig
155 %defattr(644,root,root,755)
156 %doc COPYRIGHT Changelog.txt README README.demosaic-packs %{?with_gpl2:*.demosaic-pack-GPL2} %{?with_gpl3:*.demosaic-pack-GPL3}
157 %attr(755,root,root) %{_libdir}/libraw.so.*.*.*
158 %attr(755,root,root) %ghost %{_libdir}/libraw.so.16
159 %attr(755,root,root) %{_libdir}/libraw_r.so.*.*.*
160 %attr(755,root,root) %ghost %{_libdir}/libraw_r.so.16
163 %defattr(644,root,root,755)
164 %attr(755,root,root) %{_bindir}/4channels
165 %attr(755,root,root) %{_bindir}/dcraw_emu
166 %attr(755,root,root) %{_bindir}/dcraw_half
167 %attr(755,root,root) %{_bindir}/half_mt
168 %attr(755,root,root) %{_bindir}/mem_image
169 %attr(755,root,root) %{_bindir}/multirender_test
170 %attr(755,root,root) %{_bindir}/postprocessing_benchmark
171 %attr(755,root,root) %{_bindir}/raw-identify
172 %attr(755,root,root) %{_bindir}/simple_dcraw
173 %attr(755,root,root) %{_bindir}/unprocessed_raw
176 %defattr(644,root,root,755)
178 %attr(755,root,root) %{_libdir}/libraw.so
179 %attr(755,root,root) %{_libdir}/libraw_r.so
180 %{_includedir}/libraw
181 %{_pkgconfigdir}/libraw.pc
182 %{_pkgconfigdir}/libraw_r.pc
185 %defattr(644,root,root,755)
187 %{_libdir}/libraw_r.a