]>
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 |
34d4c8f1 | 8 | %use_default_jdk |
c462aa68 JB |
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 | |
8740afba | 11 | Name: libjpeg-turbo |
57f11688 AM |
12 | Version: 2.1.5 |
13 | Release: 1 | |
c462aa68 JB |
14 | # more specifically: IJG, modified-BSD or Zlib |
15 | License: BSD-like | |
0d312acb | 16 | Group: Libraries |
42954cba | 17 | Source0: https://downloads.sourceforge.net/libjpeg-turbo/%{name}-%{version}.tar.gz |
57f11688 | 18 | # Source0-md5: 1c6e9f8550a82c6d4cd30b370c22a5fd |
c7e83d43 | 19 | Patch0: %{name}-x32-java.patch |
afab7cab | 20 | URL: https://libjpeg-turbo.org/ |
bd5518f6 | 21 | BuildRequires: cmake >= 3.9.0 |
24713fa9 | 22 | %{?with_java:%buildrequires_jdk} |
34d4c8f1 | 23 | %{?with_java:BuildRequires: %{use_jdk}-jre-base-X11} |
d2c8238e | 24 | BuildRequires: libstdc++-devel |
c462aa68 | 25 | # x86* SIMD code uses NASM; ARM and MIPS use gas, PowerPC uses gcc intrinsics, no SIMD code for other archs |
eb011f04 | 26 | %ifarch %{ix86} %{x8664} |
8740afba | 27 | BuildRequires: nasm |
eb011f04 | 28 | %endif |
34d4c8f1 | 29 | BuildRequires: rpmbuild(macros) >= 2.021 |
d2c8238e | 30 | Provides: libjpeg = %{libjpeg_ver} |
98befeb3 | 31 | Obsoletes: libjpeg < %{libjpeg_ver_lt} |
42954cba | 32 | Obsoletes: libjpegsimd < 7 |
de535b84 | 33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22eb4c1b | 34 | |
35 | %description | |
c462aa68 JB |
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 | ||
8740afba | 40 | It is based on libjpeg/SIMD but has numerous enhancements. |
96c7e84f | 41 | |
6e49197d | 42 | %description -l pl.UTF-8 |
b76ff88a | 43 | libjpeg-turbo to wersja biblioteki libjpeg wykorzystująca instrukcje |
c462aa68 JB |
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ń. | |
6e49197d | 48 | |
22eb4c1b | 49 | %package devel |
8740afba | 50 | Summary: Headers for developing programs using libjpeg-turbo |
6e49197d | 51 | Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia programów przy użyciu libjpeg-turbo |
0d312acb | 52 | Group: Development/Libraries |
604a8e24 | 53 | Requires: %{name} = %{version}-%{release} |
8740afba | 54 | Provides: libjpeg-devel = %{libjpeg_ver} |
98befeb3 | 55 | Obsoletes: libjpeg-devel < %{libjpeg_ver_lt} |
42954cba | 56 | Obsoletes: libjpegsimd-devel < 7 |
254235ea | 57 | Conflicts: libjpeg6-devel |
22eb4c1b | 58 | |
59 | %description devel | |
8740afba AM |
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. | |
22eb4c1b | 63 | |
0adec598 | 64 | %description devel -l de.UTF-8 |
3f2b3b82 | 65 | Dieses Paket bietet alles, was Sie brauchen, um Programme zur |
6e49197d | 66 | Manipulation von JPEG-Grafiken, zu entwickeln. |
22eb4c1b | 67 | |
0adec598 | 68 | %description devel -l es.UTF-8 |
96c7e84f | 69 | Este paquete es todo lo que necesitas para desarrollar programas que |
6e49197d | 70 | manipulen imágenes JPEG. |
96c7e84f | 71 | |
0adec598 JR |
72 | %description devel -l fr.UTF-8 |
73 | Ce package est tout ce dont vous avez besoin pour développer des | |
6e49197d | 74 | programmes manipulant des images JPEG. |
22eb4c1b | 75 | |
0adec598 | 76 | %description devel -l pl.UTF-8 |
bdc11f6d | 77 | Ten pakiet zawiera pliki potrzebne do programowania z wykorzystaniem |
6e49197d | 78 | biblioteki libjpeg-turbo. |
22eb4c1b | 79 | |
0adec598 JR |
80 | %description devel -l pt_BR.UTF-8 |
81 | Este pacote é tudo que você precisa para desenvolver programas que | |
6e49197d | 82 | manipulam imagens JPEG. |
96c7e84f | 83 | |
0adec598 JR |
84 | %description devel -l ru.UTF-8 |
85 | В этом пакете содержится все необходимое для разработки программ, | |
bdc11f6d | 86 | которые работают с JPEG-изображениями включая документацию. |
96c7e84f | 87 | |
0adec598 | 88 | %description devel -l tr.UTF-8 |
bdc11f6d | 89 | Bu paket, JPEG resimlerini işleyen programlar geliştirmeniz için |
0adec598 JR |
90 | gereken başlık dosyalarını, kitaplıkları ve ilgili yardım belgelerini |
91 | içerir. | |
22eb4c1b | 92 | |
0adec598 JR |
93 | %description devel -l uk.UTF-8 |
94 | Цей пакет містить все необхідне для розробки програм, котрі працюють з | |
bdc11f6d | 95 | JPEG-зображеннями, включаючи документацію. |
539cbc70 | 96 | |
97 | %package static | |
8740afba AM |
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 | |
0d312acb | 103 | Group: Development/Libraries |
604a8e24 | 104 | Requires: %{name}-devel = %{version}-%{release} |
8740afba | 105 | Provides: libjpeg-static = %{libjpeg_ver} |
98befeb3 | 106 | Obsoletes: libjpeg-static < %{libjpeg_ver_lt} |
42954cba | 107 | Obsoletes: libjpegsimd-static < 7 |
8740afba | 108 | Conflicts: libjpeg-turbo6-static |
539cbc70 | 109 | |
110 | %description static | |
8740afba | 111 | Static library for developing programs using libjpeg-turbo. |
539cbc70 | 112 | |
0adec598 | 113 | %description static -l pl.UTF-8 |
8740afba | 114 | Statyczna biblioteka libjpeg-turbo. |
22eb4c1b | 115 | |
0adec598 | 116 | %description static -l pt_BR.UTF-8 |
8740afba | 117 | Bibliotecas estáticas para desenvolvimento com libjpeg-turbo. |
96c7e84f | 118 | |
0adec598 JR |
119 | %description static -l ru.UTF-8 |
120 | Этот пакет содержит статические библиотеки, необходимые для написания | |
8740afba | 121 | программ, использующих libjpeg-turbo. |
96c7e84f | 122 | |
0adec598 JR |
123 | %description static -l uk.UTF-8 |
124 | Цей пакет містить статичні бібліотеки, необхідні для написання | |
8740afba | 125 | програм, що використовують libjpeg-turbo. |
96c7e84f | 126 | |
bdc11f6d JB |
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} | |
8740afba | 134 | Provides: libjpeg-progs = %{libjpeg_ver} |
98befeb3 | 135 | Obsoletes: libjpeg-progs < %{libjpeg_ver_lt} |
42954cba | 136 | Obsoletes: libjpegsimd-progs < 7 |
8740afba | 137 | Conflicts: libjpeg-turbo6-progs |
bdc11f6d JB |
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 | ||
eb011f04 JB |
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 | ||
22eb4c1b | 173 | %prep |
8740afba | 174 | %setup -q |
c7e83d43 | 175 | %patch0 -p1 |
d0424a0a | 176 | |
88984029 | 177 | %build |
24713fa9 | 178 | export JAVA_HOME="%{java_home}" |
c5306be6 JB |
179 | install -d build |
180 | cd build | |
181 | %cmake .. \ | |
96439685 | 182 | %{?with_java:-DWITH_JAVA=ON} \ |
bd5518f6 | 183 | %ifnarch %{ix86} %{x8664} x32 %{arm} aarch64 ppc |
96439685 | 184 | -DWITH_SIMD=OFF \ |
0de566d2 | 185 | %endif |
c5306be6 JB |
186 | -DWITH_JPEG8=ON |
187 | ||
96439685 | 188 | %{__make} |
88984029 | 189 | |
8740afba | 190 | %{?with_tests:%{__make} test} |
22eb4c1b | 191 | |
192 | %install | |
193 | rm -rf $RPM_BUILD_ROOT | |
9f756785 | 194 | |
96439685 | 195 | %{__make} -C build install \ |
7522fe7c | 196 | DESTDIR=$RPM_BUILD_ROOT |
22eb4c1b | 197 | |
bd5518f6 JB |
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 | ||
c5306be6 | 201 | # packaged as %doc |
08b6971c | 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} |
c5306be6 | 203 | |
22eb4c1b | 204 | %clean |
205 | rm -rf $RPM_BUILD_ROOT | |
206 | ||
bdc11f6d JB |
207 | %post -p /sbin/ldconfig |
208 | %postun -p /sbin/ldconfig | |
209 | ||
22eb4c1b | 210 | %files |
56464ee9 | 211 | %defattr(644,root,root,755) |
c5306be6 | 212 | %doc ChangeLog.md LICENSE.md README.ijg README.md change.log usage.txt wizard.txt |
bdc11f6d | 213 | %attr(755,root,root) %{_libdir}/libjpeg.so.*.*.* |
8d95c872 | 214 | %attr(755,root,root) %ghost %{_libdir}/libjpeg.so.8 |
7b2aca16 JR |
215 | %attr(755,root,root) %{_libdir}/libturbojpeg.so.*.*.* |
216 | %attr(755,root,root) %ghost %{_libdir}/libturbojpeg.so.0 | |
22eb4c1b | 217 | |
218 | %files devel | |
56464ee9 | 219 | %defattr(644,root,root,755) |
c5306be6 | 220 | %doc example.txt libjpeg.txt structure.txt tjexample.c |
bdc11f6d | 221 | %attr(755,root,root) %{_libdir}/libjpeg.so |
7b2aca16 | 222 | %attr(755,root,root) %{_libdir}/libturbojpeg.so |
bdc11f6d JB |
223 | %{_includedir}/jconfig.h |
224 | %{_includedir}/jerror.h | |
225 | %{_includedir}/jmorecfg.h | |
226 | %{_includedir}/jpeglib.h | |
7b2aca16 | 227 | %{_includedir}/turbojpeg.h |
8656c6be AM |
228 | %{_pkgconfigdir}/libjpeg.pc |
229 | %{_pkgconfigdir}/libturbojpeg.pc | |
bd5518f6 | 230 | %{_libdir}/cmake/libjpeg-turbo |
0d312acb | 231 | |
bdc11f6d | 232 | %files static |
56464ee9 | 233 | %defattr(644,root,root,755) |
bdc11f6d | 234 | %{_libdir}/libjpeg.a |
7b2aca16 | 235 | %{_libdir}/libturbojpeg.a |
539cbc70 | 236 | |
bdc11f6d | 237 | %files progs |
56464ee9 | 238 | %defattr(644,root,root,755) |
bdc11f6d JB |
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 | |
16fe0756 | 243 | %attr(755,root,root) %{_bindir}/tjbench |
bdc11f6d JB |
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* | |
eb011f04 JB |
250 | |
251 | %if %{with java} | |
252 | %files -n java-turbojpeg | |
253 | %defattr(644,root,root,755) | |
c5306be6 | 254 | %doc java/TJExample.java java/doc/* |
eb011f04 JB |
255 | %{_javadir}/turbojpeg.jar |
256 | %endif |