Summary: A library for manipulating JPEG image format files Name: libjpeg Version: 7 Release: 1 License: IJG Group: System Environment/Libraries URL: http://www.ijg.org/ Source0: http://www.ijg.org/files/jpegsrc.v7.tar.gz Source1: %{name}.so.62-aix32 Source2: %{name}.so.62-aix64 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 %setup -q -n jpeg-7 %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} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} cp ./.libs/%{name}.so.7 . make distclean # now build the 32-bit version export CC="cc" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q ./.libs/%{name}.a ./%{name}.so.7 # Add the older version 6b shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') /usr/bin/strip -X32 -e %{SOURCE1} /usr/bin/strip -X64 -e %{SOURCE2} cp %{SOURCE1} %{name}.so.62 /usr/bin/ar -X32 -q ./.libs/%{name}.a %{name}.so.62 cp %{SOURCE2} %{name}.so.62 /usr/bin/ar -X64 -q ./.libs/%{name}.a %{name}.so.62 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install /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 README usage.txt %{_bindir}/* %{_libdir}/*.a %{_mandir}/man?/* /usr/bin/* /usr/lib/*.a %files devel %defattr(-,root,system) %doc example.c %{name}.txt structure.txt %{_includedir}/* %{_libdir}/*.la /usr/include/* /usr/lib/*.la %changelog * Fri Sep 04 2009 Michael Perzl - 7-1 - updated to version 7 * 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