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: 1f4388f66ae3657818fdbfb311be7766
28 Source1: http://www.libraw.org/data/LibRaw-demosaic-pack-GPL2-%{version}.tar.gz
29 # Source1-md5: f6cd95013a47e1cef7a6ef1995c61ded
30 Source2: http://www.libraw.org/data/LibRaw-demosaic-pack-GPL3-%{version}.tar.gz
31 # Source2-md5: 729895293f375d76eb96b00e399f3e05
32 URL: http://www.libraw.org/
33 %{?with_gomp:BuildRequires: gcc >= 6:4.2}
34 BuildRequires: jasper-devel
35 BuildRequires: lcms2-devel
36 %{?with_gomp:BuildRequires: libgomp-devel}
37 BuildRequires: libjpeg-devel
38 BuildRequires: libstdc++-devel
39 BuildRequires: pkgconfig
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 LibRaw is a library for reading RAW files obtained from digital photo
44 cameras (CRW/CR2, NEF, RAF, DNG, and others).
46 LibRaw is based on the source codes of the dcraw utility, where part
47 of drawbacks have already been eliminated and part will be fixed in
48 future. The users of the library are provided with API to be built
49 into their software programs.
51 %description -l pl.UTF-8
52 LibRaw to biblioteka do odczytu plików RAW uzyskanych z cyfrowych
53 aparatów fotograficznych (w formacie CRW/CR2, NEF, RAF, DNG i innych).
55 LibRaw jest oparty na kodzie źródłowym dcraw, z którego część wad
56 została już wyeliminowana, a część zostanie poprawiona w przyszłości.
59 Summary: LibRaw sample programs
60 Summary(pl.UTF-8): Programy przykładowe do LibRaw
61 Group: Applications/Graphics
64 LibRaw sample programs.
66 %description samples -l pl.UTF-8
67 Programy przykładowe do LibRaw.
70 Summary: Header files for LibRaw
71 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki LibRaw
72 Group: Development/Libraries
73 Requires: %{name} = %{version}-%{release}
74 Requires: jasper-devel
76 %{?with_gomp:Requires: libgomp-devel}
77 Requires: libjpeg-devel
78 Requires: libstdc++-devel
81 Header files for LibRaw.
83 %description devel -l pl.UTF-8
84 Pliki nagłówkowe biblioteki LibRaw.
87 Summary: Static LibRaw library
88 Summary(pl.UTF-8): Statyczna biblioteka LibRaw
89 Group: Development/Libraries
90 Requires: %{name}-devel = %{version}-%{release}
93 Static LibRaw library.
95 %description static -l pl.UTF-8
96 Statyczna biblioteka LibRaw.
99 %setup -q -n LibRaw-%{version} %{?with_gpl2:-a1} %{?with_gpl3:-a2}
102 for f in LibRaw-demosaic-pack-GPL2-%{version}/{COPYRIGHT,Changelog,README} ; do
103 cp -p $f $(basename $f).demosaic-pack-GPL2
107 for f in LibRaw-demosaic-pack-GPL3-%{version}/{COPYRIGHT,Changelog,README} ; do
108 cp -p $f $(basename $f).demosaic-pack-GPL3
114 %{!?with_gomp:--disable-openmp}
117 %{?with_gomp:lib_libraw_la_LIBADD=-lgomp lib_libraw_r_la_LIBADD=-lgomp}
120 rm -rf $RPM_BUILD_ROOT
123 DESTDIR=$RPM_BUILD_ROOT
126 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
129 rm -rf $RPM_BUILD_ROOT
131 %post -p /sbin/ldconfig
132 %postun -p /sbin/ldconfig
135 %defattr(644,root,root,755)
136 %doc COPYRIGHT Changelog.txt LICENSE.LibRaw.pdf README README.demosaic-packs %{?with_gpl2:*.demosaic-pack-GPL2} %{?with_gpl3:*.demosaic-pack-GPL3}
137 %lang(ru) %doc Changelog.rus README.demosaic-packs.rus
138 %attr(755,root,root) %ghost %{_libdir}/libraw.so.?
139 %attr(755,root,root) %{_libdir}/libraw.so.*.*
140 %attr(755,root,root) %ghost %{_libdir}/libraw_r.so.?
141 %attr(755,root,root) %{_libdir}/libraw_r.so.*.*
144 %defattr(644,root,root,755)
145 %attr(755,root,root) %{_bindir}/4channels
146 %attr(755,root,root) %{_bindir}/dcraw_emu
147 %attr(755,root,root) %{_bindir}/dcraw_half
148 %attr(755,root,root) %{_bindir}/half_mt
149 %attr(755,root,root) %{_bindir}/mem_image
150 %attr(755,root,root) %{_bindir}/multirender_test
151 %attr(755,root,root) %{_bindir}/postprocessing_benchmark
152 %attr(755,root,root) %{_bindir}/raw-identify
153 %attr(755,root,root) %{_bindir}/simple_dcraw
154 %attr(755,root,root) %{_bindir}/unprocessed_raw
157 %defattr(644,root,root,755)
158 %doc doc/{index.html,*-eng.html}
159 %lang(ru) %doc doc/*-rus.html
160 %attr(755,root,root) %{_libdir}/libraw.so
161 %attr(755,root,root) %{_libdir}/libraw_r.so
163 %{_libdir}/libraw_r.la
164 %{_includedir}/libraw
165 %{_pkgconfigdir}/libraw.pc
166 %{_pkgconfigdir}/libraw_r.pc
169 %defattr(644,root,root,755)
171 %{_libdir}/libraw_r.a