openjpeg2-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  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.1
  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. Vendor: Project Vine
  32. Distribution: Vine Linux
  33. BuildRequires: cmake
  34. BuildRequires: zlib-devel
  35. BuildRequires: libpng-devel
  36. BuildRequires: libtiff-devel
  37. BuildRequires: lcms2-devel
  38. BuildRequires: doxygen
  39. %if 0%{?optional_components}
  40. BuildRequires: java-devel
  41. BuildRequires: xerces-j2
  42. %endif
  43. %description
  44. The OpenJPEG library is an open-source JPEG 2000 library developed in order to
  45. promote the use of JPEG 2000.
  46. This package contains
  47. * JPEG 2000 codec compliant with the Part 1 of the standard (Class-1 Profile-1
  48. compliance).
  49. * JP2 (JPEG 2000 standard Part 2 - Handling of JP2 boxes and extended multiple
  50. component transforms for multispectral and hyperspectral imagery)
  51. %package devel
  52. Summary: Development files for OpenJPEG 2
  53. Summary(ja): OpenJPEG 2 の開発用ファイル
  54. Group: Development/Libraries
  55. Requires: %{name}%{?_isa} = %{version}-%{release}
  56. %description devel
  57. The %{name}-devel package contains libraries and header files for developing
  58. applications that use OpenJPEG 2.
  59. %package devel-docs
  60. Summary: Developer documentation for OpenJPEG 2
  61. Summary(ja): OpenJPEG 2 の開発用ドキュメント
  62. Group: Documentation
  63. BuildArch: noarch
  64. %description devel-docs
  65. The %{name}-devel-docs package contains documentation files for developing
  66. applications that use OpenJPEG 2.
  67. %package tools
  68. Summary: OpenJPEG 2 command line tools
  69. Summary(ja): OpenJPEG 2 のコマンドラインツール集
  70. Group: Applications/Graphics
  71. Requires: %{name}%{?_isa} = %{version}-%{release}
  72. %description tools
  73. Command line tools for JPEG 2000 file manipulation, using OpenJPEG2:
  74. * opj2_compress
  75. * opj2_decompress
  76. * opj2_dump
  77. %if 0%{?optional_components}
  78. ##### MJ2 #####
  79. %package mj2
  80. Summary: OpenJPEG2 MJ2 module
  81. Requires: %{name}%{?_isa} = %{version}-%{release}
  82. %description mj2
  83. The OpenJPEG library is an open-source JPEG 2000 library developed in order to
  84. promote the use of JPEG 2000.
  85. This package contains the MJ2 module (JPEG 2000 standard Part 3)
  86. %package mj2-devel
  87. Summary: Development files for OpenJPEG2 MJ2 module
  88. Requires: %{name}-devel%{?_isa} = %{version}-%{release}
  89. Requires: %{name}-mj2%{?_isa} = %{version}-%{release}
  90. %description mj2-devel
  91. Development files for OpenJPEG2 MJ2 module
  92. %package mj2-tools
  93. Summary: OpenJPEG2 MJ2 module command line tools
  94. Requires: %{name}-mj2%{?_isa} = %{version}-%{release}
  95. %description mj2-tools
  96. OpenJPEG2 MJ2 module command line tools
  97. ##### JPWL #####
  98. %package jpwl
  99. Summary: OpenJPEG2 JPWL module
  100. Requires: %{name}%{?_isa} = %{version}-%{release}
  101. %description jpwl
  102. The OpenJPEG library is an open-source JPEG 2000 library developed in order to
  103. promote the use of JPEG 2000.
  104. This package contains the JPWL (JPEG 2000 standard Part 11 - Jpeg 2000 Wireless)
  105. %package jpwl-devel
  106. Summary: Development files for OpenJPEG2 JPWL module
  107. Requires: %{name}-devel%{?_isa} = %{version}-%{release}
  108. Requires: %{name}-jpwl%{?_isa} = %{version}-%{release}
  109. %description jpwl-devel
  110. Development files for OpenJPEG2 JPWL module
  111. %package jpwl-tools
  112. Summary: OpenJPEG2 JPWL module command line tools
  113. Requires: %{name}-jpwl%{?_isa} = %{version}-%{release}
  114. %description jpwl-tools
  115. OpenJPEG2 JPWL module command line tools
  116. ##### JPIP #####
  117. %package jpip
  118. Summary: OpenJPEG2 JPIP module
  119. Requires: %{name}%{?_isa} = %{version}-%{release}
  120. %description jpip
  121. The OpenJPEG library is an open-source JPEG 2000 library developed in order to
  122. promote the use of JPEG 2000.
  123. This package contains the JPWL (JPEG 2000 standard Part 9 - Jpeg 2000 Interactive Protocol)
  124. %package jpip-devel
  125. Summary: Development files for OpenJPEG2 JPIP module
  126. Requires: %{name}-devel%{?_isa} = %{version}-%{release}
  127. Requires: %{name}-jpwl%{?_isa} = %{version}-%{release}
  128. %description jpip-devel
  129. Development files for OpenJPEG2 JPIP module
  130. %package jpip-tools
  131. Summary: OpenJPEG2 JPIP module command line tools
  132. Requires: %{name}-jpip%{?_isa} = %{version}-%{release}
  133. Requires: jpackage-utils
  134. Requires: java
  135. %description jpip-tools
  136. OpenJPEG2 JPIP module command line tools
  137. ##### JP3D #####
  138. %package jp3d
  139. Summary: OpenJPEG2 JP3D module
  140. Requires: %{name}%{?_isa} = %{version}-%{release}
  141. %description jp3d
  142. The OpenJPEG library is an open-source JPEG 2000 library developed in order to
  143. promote the use of JPEG 2000.
  144. This package contains the JP3D (JPEG 2000 standard Part 10 - Jpeg 2000 3D)
  145. %package jp3d-devel
  146. Summary: Development files for OpenJPEG2 JP3D module
  147. Requires: %{name}-devel%{?_isa} = %{version}-%{release}
  148. Requires: %{name}-jp3d%{?_isa} = %{version}-%{release}
  149. %description jp3d-devel
  150. Development files for OpenJPEG2 JP3D module
  151. %package jp3d-tools
  152. Summary: OpenJPEG2 JP3D module command line tools
  153. Requires: %{name}-jp3d%{?_isa} = %{version}-%{release}
  154. %description jp3d-tools
  155. OpenJPEG2 JP3D module command line tools
  156. %endif
  157. %prep
  158. %setup -q -n %{upname}-%{version} %{?runcheck:-a 1}
  159. %patch0 -p1
  160. # Remove all third party libraries just to be sure
  161. rm -rf thirdparty
  162. %build
  163. mkdir %{_target_platform}
  164. pushd %{_target_platform}
  165. # TODO: Consider
  166. # -DBUILD_JPIP_SERVER=ON -DBUILD_JAVA=ON
  167. %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENJPEG_INSTALL_LIB_DIR=%{_lib} \
  168. %{?optional_components:-DBUILD_MJ2=ON -DBUILD_JPWL=ON -DBUILD_JPIP=ON -DBUILD_JP3D=ON} \
  169. -DBUILD_DOC=ON \
  170. %{?runcheck:-DBUILD_TESTING:BOOL=ON -DOPJ_DATA_ROOT=$PWD/../data} \
  171. ..
  172. popd
  173. make VERBOSE=1 -C %{_target_platform} %{?_smp_mflags}
  174. %install
  175. %make_install -C %{_target_platform}
  176. # Rename to avoid conflicts with openjpeg-1.x
  177. for file in %{buildroot}%{_bindir}/opj_*; do
  178. mv $file ${file/opj_/opj2_}
  179. done
  180. mv %{buildroot}%{_mandir}/man1/opj_compress.1 %{buildroot}%{_mandir}/man1/opj2_compress.1
  181. mv %{buildroot}%{_mandir}/man1/opj_decompress.1 %{buildroot}%{_mandir}/man1/opj2_decompress.1
  182. mv %{buildroot}%{_mandir}/man1/opj_dump.1 %{buildroot}%{_mandir}/man1/opj2_dump.1
  183. # Docs are installed through %%doc
  184. rm -rf %{buildroot}%{_datadir}/doc/
  185. %if 0%{?optional_components}
  186. # Move the jar to the correct place
  187. mkdir -p %{buildroot}%{_javadir}
  188. mv %{buildroot}%{_datadir}/opj_jpip_viewer.jar %{buildroot}%{_javadir}/opj2_jpip_viewer.jar
  189. cat > %{buildroot}%{_bindir}/opj2_jpip_viewer <<EOF
  190. java -jar %{_javadir}/opj2_jpip_viewer.jar "$@"
  191. EOF
  192. chmod +x %{buildroot}%{_bindir}/opj2_jpip_viewer
  193. %endif
  194. # drop a static library.
  195. rm -f %{buildroot}%{_libdir}/libopenjp2.a
  196. %post -p /sbin/ldconfig
  197. %postun -p /sbin/ldconfig
  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. * Mon Aug 12 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.3.1-1
  259. - new upstream release.
  260. * Fri Dec 15 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.3.0-1
  261. - new upstream release.
  262. - dropped %%patch1 and 2: fixed in upstream.
  263. * Mon Mar 20 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.2-1
  264. - new upstream release.
  265. * Tue Jan 13 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.1.0-5
  266. - added japanese summary and Group tag
  267. * Wed Dec 24 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.0-4
  268. - initial build for Vine Linux.
  269. * Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-3
  270. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
  271. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-2
  272. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  273. * Tue May 27 2014 Sandro Mani <manisandro@gmail.com> - 2.1.0-1
  274. * Wed Apr 16 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-5
  275. - Switch to official 2.0 release and backport pkg-config patch
  276. * Thu Apr 10 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-4.svn20140403
  277. - Replace define with global
  278. - Fix #define optional_components 1S typo
  279. - Fix %%(pwd) -> $PWD for test data
  280. - Added some BR for optional components
  281. - Include opj2_jpip_viewer.jar in %%files
  282. * Wed Apr 09 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-3.svn20140403
  283. - Fix source url
  284. - Fix mixed tabs and spaces
  285. - Fix description too long
  286. * Wed Apr 09 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-2.svn20140403
  287. - Remove thirdparty libraries folder in prep
  288. - Own %%{_libdir}/openjpeg-2.0/
  289. - Fix Requires
  290. - Add missing ldconfig
  291. - Add possibility to run conformance tests if desired
  292. * Thu Apr 03 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-1.svn20140403
  293. - Initial package