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

Revision 12273, 11.0 KB checked in by tomop, 5 years ago (diff)

updated 7 packages

cups-filters-1.25.11-1

icu-65.1-2

lsb-4.0-5

openjpeg2-2.3.1-2

poppler-data-0.4.9-1

poppler-0.81.0-2

poppler061-0.61.1-2

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