| 1 |
|
|---|
| 2 | # NOTE: packages that can use jasper:
|
|---|
| 3 | # ImageMagick
|
|---|
| 4 | # netpbm
|
|---|
| 5 |
|
|---|
| 6 | Summary: Implementation of the JPEG-2000 standard, Part 1
|
|---|
| 7 | Name: jasper
|
|---|
| 8 | Version: 2.0.24
|
|---|
| 9 | Release: 1%{?dist}
|
|---|
| 10 |
|
|---|
| 11 | License: JasPer
|
|---|
| 12 | URL: http://www.ece.uvic.ca/~frodo/jasper/
|
|---|
| 13 | %if !0%{?os2_version}
|
|---|
| 14 | Source0: https://github.com/jasper-software/jasper/archive/version-%{version}.tar.gz
|
|---|
| 15 | %else
|
|---|
| 16 | %scm_source github http://github.com/TeLLie/%{name}-os2 %{version}-os2
|
|---|
| 17 | %endif
|
|---|
| 18 |
|
|---|
| 19 | # skip hard-coded prefix/lib rpath
|
|---|
| 20 | %if !0%{?os2_version}
|
|---|
| 21 | Patch2: jasper-2.0.14-rpath.patch
|
|---|
| 22 | Patch3: jasper-freeglut.patch
|
|---|
| 23 |
|
|---|
| 24 | # architecture related patches
|
|---|
| 25 | Patch100: jasper-2.0.2-test-ppc64-disable.patch
|
|---|
| 26 | Patch101: jasper-2.0.2-test-ppc64le-disable.patch
|
|---|
| 27 | %endif
|
|---|
| 28 |
|
|---|
| 29 | # autoreconf
|
|---|
| 30 | BuildRequires: cmake
|
|---|
| 31 | %if !0%{?os2_version}
|
|---|
| 32 | BuildRequires: freeglut-devel
|
|---|
| 33 | BuildRequires: libGLU-devel
|
|---|
| 34 | BuildRequires: libXmu-devel libXi-devel
|
|---|
| 35 | BuildRequires: mesa-libGL-devel
|
|---|
| 36 | %endif
|
|---|
| 37 | BuildRequires: libjpeg-devel
|
|---|
| 38 | BuildRequires: pkgconfig doxygen
|
|---|
| 39 |
|
|---|
| 40 | Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|---|
| 41 | BuildRequires: gcc
|
|---|
| 42 |
|
|---|
| 43 | %description
|
|---|
| 44 | This package contains an implementation of the image compression
|
|---|
| 45 | standard JPEG-2000, Part 1. It consists of tools for conversion to and
|
|---|
| 46 | from the JP2 and JPC formats.
|
|---|
| 47 |
|
|---|
| 48 | %package devel
|
|---|
| 49 | Summary: Header files, libraries and developer documentation
|
|---|
| 50 | Provides: libjasper-devel = %{version}-%{release}
|
|---|
| 51 | Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|---|
| 52 | Requires: libjpeg-devel
|
|---|
| 53 | Requires: pkgconfig
|
|---|
| 54 | %description devel
|
|---|
| 55 | %{summary}.
|
|---|
| 56 |
|
|---|
| 57 | %package libs
|
|---|
| 58 | Summary: Runtime libraries for %{name}
|
|---|
| 59 | Conflicts: jasper < 1.900.1-4
|
|---|
| 60 | %description libs
|
|---|
| 61 | %{summary}.
|
|---|
| 62 |
|
|---|
| 63 | %package utils
|
|---|
| 64 | Summary: Nonessential utilities for %{name}
|
|---|
| 65 | Requires: %{name} = %{version}-%{release}
|
|---|
| 66 | Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|---|
| 67 | %description utils
|
|---|
| 68 | %{summary}, including jiv and tmrdemo.
|
|---|
| 69 |
|
|---|
| 70 | %debug_package
|
|---|
| 71 |
|
|---|
| 72 | %prep
|
|---|
| 73 | %if !0%{?os2_version}
|
|---|
| 74 | %setup -q -n %{name}-version-%{version}
|
|---|
| 75 | %else
|
|---|
| 76 | %scm_setup
|
|---|
| 77 | %endif
|
|---|
| 78 |
|
|---|
| 79 | %if !0%{?os2_version}
|
|---|
| 80 | %patch2 -p1 -b .rpath
|
|---|
| 81 | # Need to disable one test to be able to build it on ppc64 arch
|
|---|
| 82 | # At ppc64 this test just stuck (nothing happend - no exception or error)
|
|---|
| 83 | %patch3 -p1 -b .freeglut
|
|---|
| 84 | %endif
|
|---|
| 85 |
|
|---|
| 86 | %if "%{_arch}" == "ppc64"
|
|---|
| 87 | %patch100 -p1 -b .test-ppc64-disable
|
|---|
| 88 | %endif
|
|---|
| 89 |
|
|---|
| 90 | # Need to disable two tests to be able to build it on ppc64le arch
|
|---|
| 91 | # At ppc64le this tests just stuck (nothing happend - no exception or error)
|
|---|
| 92 |
|
|---|
| 93 | %if "%{_arch}" == "ppc64le"
|
|---|
| 94 | %patch101 -p1 -b .test-ppc64le-disable
|
|---|
| 95 | %endif
|
|---|
| 96 |
|
|---|
| 97 | %build
|
|---|
| 98 | mkdir builder
|
|---|
| 99 | cd builder
|
|---|
| 100 |
|
|---|
| 101 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 102 | export LIBS="-lcx -lpthread"
|
|---|
| 103 | %cmake ..\
|
|---|
| 104 | -DJAS_ENABLE_DOC:BOOL=OFF
|
|---|
| 105 | %if !0%{?os2_version}
|
|---|
| 106 | -B builder
|
|---|
| 107 | %make_build -C builder
|
|---|
| 108 | %else
|
|---|
| 109 | make %{?_smp_mflags}
|
|---|
| 110 | %endif
|
|---|
| 111 |
|
|---|
| 112 | %install
|
|---|
| 113 | make install/fast DESTDIR=%{buildroot} -C builder
|
|---|
| 114 |
|
|---|
| 115 | # Unpackaged files
|
|---|
| 116 | rm -f doc/README
|
|---|
| 117 | rm -f %{buildroot}%{_libdir}/lib*.la
|
|---|
| 118 |
|
|---|
| 119 |
|
|---|
| 120 | %check
|
|---|
| 121 | %if !0%{?os2_version}
|
|---|
| 122 | make test -C builder
|
|---|
| 123 |
|
|---|
| 124 | %ldconfig_scriptlets libs
|
|---|
| 125 | %endif
|
|---|
| 126 |
|
|---|
| 127 | %files
|
|---|
| 128 | %if !0%{?os2_version}
|
|---|
| 129 | %{_bindir}/imgcmp
|
|---|
| 130 | %{_bindir}/imginfo
|
|---|
| 131 | %{_bindir}/jasper
|
|---|
| 132 | %else
|
|---|
| 133 | %{_bindir}/imgcmp.exe
|
|---|
| 134 | %{_bindir}/imginfo.exe
|
|---|
| 135 | %{_bindir}/jasper.exe
|
|---|
| 136 | %endif
|
|---|
| 137 | %{_mandir}/man1/img*
|
|---|
| 138 | %{_mandir}/man1/jasper.1*
|
|---|
| 139 | %{_docdir}/JasPer/*
|
|---|
| 140 |
|
|---|
| 141 | %files devel
|
|---|
| 142 | %doc doc/*
|
|---|
| 143 | %{_includedir}/jasper/
|
|---|
| 144 | %if !0%{?os2_version}
|
|---|
| 145 | %{_libdir}/libjasper.so
|
|---|
| 146 | %else
|
|---|
| 147 | %{_libdir}/*.a
|
|---|
| 148 | %endif
|
|---|
| 149 | %{_libdir}/pkgconfig/jasper.pc
|
|---|
| 150 |
|
|---|
| 151 | %files libs
|
|---|
| 152 | %doc README
|
|---|
| 153 | %license COPYRIGHT LICENSE
|
|---|
| 154 | %if !0%{?os2_version}
|
|---|
| 155 | %{_libdir}/libjasper.so.4*
|
|---|
| 156 | %else
|
|---|
| 157 | %{_libdir}/jasper*.dll
|
|---|
| 158 | %endif
|
|---|
| 159 |
|
|---|
| 160 | %if !0%{?os2_version}
|
|---|
| 161 | %files utils
|
|---|
| 162 | %{_bindir}/jiv
|
|---|
| 163 | %{_mandir}/man1/jiv.1*
|
|---|
| 164 | %endif
|
|---|
| 165 |
|
|---|
| 166 | %changelog
|
|---|
| 167 | * Thu Jan 07 2021 Elbert Pol <elbert.pol@gmail.com> - 2.0.24-1
|
|---|
| 168 | - Updated to latest version 2.0.24
|
|---|
| 169 |
|
|---|
| 170 | * Sat Oct 17 2020 Elbert Pol <elbert.pol@gmail.com> - 2.0.22-1
|
|---|
| 171 | - Updated to latest version 2.0.22
|
|---|
| 172 | - Change more os2 specifated lines in spec file
|
|---|
| 173 |
|
|---|
| 174 | * Fri Dec 28 2018 Elbert Pol <elbert.pol@gmail.com> - 2.0.14-2
|
|---|
| 175 | - Removed the dll from bindir
|
|---|
| 176 |
|
|---|
| 177 | * Thu Dec 27 2018 Elbert Pol <elbert.pol@gmail.com> - 2.0.14-1
|
|---|
| 178 | - First Rpm for OS/2
|
|---|