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