Summary: A library of handy utility functions Name: glib2 Version: 2.22.3 Release: 1 License: LGPLv2+ Group: System Environment/Libraries URL: http://www.gtk.org Source0: http://download.gnome.org/sources/glib/2.22/glib-%{version}.tar.bz2 Source1: http://download.gnome.org/sources/glib/2.22/glib-%{version}.sha256sum Source2: glib2.sh Source3: glib2.csh Patch0: glib-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: pkg-config BuildRequires: gettext-devel >= 0.17 Requires: gettext >= 0.17, pcre %define _libdir64 %{_prefix}/lib64 %description GLib is the low-level core library that forms the basis for projects such as GTK+ and GNOME. It provides data structure handling for C, portability wrappers, and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system. This package provides version 2 of GLib. The library is available as 32-bit and 64-bit. %package devel Summary: A library of handy utility functions Group: Development/Libraries Requires: pkg-config Requires: %{name} = %{version}-%{release} %description devel The glib2-devel package includes the header files for version 2 of the GLib library. 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 "xlc_r -q64" or "gcc -maix64". %prep %setup -q -n glib-%{version} %patch0 %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="xlc_r -q64" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --with-threads=posix \ --disable-visibility \ --with-pcre=system make %{?_smp_mflags} cp gio/.libs/libgio-2.0.so.0 . cp glib/.libs/libglib-2.0.so.0 . cp gmodule/.libs/libgmodule-2.0.so.0 . cp gobject/.libs/libgobject-2.0.so.0 . cp gthread/.libs/libgthread-2.0.so.0 . make distclean # now build the 32-bit version export CC="xlc_r -q32" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --with-threads=posix \ --disable-visibility \ --with-pcre=system make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects # This: # ${AR} -q glib/.libs/libglib-2.0.a ./libglib-2.0.so.0 # doesn't work, therefore: rm -f glib/.libs/libglib-2.0.a ${AR} -r glib/.libs/libglib-2.0.a glib/.libs/libglib-2.0.so.0 ./libglib-2.0.so.0 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q ${RPM_BUILD_ROOT}%{_libdir}/libgio-2.0.a ./libgio-2.0.so.0 ${AR} -q ${RPM_BUILD_ROOT}%{_libdir}/libgmodule-2.0.a ./libgmodule-2.0.so.0 ${AR} -q ${RPM_BUILD_ROOT}%{_libdir}/libgobject-2.0.a ./libgobject-2.0.so.0 ${AR} -q ${RPM_BUILD_ROOT}%{_libdir}/libgthread-2.0.a ./libgthread-2.0.so.0 /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : # glib2.sh and glib2.csh mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/profile.d cp %{SOURCE2} %{SOURCE3} ${RPM_BUILD_ROOT}%{_sysconfdir}/profile.d chmod 0644 ${RPM_BUILD_ROOT}%{_sysconfdir}/profile.d/* cd ${RPM_BUILD_ROOT}%{_libdir} for f in lib*.a ; do ar -X32 -x ${f} done for f in lib*so* ; do ln -s ${f} `basename ${f} .0` done mkdir -p ${RPM_BUILD_ROOT}%{_libdir64} cd ${RPM_BUILD_ROOT}%{_libdir64} for f in ${RPM_BUILD_ROOT}%{_libdir}/lib*.a ; do ar -X64 -x ${f} done for f in lib*so* ; do ln -s ${f} `basename ${f} .0` done ( 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 AUTHORS COPYING NEWS %{_sysconfdir}/profile.d/* %{_libdir}/*.a %{_libdir}/lib*so* %{_libdir64}/lib*so* %{_datadir}/locale/* /usr/lib/*.a /usr/lib/lib*so* /usr/lib64/lib*so* %files devel %defattr(-,root,system,-) %doc %{_datadir}/gtk-doc/html/* %{_bindir}/* %{_libdir}/*.la %{_libdir}/glib-2.0 %{_libdir}/pkgconfig/* %{_includedir}/* %{_mandir}/man1/* %{_datadir}/aclocal/* %{_datadir}/glib-2.0 /usr/bin/* /usr/lib/*.la /usr/include/* %changelog * Mon Dec 14 2009 Michael Perzl - 2.22.3-1 - updated to version 2.22.3 * Fri Nov 20 2009 Michael Perzl - 2.22.2-1 - updated to version 2.22.2 * Fri Nov 20 2009 Michael Perzl - 2.20.5-2 - removed the "-D_LINUX_SOURCE_COMPAT" flag during compilation * Tue Sep 29 2009 Michael Perzl - 2.20.5-1 - updated to version 2.20.5 * Mon Jun 29 2009 Michael Perzl - 2.20.4-1 - updated to version 2.20.4 * Mon Jun 29 2009 Michael Perzl - 2.18.4-1 - updated to version 2.18.4 * Mon Jun 29 2009 Michael Perzl - 2.18.2-2 - fixed POSIX threads settings * Wed Oct 22 2008 Michael Perzl - 2.18.2-1 - updated to version 2.18.2 * Thu Jul 03 2008 Michael Perzl - 2.16.4-1 - updated to version 2.16.4 * Sat Apr 05 2008 Michael Perzl - 2.14.6-1 - first version for AIX V5.1 and higher