%define name libjpeg %define version 6b %define release %mkrel 41 %define lib_major 62 %define lib_name_orig libjpeg %define lib_name %mklibname jpeg %{lib_major} Summary: A library for manipulating JPEG image format files Name: %name Version: %version Release: %release License: GPL-like Group: System/Libraries URL: http://www.ijg.org/ Source0: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.bz2 # Modified source files for lossless cropping of JPEG files and for # lossless pasting of one JPEG into another (dropping). In addition a # bug in the treatment of EXIF data is solved and the EXIF data is # adjusted according to size/dimension changes caused by rotating and # cropping operations Source1: http://jpegclub.org/droppatch.tar.bz2 # 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 Patch0: libjpeg-6b-arm.patch Patch1: libjpeg-ia64-acknowledge.patch Patch2: jpeg-6b-c++fixes.patch # Use autoconf variables to know libdir et al. Patch3: jpeg-6b-autoconf-vars.patch Buildroot: %_tmppath/%name-%version-%release-root BuildRequires: libtool %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 %{lib_name} Summary: A library for manipulating JPEG image format files Group: System/Libraries Obsoletes: %name Provides: %{name} = %{version}-%{release} %description -n %{lib_name} This package contains the library needed to run programs dynamically linked with libjpeg. %package -n %{lib_name}-devel Summary: Development tools for programs which will use the libjpeg library Group: Development/C Requires: %{lib_name} = %{version} Provides: jpeg-devel = %{version}-%{release} Provides: %name-devel = %{version}-%{release} Obsoletes: %name-devel %description -n %{lib_name}-devel 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 %{lib_name}-static-devel Summary: Static libraries for programs which will use the libjpeg library Group: Development/C Requires: %{lib_name}-devel = %{version}-%release Provides: %name-static-devel = %{version}-%{release} Provides: jpeg-static-devel = %{version}-%{release} %description -n %{lib_name}-static-devel 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 Requires: %lib_name = %{version}-%{release} Provides: jpeg-progs = %{version}-%{release} Provides: libjpeg-progs = %{version}-%{release} Obsoletes: libjpeg-progs %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 -q -n jpeg-6b %setup -q -T -D -a 1 -n jpeg-6b rm -f jpegtran %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 cp `which libtool` . cp %{SOURCE2} jpegexiforient.c cp %{SOURCE3} exifautotran %build %configure --prefix=%{_prefix} \ --enable-shared \ --enable-static \ --disable-rpath #cat > have_stdlib.sed <<\EOF #s/#define HAVE_STDLIB_H/#ifndef HAVE_STDLIB_H\ #&\ #endif/g #EOF #sed -f have_stdlib.sed jconfig.h > jconfig.tmp && mv jconfig.tmp jconfig.h #rm -f have_stdlib.sed #perl -pi -e 's,hardcode_libdir_flag_spec=",#hardcode_libdir_flag_spec=",;' libtool %make %ifnarch armv4l #FIX MEEE: we know this will fail on arm LD_LIBRARY_PATH=$PWD make test %endif gcc $CFLAGS -o jpegexiforient jpegexiforient.c %install rm -rf %buildroot mkdir -p %buildroot/{%{_bindir},%{_libdir},%{_includedir},%{_mandir}/man1} #(neoclust) Provide jpegint.h because it is needed softwares cp jpegint.h %buildroot%{_includedir}/jpegint.h %makeinstall mandir=%buildroot/%{_mandir}/man1 install -m 755 jpegexiforient %{buildroot}%{_bindir} install -m 755 exifautotran %{buildroot}%{_bindir} %post -n %{lib_name} -p /sbin/ldconfig %postun -n %{lib_name} -p /sbin/ldconfig %clean rm -rf %buildroot %files -n %{lib_name} %defattr(-,root,root) %doc README change.log %{_libdir}/lib*.so.* %files -n %{lib_name}-devel %defattr(-,root,root) %doc README usage.doc change.log wizard.doc coderules.doc libjpeg.doc structure.doc example.c %{_libdir}/*.so %{_includedir}/*.h %{_libdir}/*.la %files -n %{lib_name}-static-devel %defattr(-,root,root) %doc README %{_libdir}/*.a %files -n jpeg-progs %defattr(-,root,root) %doc README change.log %{_bindir}/* %{_mandir}/man1/* %changelog * Mon Dec 11 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 6b-41mdv2007.0 + Revision: 95114 - Add guards for C++ code (e.g. OpenVRML) + Oden Eriksson <oeriksson@mandriva.com> - bzip2 cleanup - rebuild - bunzip patches and sources - Import libjpeg * Wed Jan 11 2006 Christiaan Welvaart <cjw@daneel.dyndns.org> 6b-39mdk - add BuildRequires: libtool * Sun Jan 01 2006 Mandriva Linux Team <http://www.mandrivaexpert.com/> 6b-38mdk - Rebuild * Thu Jul 21 2005 Nicolas Lécureuil <neoclust@mandriva.org> 6b-37mdk - Fix error pointed out by Per Øyvind Karlsen and couriousous * Thu Jul 21 2005 Nicolas Lécureuil <neoclust@mandriva.org> 6b-36mdk - Clean My mess * Thu Jul 21 2005 Nicolas Lécureuil <neoclust@mandriva.org> 6b-35mdk - Provide jpegint.h because it is needed softwares * Fri Feb 18 2005 Rafael Garcia-Suarez <rgarciasuarez@mandrakesoft.com> 6b-34mdk - Rename 'libjpeg-progs' to 'jpeg-progs' * Tue Dec 16 2003 Till Kamppeter <till@mandrakesoft.com> 6b-33mdk - Updated patch for lossless cropping and pasting to the newest version, it contains also the EXIF fixes shown on http://jpegclub.org/exifpatch.html - Added orientation utilities from http://jpegclub.org/exif_orientation.html