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

Revision 11265, 10.6 KB checked in by tomop, 6 years ago (diff)

openjpeg2-2.3.0-1

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.0
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
38BuildRequires:  cmake
39BuildRequires:  zlib-devel
40BuildRequires:  libpng-devel
41BuildRequires:  libtiff-devel
42BuildRequires:  lcms2-devel
43BuildRequires:  doxygen
44
45%if 0%{?optional_components}
46BuildRequires:  java-devel
47BuildRequires:  xerces-j2
48%endif
49
50%description
51The OpenJPEG library is an open-source JPEG 2000 library developed in order to
52promote the use of JPEG 2000.
53
54This package contains
55* JPEG 2000 codec compliant with the Part 1 of the standard (Class-1 Profile-1
56  compliance).
57* JP2 (JPEG 2000 standard Part 2 - Handling of JP2 boxes and extended multiple
58  component transforms for multispectral and hyperspectral imagery)
59
60
61%package devel
62Summary:        Development files for OpenJPEG 2
63Summary(ja):    OpenJPEG 2 の開発用ファイル
64Group:          Development/Libraries
65Requires:       %{name}%{?_isa} = %{version}-%{release}
66
67%description devel
68The %{name}-devel package contains libraries and header files for developing
69applications that use OpenJPEG 2.
70
71
72%package devel-docs
73Summary:        Developer documentation for OpenJPEG 2
74Summary(ja):    OpenJPEG 2 の開発用ドキュメント
75Group:          Documentation
76BuildArch:      noarch
77
78%description devel-docs
79The %{name}-devel-docs package contains documentation files for developing
80applications that use OpenJPEG 2.
81
82
83%package tools
84Summary:        OpenJPEG 2 command line tools
85Summary(ja):    OpenJPEG 2 のコマンドラインツール集
86Group:          Applications/Graphics
87Requires:       %{name}%{?_isa} = %{version}-%{release}
88
89%description tools
90Command line tools for JPEG 2000 file manipulation, using OpenJPEG2:
91 * opj2_compress
92 * opj2_decompress
93 * opj2_dump
94
95%if 0%{?optional_components}
96##### MJ2 #####
97 
98%package mj2
99Summary:        OpenJPEG2 MJ2 module
100Requires:       %{name}%{?_isa} = %{version}-%{release}
101
102%description mj2
103The OpenJPEG library is an open-source JPEG 2000 library developed in order to
104promote the use of JPEG 2000.
105
106This package contains the MJ2 module (JPEG 2000 standard Part 3)
107
108
109%package mj2-devel
110Summary:        Development files for OpenJPEG2 MJ2 module
111Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
112Requires:       %{name}-mj2%{?_isa} = %{version}-%{release}
113
114%description mj2-devel
115Development files for OpenJPEG2 MJ2 module
116
117
118%package mj2-tools
119Summary:        OpenJPEG2 MJ2 module command line tools
120Requires:       %{name}-mj2%{?_isa} = %{version}-%{release}
121
122%description mj2-tools
123OpenJPEG2 MJ2 module command line tools
124
125##### JPWL #####
126
127%package jpwl
128Summary:        OpenJPEG2 JPWL module
129Requires:       %{name}%{?_isa} = %{version}-%{release}
130
131%description jpwl
132The OpenJPEG library is an open-source JPEG 2000 library developed in order to
133promote the use of JPEG 2000.
134
135This package contains the JPWL (JPEG 2000 standard Part 11 - Jpeg 2000 Wireless)
136
137
138%package jpwl-devel
139Summary:        Development files for OpenJPEG2 JPWL module
140Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
141Requires:       %{name}-jpwl%{?_isa} = %{version}-%{release}
142
143%description jpwl-devel
144Development files for OpenJPEG2 JPWL module
145
146
147%package jpwl-tools
148Summary:        OpenJPEG2 JPWL module command line tools
149Requires:       %{name}-jpwl%{?_isa} = %{version}-%{release}
150
151%description jpwl-tools
152OpenJPEG2 JPWL module command line tools
153
154##### JPIP #####
155
156%package jpip
157Summary:        OpenJPEG2 JPIP module
158Requires:       %{name}%{?_isa} = %{version}-%{release}
159
160%description jpip
161The OpenJPEG library is an open-source JPEG 2000 library developed in order to
162promote the use of JPEG 2000.
163
164This package contains the JPWL (JPEG 2000 standard Part 9 - Jpeg 2000 Interactive Protocol)
165
166
167%package jpip-devel
168Summary:        Development files for OpenJPEG2 JPIP module
169Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
170Requires:       %{name}-jpwl%{?_isa} = %{version}-%{release}
171
172%description jpip-devel
173Development files for OpenJPEG2 JPIP module
174
175
176%package jpip-tools
177Summary:        OpenJPEG2 JPIP module command line tools
178Requires:       %{name}-jpip%{?_isa} = %{version}-%{release}
179Requires:       jpackage-utils
180Requires:       java
181
182%description jpip-tools
183OpenJPEG2 JPIP module command line tools
184
185##### JP3D #####
186
187%package jp3d
188Summary:        OpenJPEG2 JP3D module
189Requires:       %{name}%{?_isa} = %{version}-%{release}
190
191%description jp3d
192The OpenJPEG library is an open-source JPEG 2000 library developed in order to
193promote the use of JPEG 2000.
194
195This package contains the JP3D (JPEG 2000 standard Part 10 - Jpeg 2000 3D)
196
197
198%package jp3d-devel
199Summary:        Development files for OpenJPEG2 JP3D module
200Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
201Requires:       %{name}-jp3d%{?_isa} = %{version}-%{release}
202
203%description jp3d-devel
204Development files for OpenJPEG2 JP3D module
205
206
207%package jp3d-tools
208Summary:        OpenJPEG2 JP3D module command line tools
209Requires:       %{name}-jp3d%{?_isa} = %{version}-%{release}
210
211%description jp3d-tools
212OpenJPEG2 JP3D module command line tools
213%endif
214
215
216%prep
217%setup -q -n %{upname}-%{version} %{?runcheck:-a 1}
218
219%patch0 -p1
220
221# Remove all third party libraries just to be sure
222rm -rf thirdparty
223
224
225%build
226mkdir %{_target_platform}
227pushd %{_target_platform}
228# TODO: Consider
229# -DBUILD_JPIP_SERVER=ON -DBUILD_JAVA=ON
230%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENJPEG_INSTALL_LIB_DIR=%{_lib} \
231    %{?optional_components:-DBUILD_MJ2=ON -DBUILD_JPWL=ON -DBUILD_JPIP=ON -DBUILD_JP3D=ON} \
232    -DBUILD_DOC=ON \
233    %{?runcheck:-DBUILD_TESTING:BOOL=ON -DOPJ_DATA_ROOT=$PWD/../data} \
234    ..
235popd
236
237make VERBOSE=1 -C %{_target_platform} %{?_smp_mflags}
238
239
240%install
241%make_install -C %{_target_platform}
242
243# Rename to avoid conflicts with openjpeg-1.x
244for file in %{buildroot}%{_bindir}/opj_*; do
245    mv $file ${file/opj_/opj2_}
246done
247mv %{buildroot}%{_mandir}/man1/opj_compress.1 %{buildroot}%{_mandir}/man1/opj2_compress.1
248mv %{buildroot}%{_mandir}/man1/opj_decompress.1 %{buildroot}%{_mandir}/man1/opj2_decompress.1
249mv %{buildroot}%{_mandir}/man1/opj_dump.1 %{buildroot}%{_mandir}/man1/opj2_dump.1
250
251# Docs are installed through %%doc
252rm -rf %{buildroot}%{_datadir}/doc/
253
254%if 0%{?optional_components}
255# Move the jar to the correct place
256mkdir -p %{buildroot}%{_javadir}
257mv %{buildroot}%{_datadir}/opj_jpip_viewer.jar %{buildroot}%{_javadir}/opj2_jpip_viewer.jar
258cat > %{buildroot}%{_bindir}/opj2_jpip_viewer <<EOF
259java -jar %{_javadir}/opj2_jpip_viewer.jar "$@"
260EOF
261chmod +x %{buildroot}%{_bindir}/opj2_jpip_viewer
262%endif
263
264
265%post -p /sbin/ldconfig
266
267
268%postun -p /sbin/ldconfig
269
270
271%check
272%if 0%{?runcheck}
273make test -C %{_target_platform}
274%endif
275
276
277%files
278%doc AUTHORS* CHANGELOG* LICENSE NEWS* README* THANKS*
279%{_libdir}/libopenjp2.so.*
280%{_mandir}/man3/libopenjp2.3*
281
282%files devel
283%dir %{_includedir}/openjpeg-%{minor_version}/
284%{_includedir}/openjpeg-%{minor_version}/openjpeg.h
285%{_includedir}/openjpeg-%{minor_version}/opj_config.h
286%{_includedir}/openjpeg-%{minor_version}/opj_stdint.h
287%{_libdir}/libopenjp2.so
288%{_libdir}/openjpeg-%{minor_version}/
289%{_libdir}/pkgconfig/libopenjp2.pc
290
291%files devel-docs
292%doc %{_target_platform}/doc/html
293
294%files tools
295%{_bindir}/opj2_compress
296%{_bindir}/opj2_decompress
297%{_bindir}/opj2_dump
298%{_mandir}/man1/opj2_compress.1*
299%{_mandir}/man1/opj2_decompress.1*
300%{_mandir}/man1/opj2_dump.1*
301
302%if 0%{?optional_components}
303%files mj2
304%{_libdir}/libopenmj2.so.*
305
306%files mj2-devel
307%{_libdir}/libopenmj2.so
308
309%files mj2-tools
310%{_bindir}/opj2_mj2*
311
312%files jpwl
313%{_libdir}/libopenjpwl.so.*
314
315%files jpwl-devel
316%{_libdir}/libopenjpwl.so
317%{_libdir}/pkgconfig/libopenjpwl.pc
318
319%files jpwl-tools
320%{_bindir}/opj2_jpwl*
321
322%files jpip
323%{_libdir}/libopenjpip.so.*
324
325%files jpip-devel
326%{_libdir}/libopenjpip.so
327%{_libdir}/pkgconfig/libopenjpip.pc
328
329%files jpip-tools
330%{_bindir}/opj2_jpip*
331%{_bindir}/opj2_dec_server
332%{_javadir}/opj2_jpip_viewer.jar
333
334%files jp3d
335%{_libdir}/libopenjp3d.so.*
336
337%files jp3d-devel
338%{_includedir}/openjpeg-2.0/openjp3d.h
339%{_libdir}/libopenjp3d.so
340%{_libdir}/pkgconfig/libopenjp3d.pc
341
342%files jp3d-tools
343%{_bindir}/opj2_jp3d*
344%endif
345
346
347%changelog
348* Fri Dec 15 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.3.0-1
349- new upstream release.
350- dropped %%patch1 and 2: fixed in upstream.
351
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.