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

Revision 9258, 10.3 KB checked in by inagaki, 9 years ago (diff)

2015-01-13 Ryoichi INAGAKI <ryo1@…>

  • anjuta, nautilus: modified Group
  • openjpeg2: added Group


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