%define LIBVER 62.0.0 Summary: A library for manipulating JPEG image format files. Name: libjpeg Version: 6b Release: 7 License: IBM_ILA URL: http://www.ijg.org Group: System Environment/Libraries Source0: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz Source1: IBM_ILA Source2: libjpeg.so.62_32bit Source3: libjpeg.so.62_64bit Source4: shr.o_32bit Patch0: jpeg-6b-aixltconf.patch Prefix: %{_prefix} Buildroot: /var/tmp/libjpeg-root %define DEFCC cc # Use --define 'no64 1' on the command line to disable 64bit build %{!?no64:%define BUILD64 1} %{?no64:%define BUILD64 0} %define prefix64 %{prefix}/64 %package devel Summary: Development tools for programs which will use the libjpeg library. Group: Development/Libraries Requires: libjpeg %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. %description devel The libjpeg-devel package includes the header files and static libraries 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. %prep %setup -q -n jpeg-6b %patch0 -p1 -b .aixlt # Add license info cat $RPM_SOURCE_DIR/IBM_ILA > LICENSE cat README >> LICENSE %if %{BUILD64} == 1 # Prep 64-bit build in 64bit subdirectory ########################################## # Test whether we can run a 64bit command so we don't waste our time /usr/bin/locale >/dev/null 2>&1 mkdir 64bit cd 64bit gzip -dc %{SOURCE0} |tar -xf - cd jpeg-%{version} %patch0 -p1 -b .aixlt %endif %build export PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:. export LIBPATH= export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export RM="/usr/bin/rm -f" export AR="/usr/bin/ar -X32_64" export NM="/usr/bin/nm -X32_64" export CC32="/usr/vac/bin/xlc_r" export CC64="$CC32 -q64" export CXX32="/usr/vacpp/bin/xlC_r" export CXX64="$CXX32 -q64" export CC=$CC32 export CXX=$CXX32 export OBJECT_MODE=32 export CFLAGS="-O2" export CXXFLAGS="-O2" %configure \ --enable-shared --disable-static --prefix=$RPM_BUILD_ROOT%{_prefix} \ --exec_prefix=$RPM_BUILD_ROOT%{_prefix} gmake %{?_smp_mflags} cd .libs /usr/bin/ar -X32_64 xv libjpeg.a rm libjpeg.a /usr/vac/bin/xlc_r -qmkshrobj -o libjpeg.so.63 *.o /usr/bin/ar -q libjpeg.a libjpeg.so.63 cd - %if %{BUILD64} == 1 # Now build again as 64bit ########################### cd 64bit/jpeg-%{version} export CC=$CC64 export CXX=$CXX64 export OBJECT_MODE=64 %configure \ --enable-shared --disable-static --prefix=$RPM_BUILD_ROOT%{prefix64} \ --exec_prefix=$RPM_BUILD_ROOT%{prefix64} gmake %{?_smp_mflags} cd .libs /usr/bin/ar -X64 xv libjpeg.a /usr/vac/bin/xlc_r -q64 -qmkshrobj -o libjpeg.so.63 *.o /usr/bin/ar -q ../../../.libs/libjpeg.a libjpeg.so.63 # Add older version library for compatibility cp $RPM_SOURCE_DIR/libjpeg.so.62_32bit ./libjpeg.so.62 /usr/bin/ar -X32 -q ../../../.libs/libjpeg.a ./libjpeg.so.62 rm libjpeg.so.62 cp $RPM_SOURCE_DIR/libjpeg.so.62_64bit ./libjpeg.so.62 /usr/bin/ar -X64 -q ../../../.libs/libjpeg.a ./libjpeg.so.62 cp $RPM_SOURCE_DIR/shr.o_32bit ./shr.o /usr/bin/ar -X32 -q ../../../.libs/libjpeg.a ./shr.o %endif #BUILD64 %install rm -rf $RPM_BUILD_ROOT for i in lib include bin man/man1 do mkdir -p $RPM_BUILD_ROOT%{_prefix}/$i done make prefix=$RPM_BUILD_ROOT%{_prefix} install /usr/bin/strip $RPM_BUILD_ROOT%{_prefix}/bin/* || : (cd $RPM_BUILD_ROOT for dir in bin include do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{prefix}/$dir/* . cd - done mkdir -p usr/lib cd usr/lib ln -sf ../..%{prefix}/lib/* . ) %if %{BUILD64} == 1 #Add links for 64-bit library members ( mkdir -p $RPM_BUILD_ROOT/%{prefix64}/lib cd $RPM_BUILD_ROOT/%{prefix64}/lib ln -s ../../lib/*.a . ) %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc usage.doc LICENSE %{_prefix}/bin/* /usr/bin/* %{_prefix}/lib/*.a /usr/lib/*.a %{_prefix}/man/*/* %if %{BUILD64} == 1 #%dir %{prefix64} #%dir %{prefix64}/lib %{prefix64}/lib/libjpeg.a %endif %files devel %defattr(-,root,root) %doc libjpeg.doc coderules.doc LICENSE %{_prefix}/include/*.h /usr/include/*.h %changelog * Wed Apr 25 2018 Nitish K Mishra 6b-7 - Rebuild to fix directory ownership with libjpeg * Thu Feb 12 2004 David Clissold 6b-6 - Build 64-bit object. * Fri Nov 22 2002 David Clissold - Add IBM ILA license. * Wed Mar 07 2001 Marc Stephenson - Update to libtool 1.3.5a - Add logic for default compiler - Add compatibility member for Bull freeware * Fri Feb 16 2001 aixtoolbox - Account for different standard lib location in IA64 32-bit ABI * Fri Oct 27 2000 pkgmgr - Modify for AIX Freeware distribution * Sat Feb 5 2000 Bernhard Rosenkränzer - rebuild to get compressed man pages - fix description - some minor tweaks to the spec file - add docs - fix build on alpha (alphaev6 stuff) * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 9) * Wed Jan 13 1999 Cristian Gafton - patch to build on arm - build for glibc 2.1 * Mon Oct 12 1998 Cristian Gafton - strip binaries * Mon Aug 3 1998 Jeff Johnson - fix buildroot problem. * Tue Jun 09 1998 Prospector System - translations modified for de * Thu Jun 04 1998 Marc Ewing - up to release 4 - remove patch that set (improper) soname - libjpeg now does it itself * Thu May 07 1998 Prospector System - translations modified for de, fr, tr * Fri May 01 1998 Cristian Gafton - fixed build on manhattan * Wed Apr 08 1998 Cristian Gafton - upgraded to version 6b * Wed Oct 08 1997 Donnie Barnes - new package to remove jpeg stuff from libgr and put in it's own package