openjpeg2-vl.spec 10 KB

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