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