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