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