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

Revision 12121, 10.9 KB checked in by tomop, 5 years ago (diff)

Merge branch 'tomop'

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