%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif Summary: A library for manipulating JPEG image format files Name: libjpeg Version: 9d %if %{p7build} Release: 1.p7 %else Release: 1 %endif License: IJG Group: System Environment/Libraries URL: http://www.ijg.org/ Source0: http://www.ijg.org/files/jpegsrc.v%{version}.tar.gz Source1: %{name}.so.62-aix32 Source2: %{name}.so.62-aix64 Source3: %{name}.so.7-aix32 Source4: %{name}.so.7-aix64 Source5: %{name}.so.8-aix32 Source6: %{name}.so.8-aix64 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %if %{p7build} %ifos aix6.1 Requires: AIX-rpm >= 6.1.8.0 %endif %ifos aix7.1 Requires: AIX-rpm >= 7.1.3.0 %endif %endif %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_r -q64" or "gcc -maix64". %prep %setup -q -n jpeg-%{version} %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" export RM="/usr/bin/rm -f" # first build the 64-bit version export CC="cc_r -q64" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} cp ./.libs/%{name}.so.9 . make distclean # now build the 32-bit version export CC="cc_r" ./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.9 # Add the older version 6b shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') cp %{SOURCE1} %{name}.so.62 /usr/bin/strip -X32 -e %{name}.so.62 /usr/bin/ar -X32 -q ./.libs/%{name}.a %{name}.so.62 cp %{SOURCE2} %{name}.so.62 /usr/bin/strip -X64 -e %{name}.so.62 /usr/bin/ar -X64 -q ./.libs/%{name}.a %{name}.so.62 cp %{SOURCE3} %{name}.so.7 /usr/bin/strip -X32 -e %{name}.so.7 /usr/bin/ar -X32 -q ./.libs/%{name}.a %{name}.so.7 cp %{SOURCE4} %{name}.so.7 /usr/bin/strip -X64 -e %{name}.so.7 /usr/bin/ar -X64 -q ./.libs/%{name}.a %{name}.so.7 cp %{SOURCE5} %{name}.so.8 /usr/bin/strip -X32 -e %{name}.so.8 /usr/bin/ar -X32 -q ./.libs/%{name}.a %{name}.so.8 cp %{SOURCE6} %{name}.so.8 /usr/bin/strip -X64 -e %{name}.so.8 /usr/bin/ar -X64 -q ./.libs/%{name}.a %{name}.so.8 %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 * Mon Feb 03 2020 Michael Perzl - 9d-1 - updated to version 9d * Tue Jan 16 2018 Michael Perzl - 9c-1 - updated to version 9c * Wed Jun 01 2016 Michael Perzl - 9b-2 - rebuilt with higher optimization * Tue Feb 02 2016 Michael Perzl - 9b-1 - updated to version 9b * Thu Feb 06 2014 Michael Perzl - 9a-1 - updated to version 9a * Mon Jan 28 2013 Michael Perzl - 9-1 - updated to version 9 * Mon Jan 28 2013 Michael Perzl - 8d-2 - fixed the missing libjpeg.so.7 64-bit shared object * Thu Apr 19 2012 Michael Perzl - 8d-1 - updated to version 8d * Wed Apr 27 2011 Michael Perzl - 8c-1 - updated to version 8c * Wed Jun 02 2010 Michael Perzl - 8b-1 - updated to version 8b * Wed Apr 14 2010 Michael Perzl - 8a-1 - updated to version 8a * Thu Feb 04 2010 Michael Perzl - 8-1 - updated to version 8 * 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