Summary: Library for manipulating GIF format image files Name: giflib Version: 5.1.2 Release: 1 License: MIT URL: http://www.sf.net/projects/giflib/ Source0: http://dl.sf.net/giflib/%{name}-%{version}.tar.bz2 Source1: libgif.so.4-aix32 Source2: libgif.so.4-aix64 Source3: libgif.so.6-aix32 Source4: libgif.so.6-aix64 Patch0: %{name}-%{version}-aix.patch Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: sed, automake, autoconf, patch Obsoletes: libungif <= %{version}-%{release} Provides: libungif <= %{version}-%{release} %define _libdir64 %{_prefix}/lib64 %description The giflib package contains a shared library of functions for loading and saving GIF format image files. It is API and ABI compatible with libungif, the library which supported uncompressed GIFs while the Unisys LZW patent was in effect. Install the giflib package if you need to write programs that use GIF files. You should also install the giflib-utils package if you need some simple utilities to manipulate GIFs. The library is available as 32-bit and 64-bit. %package devel Summary: Development tools for programs which will use the libungif library Group: Development/Libraries Requires: %{name} = %{version}-%{release} Provides: libungif-devel <= %{version}-%{release} Obsoletes: libungif-devel <= %{version}-%{release} %description devel This package contains the static libraries, header files and documentation necessary for development of programs that will use the giflib library to load and save GIF format image files. You should install this package if you need to develop programs which will use giflib library functions. You'll also need to install the giflib package. 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". %package utils Summary: Programs for manipulating GIF format image files Group: Applications/Multimedia Requires: %{name} = %{version}-%{release} Obsoletes: libungif-progs <= %{version}-%{release} %description utils The giflib-utils package contains various programs for manipulating GIF format image files. Install this package if you need to manipulate GIF format image files. You'll also need to install the giflib package. %prep %setup -q export PATH=/opt/freeware/bin:$PATH %patch0 /opt/freeware/bin/sed -i 's/\r//' doc/lzgif.txt autoconf mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CC="cc_r -qcpluscmt" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libgif.a ${RPM_BUILD_ROOT}%{_libdir64}/libgif.so.* # Add the older 4.2.X shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') cp %{SOURCE1} libgif.so.4 /usr/bin/strip -X32 -e libgif.so.4 /usr/bin/ar -X32 -q ${RPM_BUILD_ROOT}%{_libdir}/libgif.a libgif.so.4 cp %{SOURCE2} libgif.so.4 /usr/bin/strip -X64 -e libgif.so.4 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libgif.a libgif.so.4 # Add the older 5.0.X shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') cp %{SOURCE3} libgif.so.6 /usr/bin/strip -X32 -e libgif.so.6 /usr/bin/ar -X32 -q ${RPM_BUILD_ROOT}%{_libdir}/libgif.a libgif.so.6 cp %{SOURCE4} libgif.so.6 /usr/bin/strip -X64 -e libgif.so.6 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libgif.a libgif.so.6 ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 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 32bit/COPYING 32bit/README 32bit/NEWS 32bit/README %doc 32bit/ChangeLog 32bit/TODO 32bit/BUGS 32bit/AUTHORS %{_libdir}/lib*.a %{_libdir}/lib*.so* %{_libdir64}/lib*.so* /usr/lib/lib*.a /usr/lib/lib*.so* /usr/lib64/lib*.so* %files devel %defattr(-,root,system) %doc 32bit/doc/* %{_libdir}/lib*.la %{_libdir64}/lib*.la %{_includedir}/* /usr/lib/lib*.la /usr/lib64/lib*.la /usr/include/* %files utils %defattr(-,root,system) %{_bindir}/* %{_mandir}/man?/* /usr/bin/* %changelog * Mon Dec 19 2016 Michael Perzl - 5.1.2-1 - updated to version 5.1.2 * Mon Dec 19 2016 Michael Perzl - 5.1.1-1 - updated to version 5.1.1 * Mon Dec 19 2016 Michael Perzl - 5.1.0-1 - updated to version 5.1.0 * Sun Mar 30 2014 Michael Perzl - 5.0.6-1 - updated to version 5.0.6 * Sat Aug 31 2013 Michael Perzl - 5.0.5-1 - updated to version 5.0.5 * Tue Jan 29 2013 Michael Perzl - 5.0.4-1 - updated to version 5.0.4 * Mon Dec 31 2012 Michael Perzl - 5.0.3-1 - updated to version 5.0.3 * Mon Dec 31 2012 Michael Perzl - 5.0.2-1 - updated to version 5.0.2 * Mon Oct 15 2012 Michael Perzl - 5.0.1-1 - updated to version 5.0.1 * Wed Jun 20 2012 Michael Perzl - 5.0.0-1 - updated to version 5.0.0 * Wed Jun 20 2012 Michael Perzl - 4.2.0-1 - updated to version 4.2.0 * Sat Mar 22 2008 Michael Perzl - 4.1.6-1 - first version for AIX V5.1 and higher