diff --git a/README.md b/README.md index d65b87d..ad12d33 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # libjpeg-turbo +libjpeg-turbo is a version of libjpeg which uses MMX, SSE, and SSE2 SIMD instructions to accelerate baseline JPEG compression/decompression by about 2-4x on x86 and x86-64 platforms. It is based on libjpeg/SIMD but has numerous enhancements. + diff --git a/libjpeg-turbo.spec b/libjpeg-turbo.spec new file mode 100644 index 0000000..52c8bd7 --- /dev/null +++ b/libjpeg-turbo.spec @@ -0,0 +1,295 @@ +Name: libjpeg-turbo +Version: 1.3.1 +Release: 1mamba +Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://sourceforge.net/projects/libjpeg-turbo +Source: http://sourceforge.net/projects/libjpeg-turbo/files/%{version}/libjpeg-turbo-%{version}.tar.gz +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: nasm +%ifarch x86_64 +BuildRequires: gcc-multilib +BuildRequires: glibc-multilib-devel +%endif +Obsoletes: libjpeg +Provides: libjpeg +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +libjpeg-turbo is a version of libjpeg which uses MMX, SSE, and SSE2 SIMD instructions to accelerate baseline JPEG compression/decompression by about 2-4x on x86 and x86-64 platforms. It is based on libjpeg/SIMD but has numerous enhancements. + +%package -n libjpeg-devel +Group: Development/Libraries +Summary: Libraries and headers for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} +Obsoletes: libjpeg-devel = 8c +Provides: libjpeg-turbo-devel +Obsoletes: libjpeg-turbo-devel +Provides: libjpeg6b-devel +Obsoletes: libjpeg6b-devel +Provides: libjpeg6b-turbo-devel +Obsoletes: libjpeg6b-turbo-devel +Provides: libjpeg7-devel +Obsoletes: libjpeg7-devel +Provides: libjpeg7-turbo-devel +Obsoletes: libjpeg7-turbo-devel + +%description -n libjpeg-devel +A MMX/SSE2 accelerated library for manipulating JPEG image files. + +This package contains libraries and header files need for development. + +%package -n libjpeg-static +Group: Development/Libraries +Summary: Static libraries for %{name} +Requires: libjpeg-devel = %{?epoch:%epoch:}%{version}-%{release} +Provides: libjpeg-turbo-static +Obsoletes: libjpeg-turbo-static +Provides: libjpeg6b-static +Obsoletes: libjpeg6b-static +Provides: libjpeg7-static +Obsoletes: libjpeg7-static + +%description -n libjpeg-static +A MMX/SSE2 accelerated library for manipulating JPEG image files. + +This package contains static libraries need for development. + +%package utils +Group: Development/Libraries +Summary: Utilities for manipulating JPEG images +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} +Provides: libjpeg6b-turbo-utils +Obsoletes: libjpeg6b-turbo-utils +Provides: libjpeg7-turbo-utils +Obsoletes: libjpeg7-turbo-utils + +%description utils +A MMX/SSE2 accelerated library for manipulating JPEG image files. + +The %{name}-utils package contains simple client programs for accessing the libjpeg functions. It contains cjpeg, djpeg, jpegtran, rdjpgcom and wrjpgcom. Cjpeg compresses an image file into JPEG format. Djpeg decompresses a JPEG file into a regular image file. Jpegtran can perform various useful transformations on JPEG files. Rdjpgcom displays any text comments included in a JPEG file. Wrjpgcom inserts text comments into a JPEG file. + +%package -n libjpeg6b-turbo +Group: System/Libraries +Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files +Provides: libjpeg6b +Obsoletes: libjpeg6b + +%description -n libjpeg6b-turbo +libjpeg-turbo is a version of libjpeg which uses MMX, SSE, and SSE2 SIMD instructions to accelerate baseline JPEG compression/decompression by about 2-4x on x86 and x86-64 platforms. It is based on libjpeg/SIMD but has numerous enhancements. + +%package -n libjpeg7-turbo +Group: System/Libraries +Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files +Provides: libjpeg7 +Obsoletes: libjpeg7 + +%description -n libjpeg7-turbo +libjpeg-turbo is a version of libjpeg which uses MMX, SSE, and SSE2 SIMD instructions to accelerate baseline JPEG compression/decompression by about 2-4x on x86 and x86-64 platforms. It is based on libjpeg/SIMD but has numerous enhancements. + +%package -n lib32-libjpeg-turbo +Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files +Group: System/Libraries + +%description -n lib32-libjpeg-turbo +A MMX/SSE2 accelerated library for manipulating JPEG image files. + +%package -n lib32-libjpeg-turbo-devel +Summary: Devel package for lib32-libjpeg-turbo +Group: Development/Libraries +Requires: lib32-libjpeg-turbo = %{?epoch:%epoch:}%{version}-%{release} +Requires: libjpeg-turbo-devel = %{?epoch:%epoch:}%{version}-%{release} + +%description -n lib32-libjpeg-turbo-devel +A MMX/SSE2 accelerated library for manipulating JPEG image files. +This package contains static libraries and header files needed for development. + +%debug_package + +%prep +%setup -q + +tar xf %{SOURCE0} +mv %{name}-%{version} %{name}-6b + +tar xf %{SOURCE0} +mv %{name}-%{version} %{name}-7 + +%build +cd %{name}-6b +%configure +%make +cd .. + +cd %{name}-7 +%configure \ + --with-jpeg7 +%make +cd .. + +%configure \ + --with-jpeg8 +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +cd %{name}-6b +%makeinstall \ + docdir=%{_docdir}/libjpeg-devel-%{version} \ + exampledir=%{_docdir}/libjpeg-devel-%{version} +cd .. + +cd %{name}-7 +%makeinstall \ + docdir=%{_docdir}/libjpeg-devel-%{version} \ + exampledir=%{_docdir}/libjpeg-devel-%{version} +cd .. + +# install last for devel and utils to depend on latest library +%makeinstall \ + docdir=%{_docdir}/libjpeg-devel-%{version} \ + exampledir=%{_docdir}/libjpeg-devel-%{version} + +%ifarch x86_64 +# x86_64 lib64 support +make clean +CC=%{_target_platform}-gcc \ +CFLAGS="%{optflags} -m32" \ +CXXLAGS="%{optflags} -m32" \ +./configure --prefix=%{_prefix} --libdir=%{_prefix}/lib --with-jpeg8 --without-simd +make +make install DESTDIR=`pwd`/lib32 +cp -a lib32/%{_prefix}/lib %{buildroot}%{_prefix}/ +%endif + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%post -n libjpeg6b-turbo -p /sbin/ldconfig +%postun -n libjpeg6b-turbo -p /sbin/ldconfig + +%post -n libjpeg7-turbo -p /sbin/ldconfig +%postun -n libjpeg7-turbo -p /sbin/ldconfig + +%post -n lib32-libjpeg-turbo -p /sbin/ldconfig +%postun -n lib32-libjpeg-turbo -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_libdir}/libjpeg.so.8 +%{_libdir}/libjpeg.so.8.* +%{_libdir}/libturbojpeg.so.* + +%files -n libjpeg-devel +%defattr(-,root,root) +%{_includedir}/jconfig.h +%{_includedir}/jerror.h +%{_includedir}/jmorecfg.h +%{_includedir}/jpeglib.h +%{_includedir}/turbojpeg.h +%{_libdir}/libjpeg.so +%{_libdir}/libturbojpeg.so +%{_libdir}/libjpeg.la +%{_libdir}/libturbojpeg.la +#%dir %{_docdir}/%{name}-%{version} +#%{_docdir}/%{name}-%{version}/* +%doc coderules.txt jconfig.txt libjpeg.txt structure.txt example.c change.log ChangeLog.txt + +%files -n libjpeg-static +%defattr(-,root,root) +%{_libdir}/libjpeg.a +%{_libdir}/libturbojpeg.a + +%files utils +%defattr(-,root,root) +%{_bindir}/cjpeg +%{_bindir}/djpeg +%{_bindir}/jpegtran +%{_bindir}/rdjpgcom +%{_bindir}/tjbench +%{_bindir}/wrjpgcom +%{_mandir}/man1/cjpeg.1.gz +%{_mandir}/man1/djpeg.1.gz +%{_mandir}/man1/jpegtran.1.gz +%{_mandir}/man1/rdjpgcom.1.gz +%{_mandir}/man1/wrjpgcom.1.gz + +%files -n libjpeg6b-turbo +%defattr(-,root,root) +%{_libdir}/libjpeg.so.62 +%{_libdir}/libjpeg.so.62.* +#%doc README-turbo.txt + +%files -n libjpeg7-turbo +%defattr(-,root,root) +%{_libdir}/libjpeg.so.7 +%{_libdir}/libjpeg.so.7.* +#%doc README-turbo.txt + +%ifarch x86_64 +%files -n lib32-libjpeg-turbo +%defattr(-,root,root) +%{_prefix}/lib/libjpeg.so.8 +%{_prefix}/lib/libjpeg.so.8.* +%{_prefix}/lib/libturbojpeg.so.* + +%files -n lib32-libjpeg-turbo-devel +%defattr(-,root,root) +%{_prefix}/lib/libjpeg.a +%{_prefix}/lib/libjpeg.la +%{_prefix}/lib/libjpeg.so +%{_prefix}/lib/libturbojpeg.a +%{_prefix}/lib/libturbojpeg.la +%{_prefix}/lib/libturbojpeg.so +%endif + +%changelog +* Mon Mar 24 2014 Automatic Build System 1.3.1-1mamba +- automatic update by autodist + +* Mon May 27 2013 Automatic Build System 1.3.0-1mamba +- automatic version update by autodist + +* Tue May 07 2013 Automatic Build System 1.2.90-1mamba +- automatic version update by autodist + +* Fri Jul 27 2012 Silvan Calarco 1.2.1-1mamba +- update to 1.2.1 + +* Mon Jun 18 2012 Silvan Calarco 1.2.0-2mamba +- fix legacy package names (libjpegx-turbo, not libjpeg-turbox) + +* Sun Jun 17 2012 Silvan Calarco 1.2.0-1mamba +- update to 1.2.0 +- unify source package for producing libjpeg-turbo*, libjpeg6b-turbo* and libjpeg7-turbo* +- add debug package + +* Sun Jun 19 2011 Automatic Build System 1.1.1-1mamba +- automatic update by autodist + +* Sat Mar 26 2011 Silvan Calarco 1.1.0-2mamba +- rebuilt with 8b compatibility + +* Thu Mar 10 2011 gil 1.1.0-1mamba +- update to 1.1.0 + +* Thu Jan 20 2011 gil 1.0.90-1mamba +- update to 1.0.90 + +* Tue Jan 04 2011 gil 1.0.1-1mamba +- update to 1.0.1 + +* Sun Jul 25 2010 gil 1.0.0-1mamba +- package created by autospec