3 %bcond_without openmp # OpenMP support
4 %bcond_without gpl2 # GPL v2+ demosaic pack
5 %bcond_without gpl3 # GPL v3+ demosaic pack
10 Summary: LibRaw - a library for reading RAW files
11 Summary(pl.UTF-8): LibRaw - biblioteka do odczytu plików RAW
21 License: LGPL v2.1 or CDDL v1.0 or LibRaw Software License
25 #Source0Download: http://www.libraw.org/download#stable
26 Source0: http://www.libraw.org/data/LibRaw-%{version}.tar.gz
27 # Source0-md5: 456626300777209def1ea784910f326a
28 Source1: http://www.libraw.org/data/LibRaw-demosaic-pack-GPL2-%{version}.tar.gz
29 # Source1-md5: ec783ebbef29721935525169b1eb51f7
30 Source2: http://www.libraw.org/data/LibRaw-demosaic-pack-GPL3-%{version}.tar.gz
31 # Source2-md5: a1100769a0b29af114e38cd4fe080717
32 URL: http://www.libraw.org/
33 BuildRequires: autoconf >= 2.50
34 BuildRequires: automake
35 %{?with_openmp:BuildRequires: gcc >= 6:4.2}
36 BuildRequires: jasper-devel
37 BuildRequires: lcms2-devel >= 2
38 %{?with_openmp:BuildRequires: libgomp-devel}
39 BuildRequires: libjpeg-devel
40 BuildRequires: libstdc++-devel
41 BuildRequires: libtool
42 BuildRequires: pkgconfig
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 LibRaw is a library for reading RAW files obtained from digital photo
47 cameras (CRW/CR2, NEF, RAF, DNG, and others).
49 LibRaw is based on the source codes of the dcraw utility, where part
50 of drawbacks have already been eliminated and part will be fixed in
51 future. The users of the library are provided with API to be built
52 into their software programs.
54 %description -l pl.UTF-8
55 LibRaw to biblioteka do odczytu plików RAW uzyskanych z cyfrowych
56 aparatów fotograficznych (w formacie CRW/CR2, NEF, RAF, DNG i innych).
58 LibRaw jest oparty na kodzie źródłowym dcraw, z którego część wad
59 została już wyeliminowana, a część zostanie poprawiona w przyszłości.
62 Summary: LibRaw sample programs
63 Summary(pl.UTF-8): Programy przykładowe do LibRaw
64 Group: Applications/Graphics
67 LibRaw sample programs.
69 %description samples -l pl.UTF-8
70 Programy przykładowe do LibRaw.
73 Summary: Header files for LibRaw
74 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LibRaw
75 Group: Development/Libraries
76 Requires: %{name} = %{version}-%{release}
77 Requires: jasper-devel
78 Requires: lcms2-devel >= 2
79 %{?with_openmp:Requires: libgomp-devel}
80 Requires: libjpeg-devel
81 Requires: libstdc++-devel
84 Header files for LibRaw.
86 %description devel -l pl.UTF-8
87 Pliki nagłówkowe biblioteki LibRaw.
90 Summary: Static LibRaw library
91 Summary(pl.UTF-8): Statyczna biblioteka LibRaw
92 Group: Development/Libraries
93 Requires: %{name}-devel = %{version}-%{release}
96 Static LibRaw library.
98 %description static -l pl.UTF-8
99 Statyczna biblioteka LibRaw.
102 %setup -q -n LibRaw-%{version} %{?with_gpl2:-a1} %{?with_gpl3:-a2}
105 for f in LibRaw-demosaic-pack-GPL2-%{version}/{COPYRIGHT,Changelog,README} ; do
106 cp -p $f $(basename $f).demosaic-pack-GPL2
110 for f in LibRaw-demosaic-pack-GPL3-%{version}/{COPYRIGHT,Changelog,README} ; do
111 cp -p $f $(basename $f).demosaic-pack-GPL3
121 --enable-demosaic-pack-gpl2=%{?with_gpl2:LibRaw-demosaic-pack-GPL2-%{version}}%{!?with_gpl2:no} \
122 --enable-demosaic-pack-gpl3=%{?with_gpl3:LibRaw-demosaic-pack-GPL3-%{version}}%{!?with_gpl3:no} \
123 %{!?with_openmp:--disable-openmp}
126 %{?with_openmp:lib_libraw_la_LIBADD=-lgomp lib_libraw_r_la_LIBADD=-lgomp}
129 rm -rf $RPM_BUILD_ROOT
132 DESTDIR=$RPM_BUILD_ROOT
135 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
138 rm -rf $RPM_BUILD_ROOT
140 %post -p /sbin/ldconfig
141 %postun -p /sbin/ldconfig
144 %defattr(644,root,root,755)
145 %doc COPYRIGHT Changelog.txt LICENSE.LibRaw.pdf README README.demosaic-packs %{?with_gpl2:*.demosaic-pack-GPL2} %{?with_gpl3:*.demosaic-pack-GPL3}
146 %attr(755,root,root) %{_libdir}/libraw.so.*.*.*
147 %attr(755,root,root) %ghost %{_libdir}/libraw.so.15
148 %attr(755,root,root) %{_libdir}/libraw_r.so.*.*.*
149 %attr(755,root,root) %ghost %{_libdir}/libraw_r.so.15
152 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_bindir}/4channels
154 %attr(755,root,root) %{_bindir}/dcraw_emu
155 %attr(755,root,root) %{_bindir}/dcraw_half
156 %attr(755,root,root) %{_bindir}/half_mt
157 %attr(755,root,root) %{_bindir}/mem_image
158 %attr(755,root,root) %{_bindir}/multirender_test
159 %attr(755,root,root) %{_bindir}/postprocessing_benchmark
160 %attr(755,root,root) %{_bindir}/raw-identify
161 %attr(755,root,root) %{_bindir}/simple_dcraw
162 %attr(755,root,root) %{_bindir}/unprocessed_raw
165 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_libdir}/libraw.so
168 %attr(755,root,root) %{_libdir}/libraw_r.so
170 %{_libdir}/libraw_r.la
171 %{_includedir}/libraw
172 %{_pkgconfigdir}/libraw.pc
173 %{_pkgconfigdir}/libraw_r.pc
176 %defattr(644,root,root,755)
178 %{_libdir}/libraw_r.a