1 | %global upname openjpeg |
---|
2 | #global snap svn20140403 |
---|
3 | |
---|
4 | # Conformance tests disabled by default since it requires 1 GB of test data |
---|
5 | #global runcheck 1 |
---|
6 | |
---|
7 | #global optional_components 1 |
---|
8 | |
---|
9 | Name: openjpeg2 |
---|
10 | Version: 2.1.0 |
---|
11 | Release: 5%{?_dist_release} |
---|
12 | Summary: C-Library for JPEG 2000 |
---|
13 | Summary(ja): JPEG 2000 用の C ライブラリ |
---|
14 | |
---|
15 | # windirent.h is MIT, the rest is BSD |
---|
16 | License: BSD and MIT |
---|
17 | Group: System Environment/Libraries |
---|
18 | URL: http://www.openjpeg.org/ |
---|
19 | %if 0%{?snap:1} |
---|
20 | # Snapshots taken from stable release branch: |
---|
21 | # svn co http://openjpeg.googlecode.com/svn/branches/openjpeg-2.0 openjpeg-2.0.0 |
---|
22 | # find openjpeg-2.0.0 -name ".svn" -exec rm -rf {} \; |
---|
23 | # tar -cf openjpeg-2.0.0-$snap.tar.gz openjpeg-2.0.0 |
---|
24 | Source0: %{upname}-%{version}-%{snap}.tar.gz |
---|
25 | %else |
---|
26 | Source0: http://sourceforge.net/projects/openjpeg.mirror/files/%{upname}-%{version}.tar.gz |
---|
27 | %endif |
---|
28 | %if 0%{?runcheck} |
---|
29 | # svn checkout http://openjpeg.googlecode.com/svn/data |
---|
30 | Source1: data.tar.xz |
---|
31 | %endif |
---|
32 | |
---|
33 | # Remove bundled libraries |
---|
34 | Patch0: openjpeg2_remove-thirdparty.patch |
---|
35 | |
---|
36 | BuildRequires: cmake |
---|
37 | BuildRequires: zlib-devel |
---|
38 | BuildRequires: libpng-devel |
---|
39 | BuildRequires: libtiff-devel |
---|
40 | BuildRequires: lcms2-devel |
---|
41 | BuildRequires: doxygen |
---|
42 | |
---|
43 | %if 0%{?optional_components} |
---|
44 | BuildRequires: java-devel |
---|
45 | BuildRequires: xerces-j2 |
---|
46 | %endif |
---|
47 | |
---|
48 | %description |
---|
49 | The OpenJPEG library is an open-source JPEG 2000 library developed in order to |
---|
50 | promote the use of JPEG 2000. |
---|
51 | |
---|
52 | This package contains |
---|
53 | * JPEG 2000 codec compliant with the Part 1 of the standard (Class-1 Profile-1 |
---|
54 | compliance). |
---|
55 | * JP2 (JPEG 2000 standard Part 2 - Handling of JP2 boxes and extended multiple |
---|
56 | component transforms for multispectral and hyperspectral imagery) |
---|
57 | |
---|
58 | |
---|
59 | %package devel |
---|
60 | Summary: Development files for OpenJPEG 2 |
---|
61 | Summary(ja): OpenJPEG 2 の開発用ファイル |
---|
62 | Group: Development/Libraries |
---|
63 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
64 | |
---|
65 | %description devel |
---|
66 | The %{name}-devel package contains libraries and header files for developing |
---|
67 | applications that use OpenJPEG 2. |
---|
68 | |
---|
69 | |
---|
70 | %package devel-docs |
---|
71 | Summary: Developer documentation for OpenJPEG 2 |
---|
72 | Summary(ja): OpenJPEG 2 の開発用ドキュメント |
---|
73 | Group: Documentation |
---|
74 | BuildArch: noarch |
---|
75 | |
---|
76 | %description devel-docs |
---|
77 | The %{name}-devel-docs package contains documentation files for developing |
---|
78 | applications that use OpenJPEG 2. |
---|
79 | |
---|
80 | |
---|
81 | %package tools |
---|
82 | Summary: OpenJPEG 2 command line tools |
---|
83 | Summary(ja): OpenJPEG 2 のコマンドラインツール集 |
---|
84 | Group: Applications/Graphics |
---|
85 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
86 | |
---|
87 | %description tools |
---|
88 | Command line tools for JPEG 2000 file manipulation, using OpenJPEG2: |
---|
89 | * opj2_compress |
---|
90 | * opj2_decompress |
---|
91 | * opj2_dump |
---|
92 | |
---|
93 | %if 0%{?optional_components} |
---|
94 | ##### MJ2 ##### |
---|
95 | |
---|
96 | %package mj2 |
---|
97 | Summary: OpenJPEG2 MJ2 module |
---|
98 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
99 | |
---|
100 | %description mj2 |
---|
101 | The OpenJPEG library is an open-source JPEG 2000 library developed in order to |
---|
102 | promote the use of JPEG 2000. |
---|
103 | |
---|
104 | This package contains the MJ2 module (JPEG 2000 standard Part 3) |
---|
105 | |
---|
106 | |
---|
107 | %package mj2-devel |
---|
108 | Summary: Development files for OpenJPEG2 MJ2 module |
---|
109 | Requires: %{name}-devel%{?_isa} = %{version}-%{release} |
---|
110 | Requires: %{name}-mj2%{?_isa} = %{version}-%{release} |
---|
111 | |
---|
112 | %description mj2-devel |
---|
113 | Development files for OpenJPEG2 MJ2 module |
---|
114 | |
---|
115 | |
---|
116 | %package mj2-tools |
---|
117 | Summary: OpenJPEG2 MJ2 module command line tools |
---|
118 | Requires: %{name}-mj2%{?_isa} = %{version}-%{release} |
---|
119 | |
---|
120 | %description mj2-tools |
---|
121 | OpenJPEG2 MJ2 module command line tools |
---|
122 | |
---|
123 | ##### JPWL ##### |
---|
124 | |
---|
125 | %package jpwl |
---|
126 | Summary: OpenJPEG2 JPWL module |
---|
127 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
128 | |
---|
129 | %description jpwl |
---|
130 | The OpenJPEG library is an open-source JPEG 2000 library developed in order to |
---|
131 | promote the use of JPEG 2000. |
---|
132 | |
---|
133 | This package contains the JPWL (JPEG 2000 standard Part 11 - Jpeg 2000 Wireless) |
---|
134 | |
---|
135 | |
---|
136 | %package jpwl-devel |
---|
137 | Summary: Development files for OpenJPEG2 JPWL module |
---|
138 | Requires: %{name}-devel%{?_isa} = %{version}-%{release} |
---|
139 | Requires: %{name}-jpwl%{?_isa} = %{version}-%{release} |
---|
140 | |
---|
141 | %description jpwl-devel |
---|
142 | Development files for OpenJPEG2 JPWL module |
---|
143 | |
---|
144 | |
---|
145 | %package jpwl-tools |
---|
146 | Summary: OpenJPEG2 JPWL module command line tools |
---|
147 | Requires: %{name}-jpwl%{?_isa} = %{version}-%{release} |
---|
148 | |
---|
149 | %description jpwl-tools |
---|
150 | OpenJPEG2 JPWL module command line tools |
---|
151 | |
---|
152 | ##### JPIP ##### |
---|
153 | |
---|
154 | %package jpip |
---|
155 | Summary: OpenJPEG2 JPIP module |
---|
156 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
157 | |
---|
158 | %description jpip |
---|
159 | The OpenJPEG library is an open-source JPEG 2000 library developed in order to |
---|
160 | promote the use of JPEG 2000. |
---|
161 | |
---|
162 | This package contains the JPWL (JPEG 2000 standard Part 9 - Jpeg 2000 Interactive Protocol) |
---|
163 | |
---|
164 | |
---|
165 | %package jpip-devel |
---|
166 | Summary: Development files for OpenJPEG2 JPIP module |
---|
167 | Requires: %{name}-devel%{?_isa} = %{version}-%{release} |
---|
168 | Requires: %{name}-jpwl%{?_isa} = %{version}-%{release} |
---|
169 | |
---|
170 | %description jpip-devel |
---|
171 | Development files for OpenJPEG2 JPIP module |
---|
172 | |
---|
173 | |
---|
174 | %package jpip-tools |
---|
175 | Summary: OpenJPEG2 JPIP module command line tools |
---|
176 | Requires: %{name}-jpip%{?_isa} = %{version}-%{release} |
---|
177 | Requires: jpackage-utils |
---|
178 | Requires: java |
---|
179 | |
---|
180 | %description jpip-tools |
---|
181 | OpenJPEG2 JPIP module command line tools |
---|
182 | |
---|
183 | ##### JP3D ##### |
---|
184 | |
---|
185 | %package jp3d |
---|
186 | Summary: OpenJPEG2 JP3D module |
---|
187 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
188 | |
---|
189 | %description jp3d |
---|
190 | The OpenJPEG library is an open-source JPEG 2000 library developed in order to |
---|
191 | promote the use of JPEG 2000. |
---|
192 | |
---|
193 | This package contains the JP3D (JPEG 2000 standard Part 10 - Jpeg 2000 3D) |
---|
194 | |
---|
195 | |
---|
196 | %package jp3d-devel |
---|
197 | Summary: Development files for OpenJPEG2 JP3D module |
---|
198 | Requires: %{name}-devel%{?_isa} = %{version}-%{release} |
---|
199 | Requires: %{name}-jp3d%{?_isa} = %{version}-%{release} |
---|
200 | |
---|
201 | %description jp3d-devel |
---|
202 | Development files for OpenJPEG2 JP3D module |
---|
203 | |
---|
204 | |
---|
205 | %package jp3d-tools |
---|
206 | Summary: OpenJPEG2 JP3D module command line tools |
---|
207 | Requires: %{name}-jp3d%{?_isa} = %{version}-%{release} |
---|
208 | |
---|
209 | %description jp3d-tools |
---|
210 | OpenJPEG2 JP3D module command line tools |
---|
211 | %endif |
---|
212 | |
---|
213 | |
---|
214 | %prep |
---|
215 | %setup -q -n %{upname}-%{version} %{?runcheck:-a 1} |
---|
216 | %patch0 -p1 |
---|
217 | |
---|
218 | # Remove all third party libraries just to be sure |
---|
219 | rm -rf thirdparty |
---|
220 | |
---|
221 | |
---|
222 | %build |
---|
223 | mkdir %{_target_platform} |
---|
224 | pushd %{_target_platform} |
---|
225 | # TODO: Consider |
---|
226 | # -DBUILD_JPIP_SERVER=ON -DBUILD_JAVA=ON |
---|
227 | %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENJPEG_INSTALL_LIB_DIR=%{_lib} \ |
---|
228 | %{?optional_components:-DBUILD_MJ2=ON -DBUILD_JPWL=ON -DBUILD_JPIP=ON -DBUILD_JP3D=ON} \ |
---|
229 | -DBUILD_DOC=ON \ |
---|
230 | %{?runcheck:-DBUILD_TESTING:BOOL=ON -DOPJ_DATA_ROOT=$PWD/../data} \ |
---|
231 | .. |
---|
232 | popd |
---|
233 | |
---|
234 | make VERBOSE=1 -C %{_target_platform} %{?_smp_mflags} |
---|
235 | |
---|
236 | |
---|
237 | %install |
---|
238 | %make_install -C %{_target_platform} |
---|
239 | |
---|
240 | # Rename to avoid conflicts with openjpeg-1.x |
---|
241 | for file in %{buildroot}%{_bindir}/opj_*; do |
---|
242 | mv $file ${file/opj_/opj2_} |
---|
243 | done |
---|
244 | mv %{buildroot}%{_mandir}/man1/opj_compress.1 %{buildroot}%{_mandir}/man1/opj2_compress.1 |
---|
245 | mv %{buildroot}%{_mandir}/man1/opj_decompress.1 %{buildroot}%{_mandir}/man1/opj2_decompress.1 |
---|
246 | mv %{buildroot}%{_mandir}/man1/opj_dump.1 %{buildroot}%{_mandir}/man1/opj2_dump.1 |
---|
247 | |
---|
248 | # Docs are installed through %%doc |
---|
249 | rm -rf %{buildroot}%{_datadir}/doc/ |
---|
250 | |
---|
251 | %if 0%{?optional_components} |
---|
252 | # Move the jar to the correct place |
---|
253 | mkdir -p %{buildroot}%{_javadir} |
---|
254 | mv %{buildroot}%{_datadir}/opj_jpip_viewer.jar %{buildroot}%{_javadir}/opj2_jpip_viewer.jar |
---|
255 | cat > %{buildroot}%{_bindir}/opj2_jpip_viewer <<EOF |
---|
256 | java -jar %{_javadir}/opj2_jpip_viewer.jar "$@" |
---|
257 | EOF |
---|
258 | chmod +x %{buildroot}%{_bindir}/opj2_jpip_viewer |
---|
259 | %endif |
---|
260 | |
---|
261 | |
---|
262 | %post -p /sbin/ldconfig |
---|
263 | |
---|
264 | |
---|
265 | %postun -p /sbin/ldconfig |
---|
266 | |
---|
267 | |
---|
268 | %check |
---|
269 | %if 0%{?runcheck} |
---|
270 | make test -C %{_target_platform} |
---|
271 | %endif |
---|
272 | |
---|
273 | |
---|
274 | %files |
---|
275 | %doc AUTHORS LICENSE NEWS README THANKS |
---|
276 | %{_libdir}/libopenjp2.so.* |
---|
277 | %{_mandir}/man3/libopenjp2.3* |
---|
278 | |
---|
279 | %files devel |
---|
280 | %dir %{_includedir}/openjpeg-2.1/ |
---|
281 | %{_includedir}/openjpeg-2.1/openjpeg.h |
---|
282 | %{_includedir}/openjpeg-2.1/opj_config.h |
---|
283 | %{_includedir}/openjpeg-2.1/opj_stdint.h |
---|
284 | %{_libdir}/libopenjp2.so |
---|
285 | %{_libdir}/openjpeg-2.1/ |
---|
286 | %{_libdir}/pkgconfig/libopenjp2.pc |
---|
287 | |
---|
288 | %files devel-docs |
---|
289 | %doc %{_target_platform}/doc/html |
---|
290 | |
---|
291 | %files tools |
---|
292 | %{_bindir}/opj2_compress |
---|
293 | %{_bindir}/opj2_decompress |
---|
294 | %{_bindir}/opj2_dump |
---|
295 | %{_mandir}/man1/opj2_compress.1* |
---|
296 | %{_mandir}/man1/opj2_decompress.1* |
---|
297 | %{_mandir}/man1/opj2_dump.1* |
---|
298 | |
---|
299 | %if 0%{?optional_components} |
---|
300 | %files mj2 |
---|
301 | %{_libdir}/libopenmj2.so.* |
---|
302 | |
---|
303 | %files mj2-devel |
---|
304 | %{_libdir}/libopenmj2.so |
---|
305 | |
---|
306 | %files mj2-tools |
---|
307 | %{_bindir}/opj2_mj2* |
---|
308 | |
---|
309 | %files jpwl |
---|
310 | %{_libdir}/libopenjpwl.so.* |
---|
311 | |
---|
312 | %files jpwl-devel |
---|
313 | %{_libdir}/libopenjpwl.so |
---|
314 | %{_libdir}/pkgconfig/libopenjpwl.pc |
---|
315 | |
---|
316 | %files jpwl-tools |
---|
317 | %{_bindir}/opj2_jpwl* |
---|
318 | |
---|
319 | %files jpip |
---|
320 | %{_libdir}/libopenjpip.so.* |
---|
321 | |
---|
322 | %files jpip-devel |
---|
323 | %{_libdir}/libopenjpip.so |
---|
324 | %{_libdir}/pkgconfig/libopenjpip.pc |
---|
325 | |
---|
326 | %files jpip-tools |
---|
327 | %{_bindir}/opj2_jpip* |
---|
328 | %{_bindir}/opj2_dec_server |
---|
329 | %{_javadir}/opj2_jpip_viewer.jar |
---|
330 | |
---|
331 | %files jp3d |
---|
332 | %{_libdir}/libopenjp3d.so.* |
---|
333 | |
---|
334 | %files jp3d-devel |
---|
335 | %{_includedir}/openjpeg-2.0/openjp3d.h |
---|
336 | %{_libdir}/libopenjp3d.so |
---|
337 | %{_libdir}/pkgconfig/libopenjp3d.pc |
---|
338 | |
---|
339 | %files jp3d-tools |
---|
340 | %{_bindir}/opj2_jp3d* |
---|
341 | %endif |
---|
342 | |
---|
343 | |
---|
344 | %changelog |
---|
345 | * Tue Jan 13 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.1.0-5 |
---|
346 | - added japanese summary and Group tag |
---|
347 | |
---|
348 | * Wed Dec 24 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.0-4 |
---|
349 | - initial build for Vine Linux. |
---|
350 | |
---|
351 | * Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-3 |
---|
352 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild |
---|
353 | |
---|
354 | * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-2 |
---|
355 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild |
---|
356 | |
---|
357 | * Tue May 27 2014 Sandro Mani <manisandro@gmail.com> - 2.1.0-1 |
---|
358 | * Wed Apr 16 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-5 |
---|
359 | - Switch to official 2.0 release and backport pkg-config patch |
---|
360 | |
---|
361 | * Thu Apr 10 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-4.svn20140403 |
---|
362 | - Replace define with global |
---|
363 | - Fix #define optional_components 1S typo |
---|
364 | - Fix %%(pwd) -> $PWD for test data |
---|
365 | - Added some BR for optional components |
---|
366 | - Include opj2_jpip_viewer.jar in %%files |
---|
367 | |
---|
368 | * Wed Apr 09 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-3.svn20140403 |
---|
369 | - Fix source url |
---|
370 | - Fix mixed tabs and spaces |
---|
371 | - Fix description too long |
---|
372 | |
---|
373 | * Wed Apr 09 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-2.svn20140403 |
---|
374 | - Remove thirdparty libraries folder in prep |
---|
375 | - Own %%{_libdir}/openjpeg-2.0/ |
---|
376 | - Fix Requires |
---|
377 | - Add missing ldconfig |
---|
378 | - Add possibility to run conformance tests if desired |
---|
379 | |
---|
380 | * Thu Apr 03 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-1.svn20140403 |
---|
381 | - Initial package |
---|