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