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