source: spec/trunk/SPECS/openjpeg2.spec@ 1566

Last change on this file since 1566 was 1517, checked in by Silvan Scherrer, 7 years ago

spec: openjpeg2: Release version 2.3.0-1.

File size: 8.0 KB
Line 
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
6Name: openjpeg2
7Version: 2.3.0
8Release: 1%{?dist}
9Summary: C-Library for JPEG 2000
10
11# windirent.h is MIT, the rest is BSD
12License: BSD and MIT
13URL: https://github.com/uclouvain/openjpeg
14Vendor: 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
19Source1: data.tar.xz
20%endif
21
22
23BuildRequires: 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++
26BuildRequires: gcc
27BuildRequires: make
28BuildRequires: zlib-devel
29BuildRequires: libpng-devel
30BuildRequires: libtiff-devel
31BuildRequires: lcms2-devel
32BuildRequires: doxygen
33
34%if 0%{?optional_components}
35BuildRequires: java-devel
36BuildRequires: xerces-j2
37%endif
38
39%description
40The OpenJPEG library is an open-source JPEG 2000 library developed in order to
41promote the use of JPEG 2000.
42
43This 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
51Summary: Development files for OpenJPEG 2
52Requires: %{name} = %{version}-%{release}
53# OpenJPEGTargets.cmake refers to the tools
54Requires: %{name}-tools = %{version}-%{release}
55
56%description devel
57The %{name}-devel package contains libraries and header files for developing
58applications that use OpenJPEG 2.
59
60
61%package devel-docs
62Summary: Developer documentation for OpenJPEG 2
63BuildArch: noarch
64
65%description devel-docs
66The %{name}-devel-docs package contains documentation files for developing
67applications that use OpenJPEG 2.
68
69
70%package tools
71Summary: OpenJPEG 2 command line tools
72Requires: %{name} = %{version}-%{release}
73
74%description tools
75Command 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
84Summary: OpenJPEG2 MJ2 module
85Requires: %{name} = %{version}-%{release}
86
87%description mj2
88The OpenJPEG library is an open-source JPEG 2000 library developed in order to
89promote the use of JPEG 2000.
90
91This package contains the MJ2 module (JPEG 2000 standard Part 3)
92
93
94%package mj2-devel
95Summary: Development files for OpenJPEG2 MJ2 module
96Requires: %{name}-devel = %{version}-%{release}
97Requires: %{name}-mj2 = %{version}-%{release}
98
99%description mj2-devel
100Development files for OpenJPEG2 MJ2 module
101
102
103%package mj2-tools
104Summary: OpenJPEG2 MJ2 module command line tools
105Requires: %{name}-mj2 = %{version}-%{release}
106
107%description mj2-tools
108OpenJPEG2 MJ2 module command line tools
109
110##### JPWL #####
111
112%package jpwl
113Summary: OpenJPEG2 JPWL module
114Requires: %{name} = %{version}-%{release}
115
116%description jpwl
117The OpenJPEG library is an open-source JPEG 2000 library developed in order to
118promote the use of JPEG 2000.
119
120This package contains the JPWL (JPEG 2000 standard Part 11 - Jpeg 2000 Wireless)
121
122
123%package jpwl-devel
124Summary: Development files for OpenJPEG2 JPWL module
125Requires: %{name}-devel = %{version}-%{release}
126Requires: %{name}-jpwl = %{version}-%{release}
127
128%description jpwl-devel
129Development files for OpenJPEG2 JPWL module
130
131
132%package jpwl-tools
133Summary: OpenJPEG2 JPWL module command line tools
134Requires: %{name}-jpwl = %{version}-%{release}
135
136%description jpwl-tools
137OpenJPEG2 JPWL module command line tools
138
139##### JPIP #####
140
141%package jpip
142Summary: OpenJPEG2 JPIP module
143Requires: %{name} = %{version}-%{release}
144
145%description jpip
146The OpenJPEG library is an open-source JPEG 2000 library developed in order to
147promote the use of JPEG 2000.
148
149This package contains the JPWL (JPEG 2000 standard Part 9 - Jpeg 2000 Interactive Protocol)
150
151
152%package jpip-devel
153Summary: Development files for OpenJPEG2 JPIP module
154Requires: %{name}-devel = %{version}-%{release}
155Requires: %{name}-jpwl = %{version}-%{release}
156
157%description jpip-devel
158Development files for OpenJPEG2 JPIP module
159
160
161%package jpip-tools
162Summary: OpenJPEG2 JPIP module command line tools
163Requires: %{name}-jpip = %{version}-%{release}
164Requires: jpackage-utils
165Requires: java
166
167%description jpip-tools
168OpenJPEG2 JPIP module command line tools
169
170##### JP3D #####
171
172%package jp3d
173Summary: OpenJPEG2 JP3D module
174Requires: %{name} = %{version}-%{release}
175
176%description jp3d
177The OpenJPEG library is an open-source JPEG 2000 library developed in order to
178promote the use of JPEG 2000.
179
180This package contains the JP3D (JPEG 2000 standard Part 10 - Jpeg 2000 3D)
181
182
183%package jp3d-devel
184Summary: Development files for OpenJPEG2 JP3D module
185Requires: %{name}-devel = %{version}-%{release}
186Requires: %{name}-jp3d = %{version}-%{release}
187
188%description jp3d-devel
189Development files for OpenJPEG2 JP3D module
190
191
192%package jp3d-tools
193Summary: OpenJPEG2 JP3D module command line tools
194Requires: %{name}-jp3d = %{version}-%{release}
195
196%description jp3d-tools
197OpenJPEG2 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
211export LDFLAGS="-Zhigh-mem -Zomf -lcx"
212export VENDOR="%{vendor}"
213
214mkdir build
215cd 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 ..
225cd ..
226
227make VERBOSE=1 -C build
228
229
230%install
231%make_install -C build
232
233
234# Docs are installed through %%doc
235rm -rf %{buildroot}%{_datadir}/doc/
236
237%if 0%{?optional_components}
238# Move the jar to the correct place
239mkdir -p %{buildroot}%{_javadir}
240mv %{buildroot}%{_datadir}/opj_jpip_viewer.jar %{buildroot}%{_javadir}/opj2_jpip_viewer.jar
241cat > %{buildroot}%{_bindir}/opj2_jpip_viewer <<EOF
242java -jar %{_javadir}/opj2_jpip_viewer.jar "$@"
243EOF
244chmod +x %{buildroot}%{_bindir}/opj2_jpip_viewer
245%endif
246
247
248#%ldconfig_scriptlets
249
250
251%check
252%if 0%{?runcheck}
253make 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
Note: See TracBrowser for help on using the repository browser.