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