3 %bcond_without gomp # 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: f6d2b9dd22e63ac0f0bd3944489a81c6
28 Source1: http://www.libraw.org/data/LibRaw-demosaic-pack-GPL2-%{version}.tar.gz
29 # Source1-md5: 291c83a5274b6ce0270131735f927adc
30 Source2: http://www.libraw.org/data/LibRaw-demosaic-pack-GPL3-%{version}.tar.gz
31 # Source2-md5: 141e24a0626b60e01dc9769cff14d499
32 Patch0: %{name}-nolocal.patch
33 URL: http://www.libraw.org/
34 BuildRequires: autoconf >= 2.50
35 BuildRequires: automake
36 %{?with_gomp:BuildRequires: gcc >= 6:4.2}
37 BuildRequires: jasper-devel
38 BuildRequires: lcms2-devel >= 2
39 %{?with_gomp:BuildRequires: libgomp-devel}
40 BuildRequires: libjpeg-devel
41 BuildRequires: libstdc++-devel
42 BuildRequires: libtool
43 BuildRequires: pkgconfig
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 LibRaw is a library for reading RAW files obtained from digital photo
48 cameras (CRW/CR2, NEF, RAF, DNG, and others).
50 LibRaw is based on the source codes of the dcraw utility, where part
51 of drawbacks have already been eliminated and part will be fixed in
52 future. The users of the library are provided with API to be built
53 into their software programs.
55 %description -l pl.UTF-8
56 LibRaw to biblioteka do odczytu plików RAW uzyskanych z cyfrowych
57 aparatów fotograficznych (w formacie CRW/CR2, NEF, RAF, DNG i innych).
59 LibRaw jest oparty na kodzie źródłowym dcraw, z którego część wad
60 została już wyeliminowana, a część zostanie poprawiona w przyszłości.
63 Summary: LibRaw sample programs
64 Summary(pl.UTF-8): Programy przykładowe do LibRaw
65 Group: Applications/Graphics
68 LibRaw sample programs.
70 %description samples -l pl.UTF-8
71 Programy przykładowe do LibRaw.
74 Summary: Header files for LibRaw
75 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LibRaw
76 Group: Development/Libraries
77 Requires: %{name} = %{version}-%{release}
78 Requires: jasper-devel
79 Requires: lcms2-devel >= 2
80 %{?with_gomp:Requires: libgomp-devel}
81 Requires: libjpeg-devel
82 Requires: libstdc++-devel
85 Header files for LibRaw.
87 %description devel -l pl.UTF-8
88 Pliki nagłówkowe biblioteki LibRaw.
91 Summary: Static LibRaw library
92 Summary(pl.UTF-8): Statyczna biblioteka LibRaw
93 Group: Development/Libraries
94 Requires: %{name}-devel = %{version}-%{release}
97 Static LibRaw library.
99 %description static -l pl.UTF-8
100 Statyczna biblioteka LibRaw.
103 %setup -q -n LibRaw-%{version} %{?with_gpl2:-a1} %{?with_gpl3:-a2}
107 for f in LibRaw-demosaic-pack-GPL2-%{version}/{COPYRIGHT,Changelog,README} ; do
108 cp -p $f $(basename $f).demosaic-pack-GPL2
112 for f in LibRaw-demosaic-pack-GPL3-%{version}/{COPYRIGHT,Changelog,README} ; do
113 cp -p $f $(basename $f).demosaic-pack-GPL3
123 --enable-demosaic-pack-gpl2=%{?with_gpl2:LibRaw-demosaic-pack-GPL2-%{version}}%{!?with_gpl2:no} \
124 --enable-demosaic-pack-gpl3=%{?with_gpl3:LibRaw-demosaic-pack-GPL3-%{version}}%{!?with_gpl3:no} \
125 %{!?with_gomp:--disable-openmp}
128 %{?with_gomp:lib_libraw_la_LIBADD=-lgomp lib_libraw_r_la_LIBADD=-lgomp}
131 rm -rf $RPM_BUILD_ROOT
134 DESTDIR=$RPM_BUILD_ROOT
137 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
140 rm -rf $RPM_BUILD_ROOT
142 %post -p /sbin/ldconfig
143 %postun -p /sbin/ldconfig
146 %defattr(644,root,root,755)
147 %doc COPYRIGHT Changelog.txt LICENSE.LibRaw.pdf README README.demosaic-packs %{?with_gpl2:*.demosaic-pack-GPL2} %{?with_gpl3:*.demosaic-pack-GPL3}
148 %attr(755,root,root) %{_libdir}/libraw.so.*.*.*
149 %attr(755,root,root) %ghost %{_libdir}/libraw.so.15
150 %attr(755,root,root) %{_libdir}/libraw_r.so.*.*.*
151 %attr(755,root,root) %ghost %{_libdir}/libraw_r.so.15
154 %defattr(644,root,root,755)
155 %attr(755,root,root) %{_bindir}/4channels
156 %attr(755,root,root) %{_bindir}/dcraw_emu
157 %attr(755,root,root) %{_bindir}/dcraw_half
158 %attr(755,root,root) %{_bindir}/half_mt
159 %attr(755,root,root) %{_bindir}/mem_image
160 %attr(755,root,root) %{_bindir}/multirender_test
161 %attr(755,root,root) %{_bindir}/postprocessing_benchmark
162 %attr(755,root,root) %{_bindir}/raw-identify
163 %attr(755,root,root) %{_bindir}/simple_dcraw
164 %attr(755,root,root) %{_bindir}/unprocessed_raw
167 %defattr(644,root,root,755)
169 %attr(755,root,root) %{_libdir}/libraw.so
170 %attr(755,root,root) %{_libdir}/libraw_r.so
172 %{_libdir}/libraw_r.la
173 %{_includedir}/libraw
174 %{_pkgconfigdir}/libraw.pc
175 %{_pkgconfigdir}/libraw_r.pc
178 %defattr(644,root,root,755)
180 %{_libdir}/libraw_r.a