%define major 8 %define libname %mklibname jpeg %{major} %define lib6name %mklibname jpeg 62 %define libturbo %mklibname turbojpeg %define develname %mklibname -d jpeg %define staticname %mklibname -s -d jpeg Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files Name: libjpeg Epoch: 1 Version: 1.3.0 Release: %mkrel 1 License: wxWidgets Group: System/Libraries URL: http://sourceforge.net/projects/libjpeg-turbo Source0: http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz # These two allow automatic lossless rotation of JPEG images from a digital # camera which have orientation markings in the EXIF data. After rotation # the orientation markings are reset to avoid duplicate rotation when # applying these programs again. Source2: http://jpegclub.org/jpegexiforient.c Source3: http://jpegclub.org/exifautotran.txt BuildRequires: nasm %description The libjpeg package contains a shared library of functions for loading, manipulating and saving JPEG format image files. Install the libjpeg package if you need to manipulate JPEG files. You should also install the jpeg-progs package. %package -n %{libname} Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files Group: System/Libraries Provides: %{name} = %{epoch}:%{version}-%{release} %description -n %{libname} This package contains the library needed to run programs dynamically linked with libjpeg-turbo. %package -n %{lib6name} Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files Group: System/Libraries %description -n %{lib6name} This package contains the library needed to run programs dynamically linked with libjpeg-turbo. %package -n %{libturbo} Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files Group: System/Libraries Conflicts: %{_lib}jpeg-devel < 1:1.2.1-2 %description -n %{libturbo} This package contains the library needed to run programs dynamically linked with libjpeg-turbo. %package -n %{develname} Summary: Development tools for programs which will use the libjpeg library Group: Development/C Requires: %{libname} = %{epoch}:%{version} Provides: jpeg-devel = %{epoch}:%{version}-%{release} Provides: jpeg%{major}-devel = %{epoch}:%{version}-%{release} Provides: %{name}-devel = %{epoch}:%{version}-%{release} Obsoletes: %{name}-devel < %{epoch}:%{version}-%{release} Conflicts: jpeg6-devel Obsoletes: %{mklibname jpeg 62 -d} < 6b-45 %description -n %{develname} The libjpeg-devel package includes the header files necessary for developing programs which will manipulate JPEG files using the libjpeg library. If you are going to develop programs which will manipulate JPEG images, you should install libjpeg-devel. You'll also need to have the libjpeg package installed. %package -n %{staticname} Summary: Static libraries for programs which will use the libjpeg library Group: Development/C Requires: %{develname} = %{epoch}:%{version}-%{release} Provides: %{name}-static-devel = %{epoch}:%{version}-%{release} Provides: jpeg-static-devel = %{epoch}:%{version}-%{release} Provides: jpeg%{major}-static-devel = %{epoch}:%{version}-%{release} Conflicts: jpeg6-static-devel Obsoletes: %{mklibname jpeg 62 -d -s} < 6b-45 Obsoletes: %{mklibname jpeg 7 -d -s} < 7-3 %description -n %{staticname} The libjpeg-devel package includes the static librariesnecessary for developing programs which will manipulate JPEG files using the libjpeg library. If you are going to develop programs which will manipulate JPEG images, you should install libjpeg-devel. You'll also need to have the libjpeg package installed. %package -n jpeg-progs Summary: Programs for manipulating JPEG format image files Group: Graphics/Utilities Requires: %{libname} = %{epoch}:%{version}-%{release} Provides: jpeg-progs = %{epoch}:%{version}-%{release} Provides: libjpeg-progs = %{epoch}:%{version}-%{release} %description -n jpeg-progs The jpeg-progs package contains simple client programs for accessing the libjpeg functions. Libjpeg client programs include 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. %prep %setup -qn libjpeg-turbo-%{version} %build export CONFIGURE_TOP=`pwd` mkdir 8 pushd 8 %configure2_5x \ --with-jpeg8 \ --disable-silent-rules \ --enable-shared \ --enable-static %make gcc %{optflags} -o jpegexiforient %{SOURCE2} popd mkdir 6 pushd 6 %configure2_5x \ --enable-shared %make popd %check pushd 8 LD_PRELOAD=$PWD/.libs/%{name}.so make test popd %install %makeinstall_std -C 8 rm -fr %{buildroot}%{_libdir}/*.la %{buildroot}%{_datadir}/doc install -m 755 8/jpegexiforient %{buildroot}%{_bindir} install -m 755 %{SOURCE3} %{buildroot}%{_bindir} cp -fP 6/.libs/libjpeg.so.* %{buildroot}%{_libdir} %files -n %{libname} %doc README ChangeLog.txt coderules.txt jconfig.txt libjpeg.txt structure.txt usage.txt wizard.txt %{_libdir}/libjpeg.so.%{major}* %files -n %{lib6name} %{_libdir}/libjpeg.so.62 %{_libdir}/libjpeg.so.62.* %files -n %{libturbo} %{_libdir}/libturbojpeg.so %files -n %{develname} %doc example.c %{_libdir}/libjpeg.so %{_includedir}/*.h %files -n %{staticname} %{_libdir}/*.a %files -n jpeg-progs %{_bindir}/* %{_mandir}/man1/*