1 | # Conformance tests disabled by default since it requires 1 GB of test data
|
---|
2 | #global runcheck 1
|
---|
3 |
|
---|
4 | #global optional_components 1
|
---|
5 |
|
---|
6 | Name: openjpeg2
|
---|
7 | Version: 2.3.0
|
---|
8 | Release: 1%{?dist}
|
---|
9 | Summary: C-Library for JPEG 2000
|
---|
10 |
|
---|
11 | # windirent.h is MIT, the rest is BSD
|
---|
12 | License: BSD and MIT
|
---|
13 | URL: https://github.com/uclouvain/openjpeg
|
---|
14 | Vendor: bww bitwise works GmbH
|
---|
15 | #scm_source github http://github.com/bitwiseworks/openjpeg-os2 master-os2
|
---|
16 | %scm_source git E:/Trees/openjpeg/git master-os2
|
---|
17 | %if 0%{?runcheck}
|
---|
18 | # git clone git@github.com:uclouvain/openjpeg-data.git
|
---|
19 | Source1: data.tar.xz
|
---|
20 | %endif
|
---|
21 |
|
---|
22 |
|
---|
23 | BuildRequires: cmake
|
---|
24 | # The library itself is C only, but there is some optional C++ stuff, hence the project is not marked as C-only in cmake and hence cmake looks for a c++ compiler
|
---|
25 | #BuildRequires: gcc-c++
|
---|
26 | BuildRequires: gcc
|
---|
27 | BuildRequires: make
|
---|
28 | BuildRequires: zlib-devel
|
---|
29 | BuildRequires: libpng-devel
|
---|
30 | BuildRequires: libtiff-devel
|
---|
31 | BuildRequires: lcms2-devel
|
---|
32 | BuildRequires: doxygen
|
---|
33 |
|
---|
34 | %if 0%{?optional_components}
|
---|
35 | BuildRequires: java-devel
|
---|
36 | BuildRequires: xerces-j2
|
---|
37 | %endif
|
---|
38 |
|
---|
39 | %description
|
---|
40 | The OpenJPEG library is an open-source JPEG 2000 library developed in order to
|
---|
41 | promote the use of JPEG 2000.
|
---|
42 |
|
---|
43 | This package contains
|
---|
44 | * JPEG 2000 codec compliant with the Part 1 of the standard (Class-1 Profile-1
|
---|
45 | compliance).
|
---|
46 | * JP2 (JPEG 2000 standard Part 2 - Handling of JP2 boxes and extended multiple
|
---|
47 | component transforms for multispectral and hyperspectral imagery)
|
---|
48 |
|
---|
49 |
|
---|
50 | %package devel
|
---|
51 | Summary: Development files for OpenJPEG 2
|
---|
52 | Requires: %{name} = %{version}-%{release}
|
---|
53 | # OpenJPEGTargets.cmake refers to the tools
|
---|
54 | Requires: %{name}-tools = %{version}-%{release}
|
---|
55 |
|
---|
56 | %description devel
|
---|
57 | The %{name}-devel package contains libraries and header files for developing
|
---|
58 | applications that use OpenJPEG 2.
|
---|
59 |
|
---|
60 |
|
---|
61 | %package devel-docs
|
---|
62 | Summary: Developer documentation for OpenJPEG 2
|
---|
63 | BuildArch: noarch
|
---|
64 |
|
---|
65 | %description devel-docs
|
---|
66 | The %{name}-devel-docs package contains documentation files for developing
|
---|
67 | applications that use OpenJPEG 2.
|
---|
68 |
|
---|
69 |
|
---|
70 | %package tools
|
---|
71 | Summary: OpenJPEG 2 command line tools
|
---|
72 | Requires: %{name} = %{version}-%{release}
|
---|
73 |
|
---|
74 | %description tools
|
---|
75 | Command line tools for JPEG 2000 file manipulation, using OpenJPEG2:
|
---|
76 | * opj2_compress
|
---|
77 | * opj2_decompress
|
---|
78 | * opj2_dump
|
---|
79 |
|
---|
80 | %if 0%{?optional_components}
|
---|
81 | ##### MJ2 #####
|
---|
82 |
|
---|
83 | %package mj2
|
---|
84 | Summary: OpenJPEG2 MJ2 module
|
---|
85 | Requires: %{name} = %{version}-%{release}
|
---|
86 |
|
---|
87 | %description mj2
|
---|
88 | The OpenJPEG library is an open-source JPEG 2000 library developed in order to
|
---|
89 | promote the use of JPEG 2000.
|
---|
90 |
|
---|
91 | This package contains the MJ2 module (JPEG 2000 standard Part 3)
|
---|
92 |
|
---|
93 |
|
---|
94 | %package mj2-devel
|
---|
95 | Summary: Development files for OpenJPEG2 MJ2 module
|
---|
96 | Requires: %{name}-devel = %{version}-%{release}
|
---|
97 | Requires: %{name}-mj2 = %{version}-%{release}
|
---|
98 |
|
---|
99 | %description mj2-devel
|
---|
100 | Development files for OpenJPEG2 MJ2 module
|
---|
101 |
|
---|
102 |
|
---|
103 | %package mj2-tools
|
---|
104 | Summary: OpenJPEG2 MJ2 module command line tools
|
---|
105 | Requires: %{name}-mj2 = %{version}-%{release}
|
---|
106 |
|
---|
107 | %description mj2-tools
|
---|
108 | OpenJPEG2 MJ2 module command line tools
|
---|
109 |
|
---|
110 | ##### JPWL #####
|
---|
111 |
|
---|
112 | %package jpwl
|
---|
113 | Summary: OpenJPEG2 JPWL module
|
---|
114 | Requires: %{name} = %{version}-%{release}
|
---|
115 |
|
---|
116 | %description jpwl
|
---|
117 | The OpenJPEG library is an open-source JPEG 2000 library developed in order to
|
---|
118 | promote the use of JPEG 2000.
|
---|
119 |
|
---|
120 | This package contains the JPWL (JPEG 2000 standard Part 11 - Jpeg 2000 Wireless)
|
---|
121 |
|
---|
122 |
|
---|
123 | %package jpwl-devel
|
---|
124 | Summary: Development files for OpenJPEG2 JPWL module
|
---|
125 | Requires: %{name}-devel = %{version}-%{release}
|
---|
126 | Requires: %{name}-jpwl = %{version}-%{release}
|
---|
127 |
|
---|
128 | %description jpwl-devel
|
---|
129 | Development files for OpenJPEG2 JPWL module
|
---|
130 |
|
---|
131 |
|
---|
132 | %package jpwl-tools
|
---|
133 | Summary: OpenJPEG2 JPWL module command line tools
|
---|
134 | Requires: %{name}-jpwl = %{version}-%{release}
|
---|
135 |
|
---|
136 | %description jpwl-tools
|
---|
137 | OpenJPEG2 JPWL module command line tools
|
---|
138 |
|
---|
139 | ##### JPIP #####
|
---|
140 |
|
---|
141 | %package jpip
|
---|
142 | Summary: OpenJPEG2 JPIP module
|
---|
143 | Requires: %{name} = %{version}-%{release}
|
---|
144 |
|
---|
145 | %description jpip
|
---|
146 | The OpenJPEG library is an open-source JPEG 2000 library developed in order to
|
---|
147 | promote the use of JPEG 2000.
|
---|
148 |
|
---|
149 | This package contains the JPWL (JPEG 2000 standard Part 9 - Jpeg 2000 Interactive Protocol)
|
---|
150 |
|
---|
151 |
|
---|
152 | %package jpip-devel
|
---|
153 | Summary: Development files for OpenJPEG2 JPIP module
|
---|
154 | Requires: %{name}-devel = %{version}-%{release}
|
---|
155 | Requires: %{name}-jpwl = %{version}-%{release}
|
---|
156 |
|
---|
157 | %description jpip-devel
|
---|
158 | Development files for OpenJPEG2 JPIP module
|
---|
159 |
|
---|
160 |
|
---|
161 | %package jpip-tools
|
---|
162 | Summary: OpenJPEG2 JPIP module command line tools
|
---|
163 | Requires: %{name}-jpip = %{version}-%{release}
|
---|
164 | Requires: jpackage-utils
|
---|
165 | Requires: java
|
---|
166 |
|
---|
167 | %description jpip-tools
|
---|
168 | OpenJPEG2 JPIP module command line tools
|
---|
169 |
|
---|
170 | ##### JP3D #####
|
---|
171 |
|
---|
172 | %package jp3d
|
---|
173 | Summary: OpenJPEG2 JP3D module
|
---|
174 | Requires: %{name} = %{version}-%{release}
|
---|
175 |
|
---|
176 | %description jp3d
|
---|
177 | The OpenJPEG library is an open-source JPEG 2000 library developed in order to
|
---|
178 | promote the use of JPEG 2000.
|
---|
179 |
|
---|
180 | This package contains the JP3D (JPEG 2000 standard Part 10 - Jpeg 2000 3D)
|
---|
181 |
|
---|
182 |
|
---|
183 | %package jp3d-devel
|
---|
184 | Summary: Development files for OpenJPEG2 JP3D module
|
---|
185 | Requires: %{name}-devel = %{version}-%{release}
|
---|
186 | Requires: %{name}-jp3d = %{version}-%{release}
|
---|
187 |
|
---|
188 | %description jp3d-devel
|
---|
189 | Development files for OpenJPEG2 JP3D module
|
---|
190 |
|
---|
191 |
|
---|
192 | %package jp3d-tools
|
---|
193 | Summary: OpenJPEG2 JP3D module command line tools
|
---|
194 | Requires: %{name}-jp3d = %{version}-%{release}
|
---|
195 |
|
---|
196 | %description jp3d-tools
|
---|
197 | OpenJPEG2 JP3D module command line tools
|
---|
198 | %endif
|
---|
199 |
|
---|
200 | %debug_package
|
---|
201 |
|
---|
202 |
|
---|
203 | %prep
|
---|
204 | %scm_setup
|
---|
205 |
|
---|
206 | # Remove all third party libraries just to be sure
|
---|
207 | #rm -rf thirdparty
|
---|
208 |
|
---|
209 |
|
---|
210 | %build
|
---|
211 | export LDFLAGS="-Zhigh-mem -Zomf -lcx"
|
---|
212 | export VENDOR="%{vendor}"
|
---|
213 |
|
---|
214 | mkdir build
|
---|
215 | cd build
|
---|
216 | # TODO: Consider
|
---|
217 | # -DBUILD_JPIP_SERVER=ON -DBUILD_JAVA=ON
|
---|
218 | %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENJPEG_INSTALL_LIB_DIR=%{_lib} \
|
---|
219 | %{?optional_components:-DBUILD_MJ2=ON -DBUILD_JPWL=ON -DBUILD_JPIP=ON -DBUILD_JP3D=ON} \
|
---|
220 | -DBUILD_DOC=ON \
|
---|
221 | -DBUILD_STATIC_LIBS=OFF \
|
---|
222 | -DBUILD_SHARED_LIBS=ON \
|
---|
223 | %{?runcheck:-DBUILD_TESTING:BOOL=ON -DOPJ_DATA_ROOT=$PWD/../data} \
|
---|
224 | ..
|
---|
225 | cd ..
|
---|
226 |
|
---|
227 | make VERBOSE=1 -C build
|
---|
228 |
|
---|
229 |
|
---|
230 | %install
|
---|
231 | %make_install -C build
|
---|
232 |
|
---|
233 |
|
---|
234 | # Docs are installed through %%doc
|
---|
235 | rm -rf %{buildroot}%{_datadir}/doc/
|
---|
236 |
|
---|
237 | %if 0%{?optional_components}
|
---|
238 | # Move the jar to the correct place
|
---|
239 | mkdir -p %{buildroot}%{_javadir}
|
---|
240 | mv %{buildroot}%{_datadir}/opj_jpip_viewer.jar %{buildroot}%{_javadir}/opj2_jpip_viewer.jar
|
---|
241 | cat > %{buildroot}%{_bindir}/opj2_jpip_viewer <<EOF
|
---|
242 | java -jar %{_javadir}/opj2_jpip_viewer.jar "$@"
|
---|
243 | EOF
|
---|
244 | chmod +x %{buildroot}%{_bindir}/opj2_jpip_viewer
|
---|
245 | %endif
|
---|
246 |
|
---|
247 |
|
---|
248 | #%ldconfig_scriptlets
|
---|
249 |
|
---|
250 |
|
---|
251 | %check
|
---|
252 | %if 0%{?runcheck}
|
---|
253 | make test -C build
|
---|
254 | %endif
|
---|
255 |
|
---|
256 |
|
---|
257 | %files
|
---|
258 | %{!?_licensedir:%global license %doc}
|
---|
259 | %license LICENSE
|
---|
260 | %doc AUTHORS.md NEWS.md README.md THANKS.md
|
---|
261 | %{_libdir}/openjp*.dll
|
---|
262 | %{_mandir}/man3/libopenjp2.3*
|
---|
263 |
|
---|
264 | %files devel
|
---|
265 | %dir %{_includedir}/openjpeg-2.3/
|
---|
266 | %{_includedir}/openjpeg-2.3/openjpeg.h
|
---|
267 | %{_includedir}/openjpeg-2.3/opj_config.h
|
---|
268 | %{_includedir}/openjpeg-2.3/opj_stdint.h
|
---|
269 | %{_libdir}/openjp*_dll.a
|
---|
270 | %{_libdir}/openjpeg-2.3/
|
---|
271 | %{_libdir}/pkgconfig/libopenjp2.pc
|
---|
272 |
|
---|
273 | %files devel-docs
|
---|
274 | %doc build/doc/html
|
---|
275 |
|
---|
276 | %files tools
|
---|
277 | %{_bindir}/opj_compress.exe
|
---|
278 | %{_bindir}/opj_decompress.exe
|
---|
279 | %{_bindir}/opj_dump.exe
|
---|
280 | %{_mandir}/man1/opj_compress.1*
|
---|
281 | %{_mandir}/man1/opj_decompress.1*
|
---|
282 | %{_mandir}/man1/opj_dump.1*
|
---|
283 |
|
---|
284 | %if 0%{?optional_components}
|
---|
285 | %files mj2
|
---|
286 | %{_libdir}/libopenmj2.so.*
|
---|
287 |
|
---|
288 | %files mj2-devel
|
---|
289 | %{_libdir}/libopenmj2.so
|
---|
290 |
|
---|
291 | %files mj2-tools
|
---|
292 | %{_bindir}/opj2_mj2*
|
---|
293 |
|
---|
294 | %files jpwl
|
---|
295 | %{_libdir}/libopenjpwl.so.*
|
---|
296 |
|
---|
297 | %files jpwl-devel
|
---|
298 | %{_libdir}/libopenjpwl.so
|
---|
299 | %{_libdir}/pkgconfig/libopenjpwl.pc
|
---|
300 |
|
---|
301 | %files jpwl-tools
|
---|
302 | %{_bindir}/opj2_jpwl*
|
---|
303 |
|
---|
304 | %files jpip
|
---|
305 | %{_libdir}/libopenjpip.so.*
|
---|
306 |
|
---|
307 | %files jpip-devel
|
---|
308 | %{_libdir}/libopenjpip.so
|
---|
309 | %{_libdir}/pkgconfig/libopenjpip.pc
|
---|
310 |
|
---|
311 | %files jpip-tools
|
---|
312 | %{_bindir}/opj2_jpip*
|
---|
313 | %{_bindir}/opj2_dec_server
|
---|
314 | %{_javadir}/opj2_jpip_viewer.jar
|
---|
315 |
|
---|
316 | %files jp3d
|
---|
317 | %{_libdir}/libopenjp3d.so.*
|
---|
318 |
|
---|
319 | %files jp3d-devel
|
---|
320 | %{_includedir}/openjpeg-2.0/openjp3d.h
|
---|
321 | %{_libdir}/libopenjp3d.so
|
---|
322 | %{_libdir}/pkgconfig/libopenjp3d.pc
|
---|
323 |
|
---|
324 | %files jp3d-tools
|
---|
325 | %{_bindir}/opj2_jp3d*
|
---|
326 | %endif
|
---|
327 |
|
---|
328 |
|
---|
329 | %changelog
|
---|
330 | * Fri Nov 2 2018 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.3.0-1
|
---|
331 | - initial port
|
---|