glib2.spec
author dcarbery
Mon, 23 Oct 2006 12:46:17 +0000
branchgnome-2-14
changeset 19195 352a4716f1f3
parent 7633 52725c8466d0
child 7673 eac137a5cb41
permissions -rw-r--r--
2006-10-23 Damien Carbery <[email protected]> * docs/ssa/*: Remove these, as they're now up on the JDS project pages under 'Tasks/Single Sys Admin'.

#
# spec file for package glib2 
#
# Copyright (c) 2005 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
Name:         glib2 
License:      LGPL
Group:        System/Libraries
Version:      %{?cvs:2.10.%cvs}%{?!cvs:2.10.2}
Release:      1
Distribution: Java Desktop System
Vendor:       Sun Microsystems, Inc.
Summary:      Low level core compatibility library for GTK+ and GNOME
Source:       http://ftp.gnome.org/pub/GNOME/sources/glib/2.10/glib-%{version}.tar.bz2
Source1:      libgthread-2.0.3.gz
Source2:      glib-genmarshal.1.gz
Source3:      glib-mkenums.1.gz
Source4:      glib-gettextize.1.gz
Source5:      gobject-query.1.gz
Source6:      libglib-2.0.3.gz
Source7:      libgmodule-2.0.3.gz
Source8:      libgobject-2.0.3.gz
Source9:      mkinstalldirs
Patch1:       glib-01-gettext-macro.diff
Patch2:       glib-02-convert-utf8.diff
Patch3:       glib-03-default-path.diff
Patch4:       glib-04-gmodule-always-lazy.diff
Patch5:       glib-05-solaris-thread-flags.diff
Patch6:       glib-06-feature_tests.diff
Patch7:       glib-07-msgfmt-c.diff
Patch8:       glib-08-hidden.diff
Patch9:       glib-09-ALL_LINGUAS.diff
URL:          http://www.gtk.org
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
Docdir:	      %{_defaultdocdir}/doc
AutoReqProv:  on
Prereq:       /sbin/ldconfig

%define pkgconfig_version 0.15.0
%define gtk_doc_version 1.1
%define intltool_version 0.34.1

Requires:      aaa_base
BuildRequires: pkgconfig >= %{pkgconfig_version}
BuildRequires: gtk-doc >= %{gtk_doc_version}
BuildRequires: intltool >= %{intltool_version}

%description
Glib is the base compatibility library for GTK+ and GNOME. It provides data
structure handling for C, portability wrappers, and interfaces for such
runtime functionality as an event loop, threads, dynamic laoding, and an
object system

%package devel
Summary:        GIMP Toolkit and GIMP Drawing Kit support library
Group:          Development/Libraries
Requires:       %{name} = %{version}

%description devel
Glib is the base compatibility library for GTK+ and GNOME. It provides data
structure handling for C, portability wrappers, and interfaces for such
runtime functionality as an event loop, threads, dynamic laoding, and an
object system

%prep
%setup -q -n glib-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1

%ifos solaris
%ifarch amd64 sparcv9
cd ..
cp -rp glib-%{version} glib-%{version}-64
cd glib-%{version}
%endif
%endif


%build
%ifos linux
if [ -x /usr/bin/getconf ]; then
  CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
fi

CONFLAGS="--prefix=%{_prefix} --mandir=%{_mandir}"

%ifos solaris
%ifarch amd64 sparcv9
CPUS=$(($CPUS*4))

cd ../glib-%version-64

export CFLAGS="$CFLAGS64"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH64"
export CC=${CC64:-$CC}
save_PATH="$PATH"
ccdir=`dirname $CC`
export PATH=$ccdir:$PATH

cp %SOURCE9 .
aclocal $ACLOCAL_FLAGS
libtoolize --force --copy
gtkdocize
autoheader
automake -a -c -f
autoconf
./configure $CONFLAGS					\
	    --bindir=%{_bindir}/%{_arch64}		\
	    --libdir=%{_libdir}/%{_arch64}		\
	    --libexecdir=%{_libexecdir}/%{_arch64}	\
	    --sysconfdir=%{_sysconfdir}/%{_arch64}	\
	    --disable-gtk-doc

make -j $CPUS

cd ../glib-%version

export CC=${CC32:-$CC}
export PATH="$save_PATH"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH32"
export CFLAGS="$CFLAGS32"
export RPM_OPT_FLAGS="$CFLAGS"
%endif
%endif

cp %SOURCE9 .
aclocal $ACLOCAL_FLAGS
libtoolize --force --copy
gtkdocize
autoheader
automake -a -c -f
autoconf
CFLAGS="$RPM_OPT_FLAGS"			\
./configure $CONFLAGS			\
	    --sysconfdir=%{_sysconfdir}	\
	    --enable-gtk-doc

make -j $CPUS

%install

%ifos solaris
%ifarch amd64 sparcv9
cd ../glib-%version-64
make install DESTDIR=$RPM_BUILD_ROOT
cd ../glib-%version
%endif
rm -f $RPM_BUILD_ROOT%{_bindir}/%{_arch64}/glib-gettextize
rm -f $RPM_BUILD_ROOT%{_bindir}/%{_arch64}/glib-mkenums
%endif

make DESTDIR=$RPM_BUILD_ROOT install
install -d $RPM_BUILD_ROOT%{_mandir}/man1
install -d $RPM_BUILD_ROOT%{_mandir}/man3
install --mode=0644 %SOURCE1 $RPM_BUILD_ROOT%{_mandir}/man3
install --mode=0644 %SOURCE2 $RPM_BUILD_ROOT%{_mandir}/man1
install --mode=0644 %SOURCE3 $RPM_BUILD_ROOT%{_mandir}/man1
install --mode=0644 %SOURCE4 $RPM_BUILD_ROOT%{_mandir}/man1
install --mode=0644 %SOURCE5 $RPM_BUILD_ROOT%{_mandir}/man1
install --mode=0644 %SOURCE6 $RPM_BUILD_ROOT%{_mandir}/man3
install --mode=0644 %SOURCE7 $RPM_BUILD_ROOT%{_mandir}/man3
install --mode=0644 %SOURCE8 $RPM_BUILD_ROOT%{_mandir}/man3
#Copy zh_HK from zh_TW
#Fixes bug 4930405
install -d $RPM_BUILD_ROOT%{_datadir}/locale/zh_HK/LC_MESSAGES
install --mode=0644 $RPM_BUILD_ROOT%{_datadir}/locale/zh_TW/LC_MESSAGES/*.mo $RPM_BUILD_ROOT%{_datadir}/locale/zh_HK/LC_MESSAGES/
rm $RPM_BUILD_ROOT%{_libdir}/*.la
 
%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files
%defattr(-,root,root)
%{_libdir}/lib*.so.*
%{_datadir}/locale/*/LC_MESSAGES/*.mo

%files devel
%defattr(-,root,root)
%{_bindir}/*
%{_libdir}/lib*.so
%{_includedir}/glib-2.0/*
%{_libdir}/glib-2.0/include/*.h
%{_libdir}/pkgconfig/*.pc
%{_datadir}/aclocal/*.m4
%{_datadir}/glib-2.0/*
%{_datadir}/gtk-doc/html/*
%{_mandir}/man1/*
%{_mandir}/man3/*

%changelog
* Thu Jul 13 2006 - [email protected]
- add patch ALL_LINGUAS.diff that removes the \n's from ALL_LINGUAS in
  AM_GLIB_GNU_GETTEXT
* Thu May 25 2006 - [email protected]
- Add patch glib-08-hidden.diff to make sure that the G_HAVE_GNUC_VISIBILITY
  macro is defined to "__hidden" if using the Sun Forte compiler.  This 
  makes sure that symbols that should be hidden are not exported when using
  our compiler.  This resolves the GNOME 2.14 LSARC 2006/202 TCR regarding
  this issue.
* Wed Apr 26 2006 - [email protected]
- Bump to 2.10.2.
* Wed Mar  8 2006 - [email protected]
- Bump to 2.10.1.
* Sun Feb 26 2006 - [email protected]
- Bump to 2.10.0.
* Mon Feb 13 2006 - [email protected]
- Bump to 2.9.6.
* Sun Feb 12 2006 - [email protected]
- Call gettextize to fix infinite loop in configure.
* Fri Jan 27 2006 - [email protected]
- Bump to 2.9.5
* Tue Jan 17 2006 - [email protected]
- Bump to 2.9.3
* Sun Jan 15 2006 - [email protected]
- Bump to 2.9.2.
* Tue Dec 20 2005 - [email protected]
- Bump to 2.9.1. Remove upstream patch 05-logname. Add intltool BuildRequires.
* Tue Nov 29 2005 - [email protected]
- Bump to 2.8.4.
* Mon Nov 28 2005 - [email protected]
- prepare for building from CVS snapshots:
- use a macro for Version
- fix autotool order, add some more
- cp mkinstalldirs so that we don't need to add even more autotool foo
* Tue Oct 11 2005 - [email protected]
- Bump to 2.8.3
* Tue Sep 27 2005 - [email protected]
- Bump to 2.8.2
* Mon Aug 15 2005 - [email protected]
- Bump to 2.8.0
* Wed Jun 15 2005 - [email protected]
- Bump to 2.6.5
- Remove patch glib-04-uninstalled-pc.diff
* Fri May 06 2005 - [email protected]
- Add patch 04 to add needed uninstalled.pc files to allow other
  base-libs libraries to build.  This requires calling autoconf
  aclocal, etc.
- Fix naming of patches since the patches were renamed but this
  spec file not updated.
* Fri May 06 2005 - [email protected]
- Bump to 2.6.4
* Wed Nov 15 2004 - [email protected]
- Bump to 2.4.8, since otherwise glib-gettextize doesn't create 
  mkinstalldirs properly, and consequently it means I can't create
  tarballs from CVS sources. We also get a rake of nice bug fixes
  as a result.
* Fri Nov 12 2004 - [email protected]
- Modify the default path that glib sets (if the user does not have PATH
  set), so it does not include "." since ARC determined this is a
  security concern.  When building on Sun, set it to just "/usr/bin"
  since "/bin" is a symlink to "/usr/bin".  On Linux set it to
  "/bin:/usr/bin".
* Fri Oct 29 2004 - [email protected]
- use $CC64 for the 64-bit build if defined
* Wed Oct 05 2004 - [email protected]
- Added glib-04-convert-utf8.diff to fix CR 5055972
* Sat Oct  2 2004 - [email protected]
- Create 64bit libraries for Solaris
* Thu Sep 16 2004 - [email protected]
- Added glib-03-g11n-allinguas.diff to include hu lingua
* Wed Aug 18 2004 - [email protected]
- added --enable-gtk-doc
* Thu Aug 05 2004 - [email protected]
- Add patch to fix glib get SIGCHLD everytime
* Thu Jul 08 2004 - [email protected]
- Updated l10n content to glib2-l10n-po-1.2.tar.bz2
* Thu Jul 08 2004 - [email protected]
- ported to rpm4/suse91
* Wed Jul 07 2004 - [email protected]
- added "-j $CPUS" to make to speed up builds
* Fri May 14 2004 - [email protected]
- Bump to 2.4.1
* Wed May 12 2004 - [email protected]
- Updated l10n content to glib2-l10n-po-1.1.tar.bz2
* Mon Mar 29 2004 - [email protected]
- Updated l10n content to glib2-l10n-po-1.0.tar.bz2
* Wed Mar 24 2004 - <[email protected]>
- Bump to 2.4.0
* Wed Mar 10 2004 - <[email protected]>
- remove glib-02 patch (it wasn't being applied anyway).
- bump to 2.3.6
* Thu Feb 19 2004 - <[email protected]>
- Add patch for glib/gmessages.h to change '...' to '__VA_ARGS__' to build
  on Solaris. May revisit to use '#ifdef __sun'
* Tue Feb 10 2004 - <[email protected]>
- Bump to 2.3.2, l10n to 0.7
* Mon Dec 15 2003 - <[email protected]>
- update to 2.3.1
* Sat Oct 04 2003 - <[email protected]>
- update to 2.2.3
* Thu Aug 14 2003 - <[email protected]>
- move lib*.so to -devel, remove *.a, *.la
* Fri Aug 01 2003 - <[email protected]> 2.2.2-1
* Wed Jul 25 2003 - <[email protected]>
- add aaa_base dependency. Fixes postinstall script breakage
  during OS install.
* Wed Jul 09 2003 - <[email protected]>
- add in sun po files
* Thu May 12 2003 - <[email protected]>
- Initial spec file for glib2