openjpeg2-vl.spec 11 KB

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