# Note that this is NOT a relocatable package %define ver 1.2.10 %define rel 2 %define prefix %{_prefix} Summary: A library of handy utility functions. Name: glib Version: %ver Release: %rel Copyright: LGPL Group: System Environment/Libraries Source: ftp://ftp.gnome.org/pub/GNOME/stable/sources/glib/glib-%{ver}.tar.gz #Patch1: glib-%{ver}-aixlibtool.patch BuildRoot: /var/tmp/glib-%{PACKAGE_VERSION}-root URL: http://www.gtk.org 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 GLib is a handy library of utility functions. This C library is designed to solve some portability problems and provide other useful functionality which most programs require. GLib is used by GDK, GTK+ and many applications. You should install th glib package because many of your applications will depend on this library. %package devel Summary: The GIMP ToolKit (GTK+) and GIMP Drawing Kit (GDK) support library. Group: Development/Libraries %description devel The glib-devel package includes the static libraries and header files for the support library for the GIMP's X libraries (GTK+ and GDK), which are available as public libraries. Install glib-devel if you want to develop programs which will use GLib. %changelog * Wed Aug 29 2001 Dan McNichol - Fix a couple of booboos in the config/make steps. * Mon Jul 16 2001 Dan McNichol - Update for glib version 1.2.10. * Thu Mar 22 2001 Marc Stephenson - Build both 32- and 64-bit libraries * Fri Mar 09 2001 Marc Stephenson - Add logic for default compiler - Rebuild against new shared objects - Disable inlining * Thu Feb 15 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 04 2000 Owen Taylor - Added fixes from stable branch of CVS * Thu Oct 7 1999 Owen Taylor - version 1.2.6 * Fri Sep 24 1999 Owen Taylor - version 1.2.5 * Fri Sep 17 1999 Owen Taylor - version 1.2.4 * Mon Jun 7 1999 Owen Taylor - version 1.2.3 * Thu Mar 25 1999 Michael Fulbright - version 1.2.1 * Fri Feb 26 1999 Michael Fulbright - Version 1.2 * Thu Feb 25 1999 Michael Fulbright - version 1.2.0pre1 * Tue Feb 23 1999 Cristian Gafton - new description tags * Sun Feb 21 1999 Michael Fulbright - removed libtoolize from %build * Thu Feb 11 1999 Michael Fulbright - added libgthread to file list * Fri Feb 05 1999 Michael Fulbright - version 1.1.15 * Wed Feb 03 1999 Michael Fulbright - version 1.1.14 * Mon Jan 18 1999 Michael Fulbright - version 1.1.13 * Wed Jan 06 1999 Michael Fulbright - version 1.1.12 * Wed Dec 16 1998 Michael Fulbright - updated in preparation for the GNOME freeze * Mon Apr 13 1998 Marc Ewing - Split out glib package %prep %ifarch ia64 %setup -q -c -n %{PKG64} cd %{name}-%{version} #%patch1 -p2 -b .inline %endif %setup -q #%patch1 -p2 -b .inline %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 libtoolize --force done %ifarch ppc || %ifarch rs6000 CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-Wl,-brtl" ./configure --prefix=%prefix %else CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix %endif make %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 install done ( 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/* . ) %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 AUTHORS COPYING ChangeLog NEWS README /usr/%{stdlib}/lib*.so* %{prefix}/lib/lib*.so* %ifarch ia64 %{_prefix}/%{stdlib64}/lib*.so* /usr/%{stdlib64}/lib*.so* %endif %files devel %defattr(-, root, root) /usr/%{stdlib}/glib /usr/include/* /usr/bin/* %{prefix}/lib/lib*.la %{prefix}/lib/glib %{prefix}/include/* %{prefix}/man/man1/* %{prefix}/share/aclocal/* %{prefix}/bin/*