source: projects/specs/trunk/o/openjpeg2/openjpeg2-vl.spec @ 10954

Revision 10954, 10.6 KB checked in by tomop, 7 years ago (diff)

gd-2.2.4-1 g/gd/gd-vl.spec

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