openjpeg2-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  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: 2%{?_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. # opj_* to opj2_*
  32. Patch1: openjpeg2_opj2.patch
  33. Vendor: Project Vine
  34. Distribution: Vine Linux
  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: Development/Libraries
  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: Applications/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. %prep
  162. %setup -q -n %{upname}-%{version} %{?runcheck:-a 1}
  163. %patch0 -p1
  164. %patch1 -p1
  165. # Remove all third party libraries just to be sure
  166. rm -rf thirdparty
  167. %build
  168. mkdir %{_target_platform}
  169. pushd %{_target_platform}
  170. # TODO: Consider
  171. # -DBUILD_JPIP_SERVER=ON -DBUILD_JAVA=ON
  172. %cmake \
  173. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  174. -DOPENJPEG_INSTALL_LIB_DIR=%{_lib} \
  175. %{?optional_components:-DBUILD_MJ2=ON -DBUILD_JPWL=ON -DBUILD_JPIP=ON -DBUILD_JP3D=ON} \
  176. -DBUILD_DOC=ON \
  177. -DBUILD_STATIC_LIBS=OFF \
  178. -DBUILD_SHARED_LIBS=ON \
  179. %{?runcheck:-DBUILD_TESTING:BOOL=ON -DOPJ_DATA_ROOT=$PWD/../data} \
  180. ..
  181. popd
  182. make VERBOSE=1 -C %{_target_platform} %{?_smp_mflags}
  183. %install
  184. %make_install -C %{_target_platform}
  185. # Rename to avoid conflicts with openjpeg-1.x
  186. mv %{buildroot}%{_mandir}/man1/opj_compress.1 %{buildroot}%{_mandir}/man1/opj2_compress.1
  187. mv %{buildroot}%{_mandir}/man1/opj_decompress.1 %{buildroot}%{_mandir}/man1/opj2_decompress.1
  188. mv %{buildroot}%{_mandir}/man1/opj_dump.1 %{buildroot}%{_mandir}/man1/opj2_dump.1
  189. # Docs are installed through %%doc
  190. rm -rf %{buildroot}%{_datadir}/doc/
  191. %if 0%{?optional_components}
  192. # Move the jar to the correct place
  193. mkdir -p %{buildroot}%{_javadir}
  194. mv %{buildroot}%{_datadir}/opj_jpip_viewer.jar %{buildroot}%{_javadir}/opj2_jpip_viewer.jar
  195. cat > %{buildroot}%{_bindir}/opj2_jpip_viewer <<EOF
  196. java -jar %{_javadir}/opj2_jpip_viewer.jar "$@"
  197. EOF
  198. chmod +x %{buildroot}%{_bindir}/opj2_jpip_viewer
  199. %endif
  200. %post -p /sbin/ldconfig
  201. %postun -p /sbin/ldconfig
  202. %check
  203. %if 0%{?runcheck}
  204. make test -C %{_target_platform}
  205. %endif
  206. %files
  207. %{!?_licensedir:%global license %doc}
  208. %license LICENSE
  209. %doc AUTHORS* CHANGELOG* NEWS* README* THANKS*
  210. %{_libdir}/libopenjp2.so.*
  211. %{_mandir}/man3/libopenjp2.3*
  212. %files devel
  213. %dir %{_includedir}/openjpeg-%{minor_version}/
  214. %{_includedir}/openjpeg-%{minor_version}/openjpeg.h
  215. %{_includedir}/openjpeg-%{minor_version}/opj_config.h
  216. %{_includedir}/openjpeg-%{minor_version}/opj_stdint.h
  217. %{_libdir}/libopenjp2.so
  218. %{_libdir}/openjpeg-%{minor_version}/
  219. %{_libdir}/pkgconfig/libopenjp2.pc
  220. %files devel-docs
  221. %doc %{_target_platform}/doc/html
  222. %files tools
  223. %{_bindir}/opj2_compress
  224. %{_bindir}/opj2_decompress
  225. %{_bindir}/opj2_dump
  226. %{_mandir}/man1/opj2_compress.1*
  227. %{_mandir}/man1/opj2_decompress.1*
  228. %{_mandir}/man1/opj2_dump.1*
  229. %if 0%{?optional_components}
  230. %files mj2
  231. %{_libdir}/libopenmj2.so.*
  232. %files mj2-devel
  233. %{_libdir}/libopenmj2.so
  234. %files mj2-tools
  235. %{_bindir}/opj2_mj2*
  236. %files jpwl
  237. %{_libdir}/libopenjpwl.so.*
  238. %files jpwl-devel
  239. %{_libdir}/libopenjpwl.so
  240. %{_libdir}/pkgconfig/libopenjpwl.pc
  241. %files jpwl-tools
  242. %{_bindir}/opj2_jpwl*
  243. %files jpip
  244. %{_libdir}/libopenjpip.so.*
  245. %files jpip-devel
  246. %{_libdir}/libopenjpip.so
  247. %{_libdir}/pkgconfig/libopenjpip.pc
  248. %files jpip-tools
  249. %{_bindir}/opj2_jpip*
  250. %{_bindir}/opj2_dec_server
  251. %{_javadir}/opj2_jpip_viewer.jar
  252. %files jp3d
  253. %{_libdir}/libopenjp3d.so.*
  254. %files jp3d-devel
  255. %{_includedir}/openjpeg-2.0/openjp3d.h
  256. %{_libdir}/libopenjp3d.so
  257. %{_libdir}/pkgconfig/libopenjp3d.pc
  258. %files jp3d-tools
  259. %{_bindir}/opj2_jp3d*
  260. %endif
  261. %changelog
  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