DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 1 | %ifarch x86_64 |
| 2 | %define __lib lib64 |
| 3 | %else |
| 4 | %define __lib lib |
| 5 | %endif |
| 6 | |
| 7 | Summary: A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs |
| 8 | Name: %{_name} |
| 9 | Version: %{_version} |
| 10 | Vendor: The libjpeg-turbo Project |
| 11 | URL: http://libjpeg-turbo.virtualgl.org |
| 12 | Group: System Environment/Libraries |
| 13 | #-->Source0: http://prdownloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz |
| 14 | Release: %{_build} |
| 15 | License: wxWindows Library License, v3.1 |
| 16 | BuildRoot: %{_blddir}/%{name}-buildroot-%{version}-%{release} |
| 17 | Prereq: /sbin/ldconfig |
| 18 | Provides: %{name} = %{version}-%{release}, turbojpeg = 2.00 |
| 19 | Obsoletes: turbojpeg |
| 20 | |
| 21 | %description |
| 22 | libjpeg-turbo is a high-speed version of libjpeg for x86 and x86-64 processors |
| 23 | which uses SIMD instructions (MMX, SSE2, etc.) to accelerate baseline JPEG |
| 24 | compression and decompression. libjpeg-turbo is generally 2-4x as fast |
| 25 | as the unmodified version of libjpeg, all else being equal. libjpeg-turbo also |
| 26 | includes a wrapper library for the TurboJPEG API used by VirtualGL and |
| 27 | TurboVNC. |
| 28 | |
| 29 | libjpeg-turbo was originally based on libjpeg/SIMD by Miyasaka Masaru, but |
| 30 | the TigerVNC and VirtualGL projects made numerous enhancements to the codec, |
| 31 | including improved support for Mac OS X, 64-bit support, support for 32-bit |
| 32 | and big endian pixel formats, accelerated Huffman encoding/decoding, and |
| 33 | various bug fixes. The goal was to produce a fully open source codec that |
| 34 | could replace the partially closed source TurboJPEG/IPP codec used by VirtualGL |
| 35 | and TurboVNC. libjpeg-turbo generally performs in the range of 80-120% of |
| 36 | TurboJPEG/IPP. It is faster in some areas but slower in others. |
| 37 | |
| 38 | #-->%prep |
| 39 | #-->%setup -q |
| 40 | |
| 41 | #-->%build |
DRC | f19caa5 | 2010-02-24 21:27:32 +0000 | [diff] [blame] | 42 | #-->configure prefix=$RPM_BUILD_ROOT/opt/%{name} libdir=$RPM_BUILD_ROOT/opt/%{name}/%{__lib} --with-pic |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 43 | #-->make prefix=$RPM_BUILD_ROOT/opt/%{name} libdir=$RPM_BUILD_ROOT/opt/%{name}/%{__lib} |
| 44 | |
| 45 | %install |
| 46 | |
| 47 | rm -rf $RPM_BUILD_ROOT |
| 48 | make install prefix=$RPM_BUILD_ROOT/opt/%{name} libdir=$RPM_BUILD_ROOT/opt/%{name}/%{__lib} |
| 49 | rm -f $RPM_BUILD_ROOT/opt/%{name}/%{__lib}/*.la |
| 50 | mkdir -p $RPM_BUILD_ROOT/usr/%{__lib} |
| 51 | mv $RPM_BUILD_ROOT/opt/%{name}/%{__lib}/libturbojpeg.* $RPM_BUILD_ROOT/usr/%{__lib} |
| 52 | /sbin/ldconfig -n $RPM_BUILD_ROOT/opt/%{name}/%{__lib} |
| 53 | /sbin/ldconfig -n $RPM_BUILD_ROOT/usr/%{__lib} |
| 54 | mkdir -p $RPM_BUILD_ROOT/usr/include |
| 55 | mv $RPM_BUILD_ROOT/opt/%{name}/include/turbojpeg.h $RPM_BUILD_ROOT/usr/include |
DRC | f12c7db | 2010-05-18 19:04:47 +0000 | [diff] [blame^] | 56 | ln -fs /usr/include/turbojpeg.h $RPM_BUILD_ROOT/opt/%{name}/include/ |
| 57 | ln -fs /usr/%{__lib}/libjpegturbo.a $RPM_BUILD_ROOT/opt/%{name}/%{__lib}/ |
| 58 | %ifarch x86_64 |
| 59 | %else |
| 60 | ln -fs %{__lib} $RPM_BUILD_ROOT/opt/%{name}/lib32 |
| 61 | %endif |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 62 | |
| 63 | %post -p /sbin/ldconfig |
| 64 | |
| 65 | %postun -p /sbin/ldconfig |
| 66 | |
| 67 | %clean |
| 68 | rm -rf $RPM_BUILD_ROOT |
| 69 | |
| 70 | %files |
| 71 | %defattr(-,root,root) |
DRC | 23071bc | 2010-02-16 05:54:00 +0000 | [diff] [blame] | 72 | %doc %{_srcdir}/README-turbo.txt %{_srcdir}/README %{_srcdir}/libjpeg.doc %{_srcdir}/LICENSE.txt %{_srcdir}/LGPL.txt |
DRC | 6afd256 | 2010-02-17 00:56:59 +0000 | [diff] [blame] | 73 | %dir /opt/%{name} |
| 74 | %dir /opt/%{name}/%{__lib} |
DRC | f12c7db | 2010-05-18 19:04:47 +0000 | [diff] [blame^] | 75 | %ifarch x86_64 |
| 76 | %else |
| 77 | /opt/%{name}/lib32 |
| 78 | %endif |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 79 | /opt/%{name}/%{__lib}/libjpeg.so.62.0.0 |
| 80 | /opt/%{name}/%{__lib}/libjpeg.so.62 |
| 81 | /opt/%{name}/%{__lib}/libjpeg.so |
| 82 | /opt/%{name}/%{__lib}/libjpeg.a |
DRC | f12c7db | 2010-05-18 19:04:47 +0000 | [diff] [blame^] | 83 | /opt/%{name}/%{__lib}/libjpegturbo.a |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 84 | /usr/%{__lib}/libturbojpeg.so |
| 85 | /usr/%{__lib}/libturbojpeg.a |
| 86 | /usr/include/turbojpeg.h |
DRC | 6afd256 | 2010-02-17 00:56:59 +0000 | [diff] [blame] | 87 | %dir /opt/%{name}/include |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 88 | /opt/%{name}/include/jconfig.h |
| 89 | /opt/%{name}/include/jerror.h |
| 90 | /opt/%{name}/include/jmorecfg.h |
| 91 | /opt/%{name}/include/jpeglib.h |
DRC | f12c7db | 2010-05-18 19:04:47 +0000 | [diff] [blame^] | 92 | /opt/%{name}/include/turbojpeg.h |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 93 | |
| 94 | %changelog |