openjpeg2-vl.spec 11 KB

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