]> git.pld-linux.org Git - packages/jasper.git/blob - jasper.spec
- bcond for experimental libheif support
[packages/jasper.git] / jasper.spec
1 #
2 # Conditional build:
3 %bcond_without  opengl  # (OpenGL-based) jiv viewer
4 %bcond_without  libheif # support for libheif and HEIC codec (experimental)
5 #
6 Summary:        JasPer - collection of software for coding and manipulation of images
7 Summary(pl.UTF-8):      JasPer - zestaw oprogramowania do obróbki obrazków
8 Name:           jasper
9 Version:        3.0.6
10 Release:        2
11 Epoch:          0
12 License:        JasPer v2.0 (BSD-like)
13 Group:          Libraries
14 #Source0Download: https://github.com/jasper-software/jasper/releases
15 Source0:        https://github.com/jasper-software/jasper/releases/download/version-%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5:  f9388d52a6220303141a42d4c2c81e62
17 Patch0:         parallel-doc-build.patch
18 URL:            https://www.ece.uvic.ca/~frodo/jasper/
19 %{?with_opengl:BuildRequires:   OpenGL-glut-devel}
20 BuildRequires:  cmake >= 3.12
21 BuildRequires:  doxygen
22 BuildRequires:  gcc >= 6:4.7
23 %{?with_libheif:BuildRequires:  libheif-devel}
24 BuildRequires:  libjpeg-devel
25 BuildRequires:  rpmbuild(macros) >= 1.605
26 BuildRequires:  tex-latex-adjustbox
27 BuildRequires:  texlive-format-pdflatex
28 BuildRequires:  texlive-latex-ams
29 BuildRequires:  texlive-latex-extend
30 BuildRequires:  texlive-latex-wasysym
31 BuildRequires:  texlive-tex-xkeyval
32 BuildRequires:  texlive-xetex
33 BuildRequires:  unzip
34 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 JasPer is a collection of software (i.e., a library and application
39 programs) for the coding and manipulation of images. This software can
40 handle image data in a variety of formats. One such format supported
41 by JasPer is the JPEG-2000 code stream format defined in ISO/IEC
42 15444-1:2000 (but JasPer contains only partial implementation).
43
44 %description -l pl.UTF-8
45 JasPer to zestaw oprogramowania (biblioteka i aplikacje) do kodowania
46 i obróbki obrazków w różnych formatach. Jednym z nich jest JPEG-2000
47 zdefiniowany w ISO/IEC 15444-1:2000 (JasPer zawiera tylko częściową
48 implementację tego formatu).
49
50 %package libs
51 Summary:        JasPer library
52 Summary(pl.UTF-8):      Biblioteka JasPer
53 Group:          Libraries
54
55 %description libs
56 JasPer library.
57
58 %description libs -l pl.UTF-8
59 Biblioteka JasPer.
60
61 %package devel
62 Summary:        JasPer - header files
63 Summary(pl.UTF-8):      JasPer - pliki nagłówkowe
64 Group:          Development/Libraries
65 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
66 Requires:       libjpeg-devel
67 Obsoletes:      jasper-static < 2
68
69 %description devel
70 Header files needed to compile programs with libjasper.
71
72 %description devel -l pl.UTF-8
73 Pliki nagłówkowe potrzebne do konsolidacji z libjasper.
74
75 %package jiv
76 Summary:        JasPer Image Viewer
77 Summary(pl.UTF-8):      Przeglądarka obrazków JasPer
78 Group:          X11/Applications/Graphics
79 Requires:       %{name} = %{epoch}:%{version}-%{release}
80
81 %description jiv
82 Simple JasPer Image Viewer. Basic pan and zoom functionality is
83 provided. Components of an image may be viewed individually. Color
84 components may also be viewed together as a composite image. At
85 present, the jiv image viewer has only trivial support for color. It
86 recognizes RGB and YCbCr color spaces, but does not use tone
87 reproduction curves and the like in order to accurately reproduce
88 color. For basic testing purposes, however, the color reproduction
89 should suffice.
90
91 %description jiv -l pl.UTF-8
92 Prosta przeglądarka obrazków JasPer. Ma podstawową funkcjonalność
93 przewijania i powiększania. Poszczególne składniki obrazka mogą być
94 oglądane oddzielnie. Składowe kolory mogą być oglądane także razem,
95 jako złożony obraz. Aktualnie przeglądarka ma tylko prostą obsługę
96 koloru. Rozpoznaje przestrzenie RGB i YCbCr, ale nie używa krzywych
97 reprodukcji tonalnej i podobnych rzeczy mających za zadanie dokładne
98 odwzorowanie koloru. Do podstawowych celów testowych taka obsługa
99 kolorów powinna jednak wystarczyć.
100
101 %prep
102 %setup -q
103 %patch0 -p1
104
105 %build
106 # there is upstream directory named "build", use different name
107 install -d builddir
108 cd builddir
109 # note: build/jasper.pc.in expects CMAKE_INSTALL_INCLUDEDIR and CMAKE_INSTALL_LIBDIR relative to CMAKE_INSTALL_PREFIX
110 %cmake .. \
111         -DCMAKE_INSTALL_INCLUDEDIR:PATH=include \
112         -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
113         -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF \
114         %{!?with_opengl:-DJAS_ENABLE_OPENGL=OFF} \
115         %{!?with_libheif:-DJAS_ENABLE_LIBHEIF=OFF} \
116         %{!?with_libheif:-DJAS_INCLUDE_HEIC_CODEC=OFF}
117
118 %{__make}
119
120 %install
121 rm -rf $RPM_BUILD_ROOT
122
123 %{__make} -C builddir install \
124         DESTDIR=$RPM_BUILD_ROOT
125
126 # PDFs packaged as %doc, HTML redundant
127 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/{html,*.pdf,README.md}
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %post   libs -p /sbin/ldconfig
133 %postun libs -p /sbin/ldconfig
134
135 %files
136 %defattr(644,root,root,755)
137 %attr(755,root,root) %{_bindir}/imgcmp
138 %attr(755,root,root) %{_bindir}/imginfo
139 %attr(755,root,root) %{_bindir}/jasper
140 %{_mandir}/man1/imgcmp.1*
141 %{_mandir}/man1/imginfo.1*
142 %{_mandir}/man1/jasper.1*
143
144 %files libs
145 %defattr(644,root,root,755)
146 %doc ChangeLog LICENSE.txt NEWS.txt README.md doc/jpeg2000.pdf
147 %attr(755,root,root) %{_libdir}/libjasper.so.*.*.*
148 %attr(755,root,root) %ghost %{_libdir}/libjasper.so.6
149
150 %files devel
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_libdir}/libjasper.so
153 %{_includedir}/jasper
154 %{_pkgconfigdir}/jasper.pc
155
156 %if %{with opengl}
157 %files jiv
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_bindir}/jiv
160 %{_mandir}/man1/jiv.1*
161 %endif
This page took 0.160856 seconds and 4 git commands to generate.