libglade.spec
author dermotm
Mon, 24 Jul 2006 12:30:39 +0000
branchgnome-2-10
changeset 19949 94f49bf19351
parent 19719 d184ca39d269
permissions -rw-r--r--
access control test #4

#
# spec file for package libglade
#
# 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:         libglade
License:      LGPL
Group:        System/Libraries/GNOME
Version:      2.5.1
Release:      1
Distribution: Java Desktop System
Vendor:       Sun Microsystems, Inc.
Summary:      Library for loading GLADE interfaces at runtime
Source:       http://ftp.gnome.org/pub/GNOME/sources/libglade/2.5/libglade-%{version}.tar.bz2
Source1:      libglade-2.0.3.gz
URL:          http://www.daa.com.au/~james/gnome/
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
Docdir:       %{_defaultdocdir}/doc
Autoreqprov:  on
Prereq:       /sbin/ldconfig

%define gtk2_version 2.5.0
%define libxml2_version 2.6.7
%define python_xml_version 2.3.3 

Requires: gtk2 >= %{gtk2_version}
Requires: libxml2 >= %{libxml2_version}
BuildRequires: gtk2-devel >= %{gtk2_version}
BuildRequires: libxml2-devel >= %{libxml2_version}
BuildRequires: python-xml >= %{python_xml_version}

%description
This library allows you to load glade interface files in a program at runtime.

%package devel
Summary:      Development library for loading GLADE interfaces at runtime
Group:        Development/Libraries/GNOME
Requires:     %{name} = %{version}
Requires:     gtk2-devel >= %{gtk2_version}
Requires:     libxml2-devel >= %{libxml2_version}
Requires:     python-xml >= %{python_xml_version}

%description devel
This library allows you to load glade interface files in a program at runtime.

%prep
%setup -q

%ifos solaris
%ifarch amd64 sparcv9
cd ..
cp -rp libglade-%{version} libglade-%{version}-64
%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}"

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

cd ../libglade-%version-64

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

libtoolize --force
aclocal $ACLOCAL_FLAGS -I ./m4
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 ../libglade-%version

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

%endif
%endif

libtoolize --force
aclocal $ACLOCAL_FLAGS -I ./m4
automake -a -c -f
autoconf
CFLAGS="$RPM_OPT_FLAGS"				\
./configure --prefix=%{_prefix}			\
            --sysconfdir=%{_sysconfdir} \
            --enable-gtk-doc
make -j $CPUS

%install

%ifos solaris
%ifarch amd64 sparcv9
cd ../libglade-%version-64
make install DESTDIR=$RPM_BUILD_ROOT
cd ../libglade-%version
%endif
%endif

make DESTDIR=$RPM_BUILD_ROOT install
install -d $RPM_BUILD_ROOT%{_mandir}/man3
install --mode=0644 %SOURCE1 $RPM_BUILD_ROOT%{_mandir}/man3
rm $RPM_BUILD_ROOT%{_libdir}/*.la
rm $RPM_BUILD_ROOT%{_libdir}/*.a

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files 
%{_libdir}/lib*.so.*

%files devel
%defattr(-, root, root)
%{_bindir}/*
%{_libdir}/lib*.so
%{_includedir}/libglade-2.0/
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gtk-doc/html/libglade
%{_datadir}/xml/libglade
%{_mandir}/man3/*

%changelog
* Fri May 06 2005 - [email protected]
- Add "-I ./m4" to the ACLOCAL_FLAGS since it is needed to build
  on Solaris.

* Fri May 05 2005 - [email protected]
- Bump to 2.5.1

* Fri Oct 29 2004 - [email protected]
- use $CC64 for the 64-bit build if defined

* Sat Oct 02 2004 - [email protected]
- Create 64bit libraries for Solaris

* Wed Aug 18 2004 - [email protected]
- added --enable-gtk-doc.

* Wed Jul 07 2004 - [email protected]
- Ported to rpm4

* Wed Jul 07 2004 - [email protected]
- added "-j $CPUS" to make to speed up builds

* Tue Mar 16 2004 - <[email protected]>
- Bump to 2.3.6

* Wed Feb 25 2004 - <[email protected]>
- use the jds versions of the autotools

* Wed Feb 25 2004 - <[email protected]>
- autotoolize

* Wed Feb 18 2004 - <[email protected]>
- Bump to 2.3.2

* Mon Dec 15 2003 - <[email protected]>
- Bump to 2.3.1

* Mon Oct 6 2003 - <[email protected]>
- upped some dep version numbers

* Thu Aug 14 2003 - <[email protected]>
- move lib*.so to -devel, remove *.a, *.la

* Tue May 13 2003 - [email protected]
- Initial Sun Spec File