Summary: A library for manipulating JPEG image format files Name: libjpeg Version: 6b Release: 7 License: IJG Group: System Environment/Libraries URL: http://www.ijg.org/ Source0: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz Patch0: libjpeg-c++.patch Patch1: libjpeg-buf-oflo.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: patch %description The libjpeg package contains a library of functions for manipulating JPEG images, as well as 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. The library is available as 32-bit and 64-bit. %package devel Summary: Development tools for programs which will use the libjpeg library Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The libjpeg-devel package includes the header files and documentation 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. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64". %prep export PATH=/opt/freeware/bin:$PATH %setup -q -n jpeg-6b %patch0 -p1 -b .c++ %patch1 -p1 -b .oflo %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="cc -q64" ./configure \ --prefix=%{_prefix} \ --disable-shared --enable-static make %{?_smp_mflags} CreateExportList -X64 %{name}.exp .libs/%{name}.a ${CC} -qmkshrobj .libs/%{name}.a -o %{name}.so.62 -bE:%{name}.exp rm -f %{name}.exp mkdir -p 64 cp %{name}.so.62 64/ make distclean # now build the 32-bit version export CC="cc" ./configure \ --prefix=%{_prefix} \ --disable-shared --enable-static make %{?_smp_mflags} CreateExportList -X32 %{name}.exp .libs/%{name}.a ${CC} -qmkshrobj .libs/%{name}.a -o %{name}.so.62 -bE:%{name}.exp rm -f %{name}.exp rm -f .libs/%{name}.a ${AR} -rv .libs/%{name}.a %{name}.so.62 # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q .libs/%{name}.a 64/%{name}.so.62 # relink against new shared library rm -f cjpeg djpeg jpegtran rdjpgcom wrjpgcom make %{?_smp_mflags} LDFLAGS="-L/opt/freeware/lib -ljpeg" %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_includedir} mkdir -p ${RPM_BUILD_ROOT}%{_libdir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1 make prefix=${RPM_BUILD_ROOT}%{_prefix} install install-headers install-lib /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc usage.doc README %{_bindir}/* %{_libdir}/*.a %{_mandir}/man?/* /usr/bin/* /usr/lib/*.a %files devel %defattr(-,root,system) %doc libjpeg.doc coderules.doc structure.doc wizard.doc example.c %{_includedir}/* /usr/include/* %changelog * Tue Jun 24 2008 Michael Perzl - 6b-7 - first version for AIX5L v5.1 and higher - kept compatible to the IBM AIX Toolbox for Linux Applications version