# Note that this is NOT a relocatable package %define ver 1.9.8.1 %define RELEASE 8 %define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} %define prefix %{_prefix} Summary: An image loading and rendering library for X11R6. Name: imlib Version: %ver Release: %rel Copyright: LGPL Group: System Environment/Libraries Source: ftp://ftp.gnome.org/pub/GNOME/stable/sources/imlib/imlib-%{ver}.tar.gz Patch0: imlib-%{ver}-aixlibs.patch Patch1: imlib-%{ver}-extlibs.patch Obsoletes: Imlib BuildRoot: /var/tmp/imlib-%{PACKAGE_VERSION}-root URL: http://www.labs.redhat.com/imlib/ Requires: libpng Requires: libtiff Requires: libjpeg Requires: zlib Requires: gtk+ >= 1.2 Requires: libungif BuildRequires: libtool >= 1.3.5 Docdir: %{prefix}/doc %ifarch ia64 %define stdlib lib/ia64l32 %define stdlib64 lib/ia64l64 %define liblink ../../.. %define PKG64 %{name}-%{version}-ia64l64 %define DIRS . %{_builddir}/%{PKG64}/%{name}-%{version} %define DEFCCIA cc %define DEFCC %{DEFCCIA} %else %define stdlib lib %define liblink ../.. %define DIRS . %define DEFCC cc %endif %description Imlib is a display depth independent image loading and rendering library. Imlib is designed to simplify and speed up the process of loading images and obtaining X Window System drawables. Imlib provides many simple manipulation routines which can be used for common operations. Install imlib if you need an image loading and rendering library for X11R6, or if you're installing GNOME. You may also want to install the imlib-cfgeditor package, which will help you configure Imlib. %package devel Summary: Development tools for Imlib applications. Group: Development/Libraries Requires: imlib = %{PACKAGE_VERSION} Requires: libpng-devel Requires: libtiff-devel Requires: libjpeg-devel Requires: zlib-devel Requires: gtk+-devel Requires: libungif-devel Obsoletes: Imlib %description devel The header files, static libraries and documentation needed for developing Imlib applications. Imlib is an image loading and rendering library for X11R6. Install the imlib-devel package if you want to develop Imlib applications. You'll also need to install the imlib and imlib_cfgeditor packages. %package cfgeditor Summary: A configuration editor for the Imlib library. Group: System Environment/Libraries Requires: imlib = %{PACKAGE_VERSION} %description cfgeditor The imlib-cfgeditor package contains the imlib_config program, which you can use to configure the Imlib image loading and rendering library. Imlib_config can be used to control how Imlib uses color and handles gamma corrections, etc. If you're installing the imlib package, you should also install imlib_cfgeditor. %prep %ifarch ia64 %setup -q -c -n %{PKG64} cd %{name}-%{version} %patch0 -p2 -b .aixlibs %patch1 -p2 -b .extlibs %endif %setup -q %patch0 -p2 -b .aixlibs %patch1 -p2 -b .extlibs %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if [[ "$CC" != "gcc" ]] then %ifarch ia64 if [[ "$CC" = "bcc" ]] then export CC="bcc -Nilp32" export CC64=bcc else export CC64="$CC -q64" fi %endif export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` fi for dir in %{DIRS}; do cd $dir; if [[ $dir != "." ]]; then export CC="$CC64"; fi #automake libtoolize --force %ifarch ppc rs6000 export LDFLAGS="-Wl,-brtl" %endif if [ ! -f configure ]; then CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%prefix --sysconfdir=/etc else CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix --sysconfdir=/etc fi if [ "$SMP" != "" ]; then make -j$SMP "MAKE=make -j$SMP" else make fi done ########################################################################### %install rm -rf $RPM_BUILD_ROOT # Potential loop if building 64-bit libraries for IA64 for dir in %{DIRS}; do cd $dir; if [[ $dir = "." ]]; then INSTDIR=%{_prefix}; else INSTDIR=/%{PKG64}%{_prefix}; fi make prefix=$RPM_BUILD_ROOT$INSTDIR sysconfdir=$RPM_BUILD_ROOT/etc install done /usr/bin/strip $RPM_BUILD_ROOT%{prefix}/bin/imlib_config /usr/bin/strip $RPM_BUILD_ROOT%{prefix}/lib/*.so.* 2>/dev/null || : (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/%{stdlib} cd usr/%{stdlib} ln -sf %{liblink}%{prefix}/lib/* . cd - mkdir -p ./%{prefix}/etc || : cd etc for cfgfile in * do ln -sf /etc/$cfgfile ..%{prefix}/etc done cd - ) %ifarch ia64 # Add 64-bit libs to main install tree mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{stdlib64} mv ${RPM_BUILD_ROOT}/%{PKG64}%{_prefix}/lib/* $RPM_BUILD_ROOT%{_prefix}/%{stdlib64} # Add system links cd $RPM_BUILD_ROOT mkdir -p usr/%{stdlib64} cd usr/%{stdlib64} ln -sf %{liblink}%{prefix}/%{stdlib64}/* . %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc README AUTHORS ChangeLog NEWS %attr(755,root,root) %{prefix}/lib/lib*.so* %config /etc/* /usr/%{stdlib}/lib*.so* %ifarch ia64 %{_prefix}/%{stdlib64}/lib* /usr/%{stdlib64}/lib* %endif %{prefix}/etc/* %files cfgeditor %defattr(-,root,root) %{prefix}/bin/imlib_config /usr/bin/imlib_config %files devel %defattr(-,root,root) %doc doc/*.gif doc/*.html %{prefix}/bin/imlib-config /usr/bin/imlib-config %{prefix}/include/* /usr/include/* %{prefix}/share/aclocal/* %{prefix}/lib/lib*.la /usr/%{stdlib}/lib*.la %changelog * Thu Mar 22 2001 Marc Stephenson - Build both 32- and 64-bit libraries - Remove hardcoded -brtl * Fri Mar 09 2001 Marc Stephenson - Add logic for default compiler - Build with libtool 1.3.5a - Rebuild against new shared objects * 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 * Fri Feb 25 2000 Elliot Lee - Patch to use fallback locations for palette files. * Thu Feb 03 2000 Preston Brown - strip format plugins * Tue Aug 31 1999 Elliot Lee - Updates from the RHL 6.0 package. * Mon Jan 11 1999 Carsten Haitzler - up to 1.9.0 * Wed Sep 23 1998 Carsten Haitzler - up to 1.8.1 * Tue Sep 22 1998 Cristian Gafton - yet another build for today (%defattr and %attr in the files lists) - devel docs are back on the spec file * Tue Sep 22 1998 Carsten Haitzler - Added minor patch for ps saving code. * Mon Sep 21 1998 Cristian Gafton - updated to version 1.8 * Fri Sep 11 1998 Cristian Gafton - take out imlib_config from devel package * Wed Sep 9 1998 Michael Fulbright - upgraded to 1.7 - changed name so it will persist if user later install devel imlib - added subpackage for imlib_config * Fri Apr 3 1998 Michael K. Johnson - fixed typo * Fri Mar 13 1998 Marc Ewing - Added -k, Obsoletes - Integrate into CVS source tree