]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build | |
3 | %bcond_without tests # don't perform "make test" | |
4 | %bcond_without java # Java binding | |
5 | # | |
6 | %define libjpeg_ver 8c | |
7 | %define libjpeg_ver_lt 9-1 | |
8 | %define use_jdk openjdk8 | |
9 | Summary: SIMD accelerated library for manipulating JPEG image files | |
10 | Summary(pl.UTF-8): Biblioteka do obróbki plików obrazów JPEG z akceleracją SIMD | |
11 | Name: libjpeg-turbo | |
12 | Version: 2.1.4 | |
13 | Release: 3 | |
14 | # more specifically: IJG, modified-BSD or Zlib | |
15 | License: BSD-like | |
16 | Group: Libraries | |
17 | Source0: https://downloads.sourceforge.net/libjpeg-turbo/%{name}-%{version}.tar.gz | |
18 | # Source0-md5: 3241b54016c445e5d8f0ebb0ad9294ed | |
19 | Patch0: %{name}-x32-java.patch | |
20 | URL: https://libjpeg-turbo.org/ | |
21 | BuildRequires: cmake >= 3.9.0 | |
22 | %{?with_java:%buildrequires_jdk} | |
23 | %{?with_java:BuildRequires: openjdk8-jre-base-X11} | |
24 | BuildRequires: libstdc++-devel | |
25 | # x86* SIMD code uses NASM; ARM and MIPS use gas, PowerPC uses gcc intrinsics, no SIMD code for other archs | |
26 | %ifarch %{ix86} %{x8664} | |
27 | BuildRequires: nasm | |
28 | %endif | |
29 | BuildRequires: rpmbuild(macros) >= 1.605 | |
30 | Provides: libjpeg = %{libjpeg_ver} | |
31 | Obsoletes: libjpeg < %{libjpeg_ver_lt} | |
32 | Obsoletes: libjpegsimd < 7 | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
36 | libjpeg-turbo is a version of libjpeg which uses SIMD (MMX, SSE2, | |
37 | AVX2, NEON, AltiVec) instructions to accelerate JPEG | |
38 | compression/decompression x86, ARM and PowerPC platforms. | |
39 | ||
40 | It is based on libjpeg/SIMD but has numerous enhancements. | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | libjpeg-turbo to wersja biblioteki libjpeg wykorzystująca instrukcje | |
44 | SIMD (MMX, SSE2, AVX2, NEON, AltiVec) w celu przyspieszenia | |
45 | kompresji/dekompresji JPEG na platformach x86, ARM i PowerPC. | |
46 | ||
47 | Jest oparta na libjpeg/SIMD, ale ma wiele rozszerzeń. | |
48 | ||
49 | %package devel | |
50 | Summary: Headers for developing programs using libjpeg-turbo | |
51 | Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia programów przy użyciu libjpeg-turbo | |
52 | Group: Development/Libraries | |
53 | Requires: %{name} = %{version}-%{release} | |
54 | Provides: libjpeg-devel = %{libjpeg_ver} | |
55 | Obsoletes: libjpeg-devel < %{libjpeg_ver_lt} | |
56 | Obsoletes: libjpegsimd-devel < 7 | |
57 | Conflicts: libjpeg6-devel | |
58 | ||
59 | %description devel | |
60 | The libjpeg-turbo-devel package includes the header files necessary | |
61 | for developing programs which will manipulate JPEG files using the | |
62 | libjpeg-turbo library. | |
63 | ||
64 | %description devel -l de.UTF-8 | |
65 | Dieses Paket bietet alles, was Sie brauchen, um Programme zur | |
66 | Manipulation von JPEG-Grafiken, zu entwickeln. | |
67 | ||
68 | %description devel -l es.UTF-8 | |
69 | Este paquete es todo lo que necesitas para desarrollar programas que | |
70 | manipulen imágenes JPEG. | |
71 | ||
72 | %description devel -l fr.UTF-8 | |
73 | Ce package est tout ce dont vous avez besoin pour développer des | |
74 | programmes manipulant des images JPEG. | |
75 | ||
76 | %description devel -l pl.UTF-8 | |
77 | Ten pakiet zawiera pliki potrzebne do programowania z wykorzystaniem | |
78 | biblioteki libjpeg-turbo. | |
79 | ||
80 | %description devel -l pt_BR.UTF-8 | |
81 | Este pacote é tudo que você precisa para desenvolver programas que | |
82 | manipulam imagens JPEG. | |
83 | ||
84 | %description devel -l ru.UTF-8 | |
85 | В этом пакете содержится все необходимое для разработки программ, | |
86 | которые работают с JPEG-изображениями включая документацию. | |
87 | ||
88 | %description devel -l tr.UTF-8 | |
89 | Bu paket, JPEG resimlerini işleyen programlar geliştirmeniz için | |
90 | gereken başlık dosyalarını, kitaplıkları ve ilgili yardım belgelerini | |
91 | içerir. | |
92 | ||
93 | %description devel -l uk.UTF-8 | |
94 | Цей пакет містить все необхідне для розробки програм, котрі працюють з | |
95 | JPEG-зображеннями, включаючи документацію. | |
96 | ||
97 | %package static | |
98 | Summary: Static library for developing programs using libjpeg-turbo | |
99 | Summary(pl.UTF-8): Biblioteka statyczna libjpeg-turbo | |
100 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com libjpeg-turbo | |
101 | Summary(ru.UTF-8): Статическая библиотека для программирования с libjpeg-turbo | |
102 | Summary(uk.UTF-8): Статична бібліотека для програмування з libjpeg-turbo | |
103 | Group: Development/Libraries | |
104 | Requires: %{name}-devel = %{version}-%{release} | |
105 | Provides: libjpeg-static = %{libjpeg_ver} | |
106 | Obsoletes: libjpeg-static < %{libjpeg_ver_lt} | |
107 | Obsoletes: libjpegsimd-static < 7 | |
108 | Conflicts: libjpeg-turbo6-static | |
109 | ||
110 | %description static | |
111 | Static library for developing programs using libjpeg-turbo. | |
112 | ||
113 | %description static -l pl.UTF-8 | |
114 | Statyczna biblioteka libjpeg-turbo. | |
115 | ||
116 | %description static -l pt_BR.UTF-8 | |
117 | Bibliotecas estáticas para desenvolvimento com libjpeg-turbo. | |
118 | ||
119 | %description static -l ru.UTF-8 | |
120 | Этот пакет содержит статические библиотеки, необходимые для написания | |
121 | программ, использующих libjpeg-turbo. | |
122 | ||
123 | %description static -l uk.UTF-8 | |
124 | Цей пакет містить статичні бібліотеки, необхідні для написання | |
125 | програм, що використовують libjpeg-turbo. | |
126 | ||
127 | %package progs | |
128 | Summary: Simple clients for manipulating JPEG images | |
129 | Summary(de.UTF-8): Einfachen Clients zur Manipulation von JPEG | |
130 | Summary(fr.UTF-8): Clients simples pour manipuler des images JPEG | |
131 | Summary(pl.UTF-8): Kilka prostych programów do manipulowania na plikach JPEG | |
132 | Group: Development/Libraries | |
133 | Requires: %{name} = %{version}-%{release} | |
134 | Provides: libjpeg-progs = %{libjpeg_ver} | |
135 | Obsoletes: libjpeg-progs < %{libjpeg_ver_lt} | |
136 | Obsoletes: libjpegsimd-progs < 7 | |
137 | Conflicts: libjpeg-turbo6-progs | |
138 | ||
139 | %description progs | |
140 | Simple clients for manipulating JPEG images. Libjpeg client programs | |
141 | include cjpeg, djpeg, jpegtran, rdjpgcom and wrjpgcom. Djpeg | |
142 | decompresses a JPEG file into a regular image file. Jpegtran can | |
143 | perform various useful transformations on JPEG files. Rdjpgcom | |
144 | displays any text comments included in a JPEG file. Wrjpgcom inserts | |
145 | text comments into a JPEG file. | |
146 | ||
147 | %description progs -l de.UTF-8 | |
148 | Einfachen Clients zur Manipulation von JPEG. | |
149 | ||
150 | %description progs -l fr.UTF-8 | |
151 | Clients simples pour manipuler des images JPEG. | |
152 | ||
153 | %description progs -l pl.UTF-8 | |
154 | Kilka prostych programów do obróbki plików JPEG, w tym: cjpeg, djpeg, | |
155 | jpegtran, rdjpgcom i wrjpgcom. djpeg dekompresuje plik JPEG do | |
156 | zwykłego pliku obrazu, jpegtran potrafi wykonywać różne | |
157 | przekształcenia na plikach JPEG. rdjpgcom wyświetla komentarze | |
158 | tekstowe dołączone do pliku JPEG, a wrjpgcom wstawia takie komentarze. | |
159 | ||
160 | %package -n java-turbojpeg | |
161 | Summary: Java wrapper for the TurboJPEG/OSS library | |
162 | Summary(pl.UTF-8): Interfejs Javy do biblioteki TurboJPEG/OSS | |
163 | Group: Development/Languages/Java | |
164 | Requires: %{name} = %{version}-%{release} | |
165 | Requires: jpackage-utils | |
166 | ||
167 | %description -n java-turbojpeg | |
168 | Java wrapper for the TurboJPEG/OSS library. | |
169 | ||
170 | %description -n java-turbojpeg -l pl.UTF-8 | |
171 | Interfejs Javy do biblioteki TurboJPEG/OSS. | |
172 | ||
173 | %prep | |
174 | %setup -q | |
175 | %patch0 -p1 | |
176 | ||
177 | %build | |
178 | export JAVA_HOME="%{java_home}" | |
179 | install -d build | |
180 | cd build | |
181 | %cmake .. \ | |
182 | %{?with_java:-DWITH_JAVA=ON} \ | |
183 | %ifnarch %{ix86} %{x8664} x32 %{arm} aarch64 ppc | |
184 | -DWITH_SIMD=OFF \ | |
185 | %endif | |
186 | -DWITH_JPEG8=ON | |
187 | ||
188 | %{__make} | |
189 | ||
190 | %{?with_tests:%{__make} test} | |
191 | ||
192 | %install | |
193 | rm -rf $RPM_BUILD_ROOT | |
194 | ||
195 | %{__make} -C build install \ | |
196 | DESTDIR=$RPM_BUILD_ROOT | |
197 | ||
198 | # disable completeness check incompatible with split packaging | |
199 | %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_libdir}/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake | |
200 | ||
201 | # packaged as %doc | |
202 | %{__rm} $RPM_BUILD_ROOT%{_docdir}/{LICENSE.md,README.{ijg,md},%{?with_java:TJExample.java,}example.txt,libjpeg.txt,structure.txt,tjexample.c,usage.txt,wizard.txt} | |
203 | ||
204 | %clean | |
205 | rm -rf $RPM_BUILD_ROOT | |
206 | ||
207 | %post -p /sbin/ldconfig | |
208 | %postun -p /sbin/ldconfig | |
209 | ||
210 | %files | |
211 | %defattr(644,root,root,755) | |
212 | %doc ChangeLog.md LICENSE.md README.ijg README.md change.log usage.txt wizard.txt | |
213 | %attr(755,root,root) %{_libdir}/libjpeg.so.*.*.* | |
214 | %attr(755,root,root) %ghost %{_libdir}/libjpeg.so.8 | |
215 | %attr(755,root,root) %{_libdir}/libturbojpeg.so.*.*.* | |
216 | %attr(755,root,root) %ghost %{_libdir}/libturbojpeg.so.0 | |
217 | ||
218 | %files devel | |
219 | %defattr(644,root,root,755) | |
220 | %doc example.txt libjpeg.txt structure.txt tjexample.c | |
221 | %attr(755,root,root) %{_libdir}/libjpeg.so | |
222 | %attr(755,root,root) %{_libdir}/libturbojpeg.so | |
223 | %{_includedir}/jconfig.h | |
224 | %{_includedir}/jerror.h | |
225 | %{_includedir}/jmorecfg.h | |
226 | %{_includedir}/jpeglib.h | |
227 | %{_includedir}/turbojpeg.h | |
228 | %{_pkgconfigdir}/libjpeg.pc | |
229 | %{_pkgconfigdir}/libturbojpeg.pc | |
230 | %{_libdir}/cmake/libjpeg-turbo | |
231 | ||
232 | %files static | |
233 | %defattr(644,root,root,755) | |
234 | %{_libdir}/libjpeg.a | |
235 | %{_libdir}/libturbojpeg.a | |
236 | ||
237 | %files progs | |
238 | %defattr(644,root,root,755) | |
239 | %attr(755,root,root) %{_bindir}/cjpeg | |
240 | %attr(755,root,root) %{_bindir}/djpeg | |
241 | %attr(755,root,root) %{_bindir}/jpegtran | |
242 | %attr(755,root,root) %{_bindir}/rdjpgcom | |
243 | %attr(755,root,root) %{_bindir}/tjbench | |
244 | %attr(755,root,root) %{_bindir}/wrjpgcom | |
245 | %{_mandir}/man1/cjpeg.1* | |
246 | %{_mandir}/man1/djpeg.1* | |
247 | %{_mandir}/man1/jpegtran.1* | |
248 | %{_mandir}/man1/rdjpgcom.1* | |
249 | %{_mandir}/man1/wrjpgcom.1* | |
250 | ||
251 | %if %{with java} | |
252 | %files -n java-turbojpeg | |
253 | %defattr(644,root,root,755) | |
254 | %doc java/TJExample.java java/doc/* | |
255 | %{_javadir}/turbojpeg.jar | |
256 | %endif |