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