]> git.pld-linux.org Git - SPECS.git/blob - libraw.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / libraw.spec
1 #
2 # Conditional build:
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
7 #
8 %if %{without gpl2}
9 %undefine       gpl3
10 %endif
11 Summary:        LibRaw - a library for reading RAW files
12 Summary(pl.UTF-8):      LibRaw - biblioteka do odczytu plików RAW
13 Name:           libraw
14 Version:        0.18.13
15 %define demosaic_ver    0.18.8
16 Release:        1
17 %if %{with gpl3}
18 License:        GPL v3+
19 %else
20 %if %{with gpl2}
21 License:        GPL v2+
22 %else
23 License:        LGPL v2.1 or CDDL v1.0
24 %endif
25 %endif
26 Group:          Libraries
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)
49
50 %description
51 LibRaw is a library for reading RAW files obtained from digital photo
52 cameras (CRW/CR2, NEF, RAF, DNG, and others).
53
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.
58
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).
62
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.
65
66 %package samples
67 Summary:        LibRaw sample programs
68 Summary(pl.UTF-8):      Programy przykładowe do LibRaw
69 Group:          Applications/Graphics
70
71 %description samples
72 LibRaw sample programs.
73
74 %description samples -l pl.UTF-8
75 Programy przykładowe do LibRaw.
76
77 %package devel
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}
88
89 %description devel
90 Header files for LibRaw.
91
92 %description devel -l pl.UTF-8
93 Pliki nagłówkowe biblioteki LibRaw.
94
95 %package static
96 Summary:        Static LibRaw library
97 Summary(pl.UTF-8):      Statyczna biblioteka LibRaw
98 Group:          Development/Libraries
99 Requires:       %{name}-devel = %{version}-%{release}
100
101 %description static
102 Static LibRaw library.
103
104 %description static -l pl.UTF-8
105 Statyczna biblioteka LibRaw.
106
107 %prep
108 %setup -q -n LibRaw-%{version} %{?with_gpl2:-a1} %{?with_gpl3:-a2}
109 %patch0 -p1
110
111 %if %{with gpl2}
112 for f in LibRaw-demosaic-pack-GPL2-%{demosaic_ver}/{COPYRIGHT,Changelog,README} ; do
113         cp -p $f $(basename $f).demosaic-pack-GPL2
114 done
115 %endif
116 %if %{with gpl3}
117 for f in LibRaw-demosaic-pack-GPL3-%{demosaic_ver}/{COPYRIGHT,Changelog,README} ; do
118         cp -p $f $(basename $f).demosaic-pack-GPL3
119 done
120 %endif
121
122 %build
123 %{__libtoolize}
124 %{__aclocal} -I m4
125 %{__autoconf}
126 %{__automake}
127 %configure \
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}
132
133 %{__make} \
134         %{?with_openmp:lib_libraw_la_LIBADD=-lgomp lib_libraw_r_la_LIBADD=-lgomp}
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138
139 %{__make} install \
140         DESTDIR=$RPM_BUILD_ROOT
141
142 # obsoleted by pkg-config
143 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libraw*.la
144
145 # packaged as %doc
146 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
147
148 %clean
149 rm -rf $RPM_BUILD_ROOT
150
151 %post   -p /sbin/ldconfig
152 %postun -p /sbin/ldconfig
153
154 %files
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
161
162 %files samples
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
174
175 %files devel
176 %defattr(644,root,root,755)
177 %doc doc/*.html
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
183
184 %files static
185 %defattr(644,root,root,755)
186 %{_libdir}/libraw.a
187 %{_libdir}/libraw_r.a
This page took 1.329074 seconds and 3 git commands to generate.